<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/nfs/server/src/nfs3.h, branch v3.2.5qa6</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>nfs3: Resolve entry vs. hash conflict at same dir depth</title>
<updated>2011-09-08T06:53:55+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2011-09-03T09:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=875740c702d6b30754d46b17d37dd0865743216a'/>
<id>875740c702d6b30754d46b17d37dd0865743216a</id>
<content type='text'>
Intro Note
==========
The current code in hard fh resolution takes the first-match approach, i.e.
which ever dirent either matches the hash or matches the gfid first
is the one chosen as the result for the next step of fh resolution. In
the latter case, i.e., dirent matches the gfid, we the next step is to
conclude the fh resolution by returning the entry whose gfid matched.
In the former, i.e., the hash matches the dirent, we choose the hash-matching
dirent as the next directory to descend into, for searching the file to be
operated upon.

Problem
=======
When performing hard fh resolution, there can be a situation where:

o the hash of the primary entry,i.e. the entry we're looking for and the hash
of another sibling directory, match. Note the use of "sibling", meaning both
the primary entry and the hash matching one are in the same directory, i.e.,
their filehandle.hashcount will be same.

o the sibling directory is encountered first during the dir search.

Because of the current code described in "Intro", we'll end up descending into
the sibling directory even though the correct behaviour is to ignore this and
wait till we encounter the primary entry in the same parent directory.

Once we end up descending into this sibling directory, the directory depth
validation check fails. The check fails because it notices that the resolution
is attempting to open a directory that is deeper in the fs tree than the file
we're looking for. When this check fails, we return an ESTALE. So basically, a
false-positive results in an estale to Specsfs.

This is not a theoretical situation. Me and Avati saw this on specsfs test
where sfs created terabytes-sized file system for its tests. The number of
files was so huge in a single directory that the hashes of two entries ended up
colliding.

Change-Id: I78d8756252330201e165d788a29277b4bce0df90
BUG: 3510
Reviewed-on: http://review.gluster.com/358
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intro Note
==========
The current code in hard fh resolution takes the first-match approach, i.e.
which ever dirent either matches the hash or matches the gfid first
is the one chosen as the result for the next step of fh resolution. In
the latter case, i.e., dirent matches the gfid, we the next step is to
conclude the fh resolution by returning the entry whose gfid matched.
In the former, i.e., the hash matches the dirent, we choose the hash-matching
dirent as the next directory to descend into, for searching the file to be
operated upon.

Problem
=======
When performing hard fh resolution, there can be a situation where:

o the hash of the primary entry,i.e. the entry we're looking for and the hash
of another sibling directory, match. Note the use of "sibling", meaning both
the primary entry and the hash matching one are in the same directory, i.e.,
their filehandle.hashcount will be same.

o the sibling directory is encountered first during the dir search.

Because of the current code described in "Intro", we'll end up descending into
the sibling directory even though the correct behaviour is to ignore this and
wait till we encounter the primary entry in the same parent directory.

Once we end up descending into this sibling directory, the directory depth
validation check fails. The check fails because it notices that the resolution
is attempting to open a directory that is deeper in the fs tree than the file
we're looking for. When this check fails, we return an ESTALE. So basically, a
false-positive results in an estale to Specsfs.

This is not a theoretical situation. Me and Avati saw this on specsfs test
where sfs created terabytes-sized file system for its tests. The number of
files was so huge in a single directory that the hashes of two entries ended up
colliding.

Change-Id: I78d8756252330201e165d788a29277b4bce0df90
BUG: 3510
Reviewed-on: http://review.gluster.com/358
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Change Copyright current year</title>
<updated>2011-08-10T17:57:44+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2011-08-09T06:50:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=92963fd0a09c912e6ababbcfe45d28ddebb0b645'/>
<id>92963fd0a09c912e6ababbcfe45d28ddebb0b645</id>
<content type='text'>
Change-Id: Id1f1a91cf15d933d5621a0073ddaebe02df0f159
BUG: 3348
Reviewed-on: http://review.gluster.com/198
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>
Change-Id: Id1f1a91cf15d933d5621a0073ddaebe02df0f159
BUG: 3348
Reviewed-on: http://review.gluster.com/198
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>LICENSE: s/GNU Affero General Public/GNU General Public/</title>
<updated>2011-08-06T13:40:14+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2011-08-06T08:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=56127b2a7c319d4edbadb76bbc7753b303f5b509'/>
<id>56127b2a7c319d4edbadb76bbc7753b303f5b509</id>
<content type='text'>
Change-Id: Ibf5f45431d7a55b70d7304649af652d6f25bb688
BUG: 3348
Reviewed-on: http://review.gluster.com/183
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>
Change-Id: Ibf5f45431d7a55b70d7304649af652d6f25bb688
BUG: 3348
Reviewed-on: http://review.gluster.com/183
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>nfs3: Force root lookup before starting fh resolution</title>
<updated>2010-12-29T18:20:50+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2010-12-29T05:42:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cbba1c3f55a7f73791310085b5d9bc65008f0b9b'/>
<id>cbba1c3f55a7f73791310085b5d9bc65008f0b9b</id>
<content type='text'>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2200 (cp dies with "Invalid argument" after failover)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2200
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2200 (cp dies with "Invalid argument" after failover)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2200
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs3: Prevent second lookup on a fresh entry lookup</title>
<updated>2010-11-25T14:35:34+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2010-11-25T04:11:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b605865986f19cf5e376a16b963f68f28d4aea44'/>
<id>b605865986f19cf5e376a16b963f68f28d4aea44</id>
<content type='text'>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs3: Fresh inode lookup on failed revalidation</title>
<updated>2010-11-25T14:35:19+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2010-11-25T00:17:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=26a8202550593232f941cd2251cfbeb304991808'/>
<id>26a8202550593232f941cd2251cfbeb304991808</id>
<content type='text'>
Brings in changes that were earlier introduced in commit:
f5afcc47f9f00472d6c2b3f48127e02332cd457a

but reverted because the patch was buggy and caused a seg-fault
due to extra inode_unrefs.

It fixes that extra inode_unref and cleans up the revalidation logic.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Brings in changes that were earlier introduced in commit:
f5afcc47f9f00472d6c2b3f48127e02332cd457a

but reverted because the patch was buggy and caused a seg-fault
due to extra inode_unrefs.

It fixes that extra inode_unref and cleans up the revalidation logic.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "nfs: Use only 38467 as default port instead of 3846[567]"</title>
<updated>2010-11-15T12:03:55+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2010-11-15T05:57:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=553c15160e4e3b063f4b689ee762b6d14be9953b'/>
<id>553c15160e4e3b063f4b689ee762b6d14be9953b</id>
<content type='text'>
This reverts commit be5c02a81c19336a6b922b1e1f28293c90955e7f.

By default, continue to register the three original port numbers
so that an upgrade to future version from 3.1 release does not
break mount requests against portmap, which may have old port
numbers registered.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1743 (XenServer is not compatible with GlusterNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit be5c02a81c19336a6b922b1e1f28293c90955e7f.

By default, continue to register the three original port numbers
so that an upgrade to future version from 3.1 release does not
break mount requests against portmap, which may have old port
numbers registered.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1743 (XenServer is not compatible with GlusterNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: Use only 38467 as default port instead of 3846[567]</title>
<updated>2010-11-09T10:11:59+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2010-11-08T06:25:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=be5c02a81c19336a6b922b1e1f28293c90955e7f'/>
<id>be5c02a81c19336a6b922b1e1f28293c90955e7f</id>
<content type='text'>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1743 (XenServer is not compatible with GlusterNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 1743 (XenServer is not compatible with GlusterNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "nfs3: Revalidate inode on receiving ESTALE on lookup"</title>
<updated>2010-10-12T07:11:19+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2010-10-12T01:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=efa94a4237bc98c629671e6fbb58948789604fe5'/>
<id>efa94a4237bc98c629671e6fbb58948789604fe5</id>
<content type='text'>
This reverts commit f5afcc47f9f00472d6c2b3f48127e02332cd457a.

Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f5afcc47f9f00472d6c2b3f48127e02332cd457a.

Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "nfs3: Revalidate inode on receiving ESTALE on lookup""</title>
<updated>2010-10-11T19:31:26+00:00</updated>
<author>
<name>Vijay Bellur</name>
<email>vijay@dev.gluster.com</email>
</author>
<published>2010-10-11T19:31:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=61308de7645f1df462bef50e9c22237899218c65'/>
<id>61308de7645f1df462bef50e9c22237899218c65</id>
<content type='text'>
This reverts commit 6dd3b7fa3bc7acf9281cc17f08010675e2297089.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 6dd3b7fa3bc7acf9281cc17f08010675e2297089.
</pre>
</div>
</content>
</entry>
</feed>
