<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfsclient, branch v2.0.2</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>Appropriate changes to statvfs struct for Solaris host.</title>
<updated>2009-05-19T15:34:02+00:00</updated>
<author>
<name>Harshavardhana Ranganath</name>
<email>harsha@dev.gluster.com</email>
</author>
<published>2009-05-19T13:39:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c5b90f75951faddf55c61f2fe57f1c26070a63b6'/>
<id>c5b90f75951faddf55c61f2fe57f1c26070a63b6</id>
<content type='text'>
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>
Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Comply with EEXIST rule on rename</title>
<updated>2009-05-18T13:43:18+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=35fc174ea3a37546d7c90be8fa6076b8f9416d73'/>
<id>35fc174ea3a37546d7c90be8fa6076b8f9416d73</id>
<content type='text'>
During a rename, if the new file exists, the old name needs to
over-write the new name. We're returning EEXIST, which is wrong
behaviour.

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>
During a rename, if the new file exists, the old name needs to
over-write the new name. We're returning EEXIST, which is wrong
behaviour.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: __do_path_resolve: Fix pathname resolution bug</title>
<updated>2009-05-18T13:43:12+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:54:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=95ce0a87f5fbb139f7002360d63a005bfb9c097d'/>
<id>95ce0a87f5fbb139f7002360d63a005bfb9c097d</id>
<content type='text'>
In __do_path_resolve, we need to use the new_loc.path as the input
for resolution rather than the resolved variable, simply because we're
not interested in resolving the names that have been resolved, as
pointed out by the variable name 'resolved'. Instead, we need to resolve
new_loc, which stores the next component in the path to
be looked up.

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>
In __do_path_resolve, we need to use the new_loc.path as the input
for resolution rather than the resolved variable, simply because we're
not interested in resolving the names that have been resolved, as
pointed out by the variable name 'resolved'. Instead, we need to resolve
new_loc, which stores the next component in the path to
be looked up.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Wipe loc-&gt;ino in libgf_client_loc_wipe</title>
<updated>2009-05-18T13:43:08+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:54:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fe06790a3637c30dc8d5e0be7367f27ee24c36bd'/>
<id>fe06790a3637c30dc8d5e0be7367f27ee24c36bd</id>
<content type='text'>
Not cleaning up the ino member of a loc_t results in SIGABRT
in __inode_link because in some cases, the loc-&gt;ino is
different from loc-&gt;inode-&gt;ino. This happens especially in code
blocks which re-use a loc_t structure for pointing at different
inodes/files. For eg, if a loc_t has been assigned an inode and
an ino, and followed by a libgf_client_loc_wipe, then re-use of this
loc in say libgf_client_lookup results the SIGABRT because
libgf_client_lookup calls inode_link with the same loc_t. However,
this loc_t has just been assigned a new inode pointer but the ino
member still contains a previous inode's inode number. This difference
in inode numbers results in an assertion failure, so the SIGABRT.

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>
Not cleaning up the ino member of a loc_t results in SIGABRT
in __inode_link because in some cases, the loc-&gt;ino is
different from loc-&gt;inode-&gt;ino. This happens especially in code
blocks which re-use a loc_t structure for pointing at different
inodes/files. For eg, if a loc_t has been assigned an inode and
an ino, and followed by a libgf_client_loc_wipe, then re-use of this
loc in say libgf_client_lookup results the SIGABRT because
libgf_client_lookup calls inode_link with the same loc_t. However,
this loc_t has just been assigned a new inode pointer but the ino
member still contains a previous inode's inode number. This difference
in inode numbers results in an assertion failure, so the SIGABRT.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Refine readdir entry parsing logic</title>
<updated>2009-05-18T13:42:52+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e420eb2206aa773eb32f1a7146cba4d6da5d9d03'/>
<id>e420eb2206aa773eb32f1a7146cba4d6da5d9d03</id>
<content type='text'>
Here I am only refining the entry parsing code in order
to clarify the exit conditions from the loop. There were
a few workloads where this loop went infinite.

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>
Here I am only refining the entry parsing code in order
to clarify the exit conditions from the loop. There were
a few workloads where this loop went infinite.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Add telldir API</title>
<updated>2009-05-18T13:42:49+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:53:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e1ae573f73d69fe1a244ed1493793961dd4cf811'/>
<id>e1ae573f73d69fe1a244ed1493793961dd4cf811</id>
<content type='text'>
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>
Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Add seekdir API</title>
<updated>2009-05-18T13:42:45+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=35bf3f058473b61605fd28cd9cbee7726adedf9d'/>
<id>35bf3f058473b61605fd28cd9cbee7726adedf9d</id>
<content type='text'>
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>
Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Add rewinddir API</title>
<updated>2009-05-18T13:42:41+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=dddcf498610ebd332992e9600dd728cc87e6355d'/>
<id>dddcf498610ebd332992e9600dd728cc87e6355d</id>
<content type='text'>
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>
Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Revert and re-do readdir conformance</title>
<updated>2009-05-18T13:42:37+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-11T12:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=aeda0a31977e8da295b913e6a306ff01ccf0ce0a'/>
<id>aeda0a31977e8da295b913e6a306ff01ccf0ce0a</id>
<content type='text'>
This commit basically reverts the previous readdir conformance
patch I sent a few days back. That commit had a completely retarded
and broken way of maintaining per-directory dirent.

It was broken for two reasons:
1. Creating a wrapper structure around the directory's fd_t
only for storing a struct dirent is not clean enough. This commit
takes a better approach by storing the dirent in fd_t context.
This dirent is valid only if the fd_t refers to a directory.

2. That commit was made and tested under the assumption (..stupidity
is a better word..) that only opendir call is used for opening a
directory. That is not correct. Directories are also opened using the
open syscall. The point is, glusterfs_open returns an fd_t and so did
glusterfs_opendir. The previous patch actually changed opendir to
return a new wrapper structure. That is fine, if we go by the POSIX
definition of open and opendir because, they're both supposed to
return different types, an int and a DIR*. However, in
libglusterfsclient, all other code assumes that directory handles
corresponding to DIR* and file descriptors corresponding to int types
are the same type, resulting in use of the same locking and fd context
addition/extraction code. So a directory opened using opendir returned
a wrapper structure which went down into the libglusterfsclient stack
where some function called a lock on the handle assuming it was an
fd_t, since it is not and dereferencing of the supposed fd-&gt;inode-&gt;lock
results in a seg fault.

Obviously, this didnt show up till unfs3 used open() to open a
directory and not opendir.

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>
This commit basically reverts the previous readdir conformance
patch I sent a few days back. That commit had a completely retarded
and broken way of maintaining per-directory dirent.

It was broken for two reasons:
1. Creating a wrapper structure around the directory's fd_t
only for storing a struct dirent is not clean enough. This commit
takes a better approach by storing the dirent in fd_t context.
This dirent is valid only if the fd_t refers to a directory.

2. That commit was made and tested under the assumption (..stupidity
is a better word..) that only opendir call is used for opening a
directory. That is not correct. Directories are also opened using the
open syscall. The point is, glusterfs_open returns an fd_t and so did
glusterfs_opendir. The previous patch actually changed opendir to
return a new wrapper structure. That is fine, if we go by the POSIX
definition of open and opendir because, they're both supposed to
return different types, an int and a DIR*. However, in
libglusterfsclient, all other code assumes that directory handles
corresponding to DIR* and file descriptors corresponding to int types
are the same type, resulting in use of the same locking and fd context
addition/extraction code. So a directory opened using opendir returned
a wrapper structure which went down into the libglusterfsclient stack
where some function called a lock on the handle assuming it was an
fd_t, since it is not and dereferencing of the supposed fd-&gt;inode-&gt;lock
results in a seg fault.

Obviously, this didnt show up till unfs3 used open() to open a
directory and not opendir.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>workaround for not including sys/cdefs.h -- including sys/cdefs.h breaks build on solaris and other platforms</title>
<updated>2009-05-18T11:54:39+00:00</updated>
<author>
<name>Anand V. Avati</name>
<email>avati@amp.gluster.com</email>
</author>
<published>2009-05-18T11:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a5301c874f978570187c3543b0c3a4ceba143c25'/>
<id>a5301c874f978570187c3543b0c3a4ceba143c25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
