<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src/syncop.h, branch v3.3.0qa29</title>
<subtitle>GlusterFS is a distributed file-system capable of scaling to several petabytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/'/>
<entry>
<title>syncop: Make syntask scalable</title>
<updated>2012-03-10T06:19:32+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-03-08T16:47:46+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=5b290bc6e3df76bea04c11cb15643173c33455bd'/>
<id>5b290bc6e3df76bea04c11cb15643173c33455bd</id>
<content type='text'>
At the moment, synctask uses task-&gt;frame to perform
all the syncops, this will lead to high-memory usage if the task
crawls millions of directories. i.e millions of STACK_WINDS/UNWINDS.
To prevent this, in each task a new stack is created to perform
the fops which is reset after every syncop.

Change-Id: I53c262ec348be9b1d91af73da01f1c217f31ce6e
BUG: 798907
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/2850
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At the moment, synctask uses task-&gt;frame to perform
all the syncops, this will lead to high-memory usage if the task
crawls millions of directories. i.e millions of STACK_WINDS/UNWINDS.
To prevent this, in each task a new stack is created to perform
the fops which is reset after every syncop.

Change-Id: I53c262ec348be9b1d91af73da01f1c217f31ce6e
BUG: 798907
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/2850
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Self-heald, Index integration</title>
<updated>2012-02-21T05:23:21+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-02-14T17:10:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=5f117a4a1fca3ec2d163fe77615cf6859c0450e4'/>
<id>5f117a4a1fca3ec2d163fe77615cf6859c0450e4</id>
<content type='text'>
Change-Id: Ic68eb00b356a6ee3cb88fe2bde50374be7a64ba3
BUG: 763820
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/2749
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic68eb00b356a6ee3cb88fe2bde50374be7a64ba3
BUG: 763820
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/2749
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>syncop: Multi-processor support in syncenv</title>
<updated>2012-02-21T05:12:08+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2012-02-21T03:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=1206437fcfc1f3e1bd4a6faec3341c240bae5cf2'/>
<id>1206437fcfc1f3e1bd4a6faec3341c240bae5cf2</id>
<content type='text'>
This patch introduces:

- multithreading of syncop processors permitting synctasks to be executed
  concurrently if the runqueue has many tasks.

- Auto scaling of syncop processors based on runqueue length.

- Execute a synctask (synctask_new) in a blocking way if callback function
  is set NULL. The return value of the syncfn will be the return value
  of synctask_new()

Change-Id: Iff369709af9adfd07be3386842876a24e1a5a9b5
BUG: 763820
Reviewed-on: http://review.gluster.com/443
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces:

- multithreading of syncop processors permitting synctasks to be executed
  concurrently if the runqueue has many tasks.

- Auto scaling of syncop processors based on runqueue length.

- Execute a synctask (synctask_new) in a blocking way if callback function
  is set NULL. The return value of the syncfn will be the return value
  of synctask_new()

Change-Id: Iff369709af9adfd07be3386842876a24e1a5a9b5
BUG: 763820
Reviewed-on: http://review.gluster.com/443
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Support for hardlink rebalance when decommissioning</title>
<updated>2012-02-19T12:47:50+00:00</updated>
<author>
<name>shishir gowda</name>
<email>shishirng@gluster.com</email>
</author>
<published>2012-02-17T13:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=4a65356275cda45f665dfa99d3712f6fb9087aff'/>
<id>4a65356275cda45f665dfa99d3712f6fb9087aff</id>
<content type='text'>
The support for hardlink rebalance is only available for decommissioning
of a node. this can be triggered in two ways
1. remove-brick start
2. if decommission node value is set in vol file, then a normal rebalance
   command

The way we handle it is-
if (nlink &gt; 1)
do
       * if src file doesnt have linkto xattr
                * mark src's linkto to the dst
       * else
                * perform a link on the dst
                * do a look up
                * if nlinks = dst.nlinks
                        * migrate data
                * else
                        * continue crawling
done
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Change-Id: If43b5524b872fd1413e9f7aa7f436cb244e30d8d
BUG: 763844
Reviewed-on: http://review.gluster.com/2737
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The support for hardlink rebalance is only available for decommissioning
of a node. this can be triggered in two ways
1. remove-brick start
2. if decommission node value is set in vol file, then a normal rebalance
   command

The way we handle it is-
if (nlink &gt; 1)
do
       * if src file doesnt have linkto xattr
                * mark src's linkto to the dst
       * else
                * perform a link on the dst
                * do a look up
                * if nlinks = dst.nlinks
                        * migrate data
                * else
                        * continue crawling
done
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Change-Id: If43b5524b872fd1413e9f7aa7f436cb244e30d8d
BUG: 763844
Reviewed-on: http://review.gluster.com/2737
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add an extra flag to readv()/writev() API</title>
<updated>2012-02-14T09:09:02+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-02-06T12:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=0e6df0100e13123fe38f28c5a090777e894d8f52'/>
<id>0e6df0100e13123fe38f28c5a090777e894d8f52</id>
<content type='text'>
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>complete the implementation of missing 'f**xattr()' fops</title>
<updated>2012-01-25T10:26:51+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-01-21T14:35:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=49c325d949b2df06572df7dd3825735fb9c8cd6f'/>
<id>49c325d949b2df06572df7dd3825735fb9c8cd6f</id>
<content type='text'>
in debug/* and cluster/* translators and a syncop_fsetxattr()

added a test case for testing the working of 'f-fop()' on
fuse mount.

Change-Id: I0c2aeeb30a0fb382ef2495cca1e66b00abaffd35
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/802
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in debug/* and cluster/* translators and a syncop_fsetxattr()

added a test case for testing the working of 'f-fop()' on
fuse mount.

Change-Id: I0c2aeeb30a0fb382ef2495cca1e66b00abaffd35
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/802
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add 'fremovexattr()' fop</title>
<updated>2012-01-25T10:24:20+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-01-17T00:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=d7ecaaa1ed0f88869812ea17cb64a102a74c8c1c'/>
<id>d7ecaaa1ed0f88869812ea17cb64a102a74c8c1c</id>
<content type='text'>
so operations can be done on fd for extended attribute removal

Change-Id: Ie026f1b53793aeb4ae33e96ea5408c7a97f34bf6
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/778
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
so operations can be done on fd for extended attribute removal

Change-Id: Ie026f1b53793aeb4ae33e96ea5408c7a97f34bf6
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 766571
Reviewed-on: http://review.gluster.com/778
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: get xattrs also as part of readdirp</title>
<updated>2012-01-25T10:03:44+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2012-01-18T12:36:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=cf8486cbef329ef66868f658fa35f470f97db462'/>
<id>cf8486cbef329ef66868f658fa35f470f97db462</id>
<content type='text'>
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.

Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.

Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>distribute: handle migration of symlink and special files</title>
<updated>2011-10-20T07:20:29+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2011-10-13T07:29:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=429550b75d2b97f24a102cc648bf9d8240965f93'/>
<id>429550b75d2b97f24a102cc648bf9d8240965f93</id>
<content type='text'>
TODO: currently, wrt. rebalance/decommissioning, only pending thing
is hardlink migration.

Change-Id: I30cd06802e84c95601a5a081198f1f09c6d6bc01
BUG: 3714
Reviewed-on: http://review.gluster.com/578
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Shishir Gowda &lt;shishirng@gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TODO: currently, wrt. rebalance/decommissioning, only pending thing
is hardlink migration.

Change-Id: I30cd06802e84c95601a5a081198f1f09c6d6bc01
BUG: 3714
Reviewed-on: http://review.gluster.com/578
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Shishir Gowda &lt;shishirng@gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>distribute rebalance: handle the open file migration</title>
<updated>2011-09-13T06:57:38+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2011-09-07T07:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=a07bb18c8adeb8597f62095c5d1361c5bad01f09'/>
<id>a07bb18c8adeb8597f62095c5d1361c5bad01f09</id>
<content type='text'>
Complexity involved: To migrate a file with open fd, we have to
notify the other client process which has the open fd, and make
sure the write()s happening on that fd is properly synced to the
migrated file. Once the migration is complete, the client
process which has open-fd should get notified and it should
start performing all the operations on the new subvolume,
instead of earlier cached volume.

How to solve the notification part:

We can overload the 'postbuf' attribute in the _cbk() function to
understand if a file is 'under-migration' or 'migration-complete'
state. (This will be something similar to deciding whether a file
is DHT-linkfile by its 'mode').

Overall change includes below mentioned major changes:

1. dht_linkfile is decided by only 2 factors (mode(01000),
   xattr(trusted.glusterfs.dht.linkto)), instead of earlier
   3 factors (size==0)

2. in linkfile self-heal part (in 'dht_lookup_everywhere_cbk()'),
   don't delete a linkfile if there is a open-fd on it. It means,
   there may be a migration in progress.

3. if a file's revalidate fails with ENOENT, it may be due to file
   migration, and hence need a lookup_everywhere()

4. There will be 2 phases of file-migration.

-&gt; Phase 1: Migration in progress
   * The source data file will have SGID and STICKY bit set in its mode.
   * The source data file will have a 'linkto' xattr pointing the
     destination.
   * Destination file will have mode set to '01000', and 'linkto' xattr
     set to itself.

-&gt; Phase 2: File migration Complete
   * The source data file will have mode '01000', and will be 'truncated'
     to size 0.
   * The destination file will have inherited mode from the source. (without
     sgid and sticky bit) and its 'linkto' attribute will be removed.

4. Changes in distribute to work smoothly with a file which is in migration /
   got migrated.

The 'fops' are divided into 3 categories, inode-read, inode-write and others.
inode-read fops need to handle only 'phase 2' notification, where as, the
inode-write fops need to handle both 'phase 1' and phase2. The inode-write
operations will be done on source file, and if any of 'file-migration' procedures
are detected in _cbk(), then the operations should be performed on the destination
too.

when a phase-2 is detected, then the inode-ctx itself should be changed to represent
a new layout.

With these changes, the open file migration will work smoothly with multiple clients.

Change-Id: I512408463814e650f34c62ed009bf2101d016fd6
BUG: 3071
Reviewed-on: http://review.gluster.com/209
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Complexity involved: To migrate a file with open fd, we have to
notify the other client process which has the open fd, and make
sure the write()s happening on that fd is properly synced to the
migrated file. Once the migration is complete, the client
process which has open-fd should get notified and it should
start performing all the operations on the new subvolume,
instead of earlier cached volume.

How to solve the notification part:

We can overload the 'postbuf' attribute in the _cbk() function to
understand if a file is 'under-migration' or 'migration-complete'
state. (This will be something similar to deciding whether a file
is DHT-linkfile by its 'mode').

Overall change includes below mentioned major changes:

1. dht_linkfile is decided by only 2 factors (mode(01000),
   xattr(trusted.glusterfs.dht.linkto)), instead of earlier
   3 factors (size==0)

2. in linkfile self-heal part (in 'dht_lookup_everywhere_cbk()'),
   don't delete a linkfile if there is a open-fd on it. It means,
   there may be a migration in progress.

3. if a file's revalidate fails with ENOENT, it may be due to file
   migration, and hence need a lookup_everywhere()

4. There will be 2 phases of file-migration.

-&gt; Phase 1: Migration in progress
   * The source data file will have SGID and STICKY bit set in its mode.
   * The source data file will have a 'linkto' xattr pointing the
     destination.
   * Destination file will have mode set to '01000', and 'linkto' xattr
     set to itself.

-&gt; Phase 2: File migration Complete
   * The source data file will have mode '01000', and will be 'truncated'
     to size 0.
   * The destination file will have inherited mode from the source. (without
     sgid and sticky bit) and its 'linkto' attribute will be removed.

4. Changes in distribute to work smoothly with a file which is in migration /
   got migrated.

The 'fops' are divided into 3 categories, inode-read, inode-write and others.
inode-read fops need to handle only 'phase 2' notification, where as, the
inode-write fops need to handle both 'phase 1' and phase2. The inode-write
operations will be done on source file, and if any of 'file-migration' procedures
are detected in _cbk(), then the operations should be performed on the destination
too.

when a phase-2 is detected, then the inode-ctx itself should be changed to represent
a new layout.

With these changes, the open file migration will work smoothly with multiple clients.

Change-Id: I512408463814e650f34c62ed009bf2101d016fd6
BUG: 3071
Reviewed-on: http://review.gluster.com/209
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
