<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/storage, branch v3.1.6qa4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>posix: perform readdir filling in locked region</title>
<updated>2011-07-16T19:47:22+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2011-07-15T01:13:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6e0af764e68e429a70693a81c4a7c7343dcf0839'/>
<id>6e0af764e68e429a70693a81c4a7c7343dcf0839</id>
<content type='text'>
When two application threads share an open dir fd (DIR *) and issue
readdirs, storage/posix will receive separate readdir fops in separate
threads in parallel. This has two-fold issues

1. In the following pair of operations -

   entry = readdir(dir)
       and
   strcpy (gf_dirent-&gt;name, entry-&gt;d_name)

   @entry is a static buffer in libc which can get reused by another thread
   to get filled with a longer name. This can cause the second operation
   to overflow the buffer as the allocation was for the smaller name.

2. In the following pair of operations -

   seekdir (dir, offset)
      and
   entry = readdir(dir)

   If two threads are executing these sequence in parallel in separate
   threads, then one of them will end up reading wrong/unexpected entries.

It would be sufficient to fix 1. by using readdir_r but that still keeps
the second race open. Hence the patch moves all the set of operations to a
locked region which solves both races.

Change-Id: I36e596a96e254d3a82ff5f3669fa67ec72ef0833

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

BUG: 3171 (Crash in server)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3171
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When two application threads share an open dir fd (DIR *) and issue
readdirs, storage/posix will receive separate readdir fops in separate
threads in parallel. This has two-fold issues

1. In the following pair of operations -

   entry = readdir(dir)
       and
   strcpy (gf_dirent-&gt;name, entry-&gt;d_name)

   @entry is a static buffer in libc which can get reused by another thread
   to get filled with a longer name. This can cause the second operation
   to overflow the buffer as the allocation was for the smaller name.

2. In the following pair of operations -

   seekdir (dir, offset)
      and
   entry = readdir(dir)

   If two threads are executing these sequence in parallel in separate
   threads, then one of them will end up reading wrong/unexpected entries.

It would be sufficient to fix 1. by using readdir_r but that still keeps
the second race open. Hence the patch moves all the set of operations to a
locked region which solves both races.

Change-Id: I36e596a96e254d3a82ff5f3669fa67ec72ef0833

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

BUG: 3171 (Crash in server)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3171
</pre>
</div>
</content>
</entry>
<entry>
<title>storage/posix: detect race in posix_rename()</title>
<updated>2011-07-12T09:24:31+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2011-07-12T02:16:17+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=bed94fc008b3446ce390eded41aab5cda297cf4b'/>
<id>bed94fc008b3446ce390eded41aab5cda297cf4b</id>
<content type='text'>
detect a race in rename between two clients by checking for
reassigned gfid or presence of dir when not expecting.

checks not necessary for rename of files.

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

BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
detect a race in rename between two clients by checking for
reassigned gfid or presence of dir when not expecting.

checks not necessary for rename of files.

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

BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: fix GFID assignment race between mkdir and lookup</title>
<updated>2011-06-17T15:34:04+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2011-06-10T03:51:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2b7e442245c90e4ef969591069434ac127427584'/>
<id>2b7e442245c90e4ef969591069434ac127427584</id>
<content type='text'>
In lookup, treat inodes which have recent ctime and no GFID as
though they are still getting created by another thread and
return ENOENT

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

BUG: 2994 ([glusterfs-3.2.1qa2]: untar and rm in parallel hangs untar)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2994
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In lookup, treat inodes which have recent ctime and no GFID as
though they are still getting created by another thread and
return ENOENT

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

BUG: 2994 ([glusterfs-3.2.1qa2]: untar and rm in parallel hangs untar)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2994
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Set op_errno to ENOMEM on failed iobuf_get</title>
<updated>2011-03-12T05:58:26+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2011-03-11T04:32:20+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=609d5aa9c29e8af0b25c1922c8cdb2db2edbd481'/>
<id>609d5aa9c29e8af0b25c1922c8cdb2db2edbd481</id>
<content type='text'>
This prevents a situation where op_ret for the read fop is
-1 but the op_errno is still 0.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1977 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prevents a situation where op_ret for the read fop is
-1 but the op_errno is still 0.

Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1977 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Handle offset greater than file size of EOF determination</title>
<updated>2011-03-12T05:58:21+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2011-03-11T02:21:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=31f62d2a701f24851675a6f4edfdd60f8f7dda30'/>
<id>31f62d2a701f24851675a6f4edfdd60f8f7dda30</id>
<content type='text'>
Signed-off-by: Shehjar Tikoo &lt;shehjart@gluster.com&gt;
Signed-off-by: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1977 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977
</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: Vijay Bellur &lt;vijay@dev.gluster.com&gt;

BUG: 1977 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977
</pre>
</div>
</content>
</entry>
<entry>
<title>Solaris xattr support for symlink and special files.</title>
<updated>2011-03-04T08:41:15+00:00</updated>
<author>
<name>shishir gowda</name>
<email>shishirng@gluster.com</email>
</author>
<published>2011-03-04T02:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5b909c83de45e9457eef773cb24770b47d51a632'/>
<id>5b909c83de45e9457eef773cb24770b47d51a632</id>
<content type='text'>
Since glusterfs uses xattr for storing gfid, and xattr support for
symlinks and special files does not exist in solaris. The work around
is provided by creating hidden files under export directory on solaris
hosts only. the hidden files ares maintained in .glusterfs_xattr_inode directory,
and all xattr ops on symlink and special files are redirected to respective
inodes.

All dir entries with name starting as .glusterfs (GF_HIDDEN_PATH) will
not be shown in readdir ops.

Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2213 (Symlink fails with ENODATA)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2213
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since glusterfs uses xattr for storing gfid, and xattr support for
symlinks and special files does not exist in solaris. The work around
is provided by creating hidden files under export directory on solaris
hosts only. the hidden files ares maintained in .glusterfs_xattr_inode directory,
and all xattr ops on symlink and special files are redirected to respective
inodes.

All dir entries with name starting as .glusterfs (GF_HIDDEN_PATH) will
not be shown in readdir ops.

Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2213 (Symlink fails with ENODATA)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2213
</pre>
</div>
</content>
</entry>
<entry>
<title>v2 Prevent removal of trusted.gfid xattr</title>
<updated>2011-03-01T10:05:35+00:00</updated>
<author>
<name>shishir gowda</name>
<email>shishirng@gluster.com</email>
</author>
<published>2011-03-01T03:16:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=204fc1205af14bdd98d9a86b9f7293c5b7f6747a'/>
<id>204fc1205af14bdd98d9a86b9f7293c5b7f6747a</id>
<content type='text'>
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2461 (remove xattr of trusted.gfid succeeds)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2461
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: shishir gowda &lt;shishirng@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2461 (remove xattr of trusted.gfid succeeds)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2461
</pre>
</div>
</content>
</entry>
<entry>
<title>storage/posix: set op_ret to -1 when setgid_override fails.</title>
<updated>2011-02-22T17:21:57+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@gluster.com</email>
</author>
<published>2011-02-22T05:25:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=21e4db42468d5bb7ebd9fa6a91461edd11b2a6da'/>
<id>21e4db42468d5bb7ebd9fa6a91461edd11b2a6da</id>
<content type='text'>
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2409 (crash in stat prefetch)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2409
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2409 (crash in stat prefetch)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2409
</pre>
</div>
</content>
</entry>
<entry>
<title>storage/posix: in opendir, allocate proper size for fd ctx pointer</title>
<updated>2011-01-08T01:43:45+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@gluster.com</email>
</author>
<published>2011-01-07T03:49:24+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2e81e4b828d53068e291100f4024d628d9a59443'/>
<id>2e81e4b828d53068e291100f4024d628d9a59443</id>
<content type='text'>
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2280 (wrong size allocated for posix_fd in posix.c:posix_opendir())
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2280
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Amar Tumballi &lt;amar@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 2280 (wrong size allocated for posix_fd in posix.c:posix_opendir())
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2280
</pre>
</div>
</content>
</entry>
<entry>
<title>gfid: disable setting/getting of gfid from higher level translators</title>
<updated>2010-12-07T06:19:05+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2010-12-07T00:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e3232db35a20e5cfd68ab3fb0b7d0931c4cfb67d'/>
<id>e3232db35a20e5cfd68ab3fb0b7d0931c4cfb67d</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: 2196 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2196
</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: 2196 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2196
</pre>
</div>
</content>
</entry>
</feed>
