<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/dht/src/Makefile.am, branch v3.3.0qa19</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<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='http://git.gluster.org/cgit/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>
<entry>
<title>distribute: bring in feature to do rebalance from inside</title>
<updated>2011-07-14T08:01:44+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2011-07-01T04:41:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8d18bc22d1cfc8a481bc8d20da5843c65b567226'/>
<id>8d18bc22d1cfc8a481bc8d20da5843c65b567226</id>
<content type='text'>
do the 'rebalance' on a file with 'setxattr()' with
'distribute.migrate-data' key. the valid 'value' is "force" or
anything else.

current implementation of 'rebalance' is same as 'glusterd-rebalance',
and hence comes with limitation of not rebalancing hardlinks, non-regular
files, and files with open-fds.

Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand Avati &lt;avati@gluster.com&gt;

BUG: 3070 (After 'rebalance', the gfid of the file gets changed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3070
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do the 'rebalance' on a file with 'setxattr()' with
'distribute.migrate-data' key. the valid 'value' is "force" or
anything else.

current implementation of 'rebalance' is same as 'glusterd-rebalance',
and hence comes with limitation of not rebalancing hardlinks, non-regular
files, and files with open-fds.

Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand Avati &lt;avati@gluster.com&gt;

BUG: 3070 (After 'rebalance', the gfid of the file gets changed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3070
</pre>
</div>
</content>
</entry>
<entry>
<title>adding libxlator, to ensure proper client side aggregation of marks by clustering translators</title>
<updated>2011-01-27T11:16:51+00:00</updated>
<author>
<name>Kaushik BV</name>
<email>kaushikbv@gluster.com</email>
</author>
<published>2011-01-27T05:23:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=73bce15b61755509de23d32646135254d369a2f6'/>
<id>73bce15b61755509de23d32646135254d369a2f6</id>
<content type='text'>
Signed-off-by: Kaushik BV &lt;kaushikbv@gluster.com&gt;
Signed-off-by: Csaba Henk &lt;csaba@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2310 (georeplication)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2310
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Kaushik BV &lt;kaushikbv@gluster.com&gt;
Signed-off-by: Csaba Henk &lt;csaba@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2310 (georeplication)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2310
</pre>
</div>
</content>
</entry>
<entry>
<title>mem-types: include *-mem-types.h in noinst_HEADERS variables in all Makefile.am</title>
<updated>2010-06-08T12:25:07+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2010-06-08T06:03:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a912b145157beb1700250872d672bb03fffe658f'/>
<id>a912b145157beb1700250872d672bb03fffe658f</id>
<content type='text'>
Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
</pre>
</div>
</content>
</entry>
<entry>
<title>switch translator added</title>
<updated>2009-11-26T11:04:26+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2009-11-25T21:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fc87b19f0bd511ee294c058ea9066189ca06ce88'/>
<id>fc87b19f0bd511ee294c058ea9066189ca06ce88</id>
<content type='text'>
switch translator is a wrapper around distribute to work for a
pattern based scheduling.

Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 409 (implement a switch scheduler)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
switch translator is a wrapper around distribute to work for a
pattern based scheduling.

Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 409 (implement a switch scheduler)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
</pre>
</div>
</content>
</entry>
<entry>
<title>distribute to take care of available disk space while creating new dirs, and files.</title>
<updated>2009-04-03T16:32:25+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2009-04-03T15:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8a5005ecf06f23f1607c0ff4111a21c00bd74205'/>
<id>8a5005ecf06f23f1607c0ff4111a21c00bd74205</id>
<content type='text'>
distribute gets awareness about disk-space while creating the files

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
distribute gets awareness about disk-space while creating the files

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>moved dht_hashfn_tea() to libglusterfs/hashfn.c as gf_dm_hashfn() (dm - davies-meyer).</title>
<updated>2009-02-26T20:07:08+00:00</updated>
<author>
<name>Basavanagowda Kanur</name>
<email>gowda@gluster.com</email>
</author>
<published>2009-02-26T19:06:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f097e77ffb386dc73e3639af4a9cd57df0d3d40d'/>
<id>f097e77ffb386dc73e3639af4a9cd57df0d3d40d</id>
<content type='text'>
moved dht_hashfn_tea() to libglusterfs/src/hashfn.c as gf_dm_hashfn().

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
moved dht_hashfn_tea() to libglusterfs/src/hashfn.c as gf_dm_hashfn().

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Added all files</title>
<updated>2009-02-18T12:06:07+00:00</updated>
<author>
<name>Vikas Gorur</name>
<email>vikas@zresearch.com</email>
</author>
<published>2009-02-18T12:06:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=77adf4cd648dce41f89469dd185deec6b6b53a0b'/>
<id>77adf4cd648dce41f89469dd185deec6b6b53a0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
