<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfsclient/src/libglusterfsclient-internals.h, branch v2.0.6</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>libglusterfsclient: Bind fd on fd creation code paths</title>
<updated>2009-07-31T18:40:40+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-07-31T12:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=48b027c82322ef8c34c16e3da03a3375de3fe699'/>
<id>48b027c82322ef8c34c16e3da03a3375de3fe699</id>
<content type='text'>
When an fd_t is fd_create'd, we need to call fd_bind on it to
ensure that any fd_lookup on the inode gets us this fd. We're not
doing this so translators like write-behind were not able to order
path-based requests at all resulting in some fops like stat, which
could be issued after a writev, overtaking a previous writev which
is still being written-behind.

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

BUG: 179 (fileop reports miscompares on read tests)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=179
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an fd_t is fd_create'd, we need to call fd_bind on it to
ensure that any fd_lookup on the inode gets us this fd. We're not
doing this so translators like write-behind were not able to order
path-based requests at all resulting in some fops like stat, which
could be issued after a writev, overtaking a previous writev which
is still being written-behind.

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

BUG: 179 (fileop reports miscompares on read tests)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=179
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Use iobufs for storing application write data</title>
<updated>2009-07-30T19:01:00+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-07-30T12:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=c8765d4d807cc9e63c8d96a568fc05002fa7cbd3'/>
<id>c8765d4d807cc9e63c8d96a568fc05002fa7cbd3</id>
<content type='text'>
Till now we've been creating an iovec, storing references in it
to the application data and simply passing it on to the translator
tree. This means that the buffer being passed to the translators is
not at all associated with the memory ref'd by the iobref argument
to write fop. This is a problem when write-behind is a translator in
the tree since it assumes that the memory in the iovecs passed to
write fops is already refcounted by the iobref and so it simply copies
the address of the application data. The problem is that the application
can continue using this buffer, free it or over-write it destroying the
data that write-behind may write at a later time.

The solution involves copying the application's write buffer into
an iobuf which will be referred to by the iobref.

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

BUG: 178 (libglusterfsclient: Data corruption on using write-behind in translator tree)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=178
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Till now we've been creating an iovec, storing references in it
to the application data and simply passing it on to the translator
tree. This means that the buffer being passed to the translators is
not at all associated with the memory ref'd by the iobref argument
to write fop. This is a problem when write-behind is a translator in
the tree since it assumes that the memory in the iovecs passed to
write fops is already refcounted by the iobref and so it simply copies
the address of the application data. The problem is that the application
can continue using this buffer, free it or over-write it destroying the
data that write-behind may write at a later time.

The solution involves copying the application's write buffer into
an iobuf which will be referred to by the iobref.

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

BUG: 178 (libglusterfsclient: Data corruption on using write-behind in translator tree)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=178
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Fake a fsid for every VMP</title>
<updated>2009-07-20T21:29:41+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-07-20T01:25:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=2add5760c412d85f56a1ca2fc61ca743d1ee2a74'/>
<id>2add5760c412d85f56a1ca2fc61ca743d1ee2a74</id>
<content type='text'>
This is needed to work around the replicate behaviour of
possibly returning device number for the same file from

different subvolumes.

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

BUG: 148 (replicate: Returns st_dev from different subvols resulting in ESTALE thru unfs3booster)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=148
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed to work around the replicate behaviour of
possibly returning device number for the same file from

different subvolumes.

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

BUG: 148 (replicate: Returns st_dev from different subvols resulting in ESTALE thru unfs3booster)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=148
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Invalidate not update iattr cache on writev</title>
<updated>2009-07-17T19:01:29+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-07-17T08:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=dbccda35cdcad06208e2fc7554287b539e0060a6'/>
<id>dbccda35cdcad06208e2fc7554287b539e0060a6</id>
<content type='text'>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 149 (libglusterfsclient interacts incorrectly with write-behind on writev)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=149
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 149 (libglusterfsclient interacts incorrectly with write-behind on writev)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=149
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Update attr cache on read/write</title>
<updated>2009-07-07T23:24:53+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-07-02T06:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=428d17946b5bb5946996f045811fdc2393378737'/>
<id>428d17946b5bb5946996f045811fdc2393378737</id>
<content type='text'>
We werent updating the attr AKA stat cache on read and write
on files so every stat on the file before the timeout was returning
stale attr from the cache. Yuck!

This fixes it. Turns out there is a good aspect of unfs3's notoriety
when it comes to doing stat()s for every operation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We werent updating the attr AKA stat cache on read and write
on files so every stat on the file before the timeout was returning
stale attr from the cache. Yuck!

This fixes it. Turns out there is a good aspect of unfs3's notoriety
when it comes to doing stat()s for every operation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: update offset in glusterfs_read_async_cbk only if offset stored in fd_ctx is used.</title>
<updated>2009-06-30T21:36:25+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@zresearch.com</email>
</author>
<published>2009-06-10T07:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=344319ab62daccac38592df30417d706836afb74'/>
<id>344319ab62daccac38592df30417d706836afb74</id>
<content type='text'>
- this helps in implementing sendfile(2). manpage says that
    "If offset is  not  NULL,  then sendfile()  does  not modify the current
     file offset of in_fd"

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- this helps in implementing sendfile(2). manpage says that
    "If offset is  not  NULL,  then sendfile()  does  not modify the current
     file offset of in_fd"

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Avoid dirent copies in readdir cbk</title>
<updated>2009-06-08T13:31:56+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-06-03T01:05:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=c6d33dfbdc9db147fa6028d8c3daa8e79b0b4276'/>
<id>c6d33dfbdc9db147fa6028d8c3daa8e79b0b4276</id>
<content type='text'>
We can avoid memory allocation, de-allocation and
data copies by just using the entries passed to us from
a lower layer and by de-linking the entries from the original
list.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can avoid memory allocation, de-allocation and
data copies by just using the entries passed to us from
a lower layer and by de-linking the entries from the original
list.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Add dirent pre-fetching and caching</title>
<updated>2009-06-03T07:44:41+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-05-28T04:42:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=1a0cf7dc85967387fe2c458914409b888fc86235'/>
<id>1a0cf7dc85967387fe2c458914409b888fc86235</id>
<content type='text'>
The fop interface is such that we're able to extract more than
1 dirent in a readdir fop. This commit now enables libglusterfsclient
to read multiple entries on a glusterfs_readdir call. Once these
have been pre-fetched, they're cached till either glusterfs_closedir
,glusterfs_rewinddir or glusterfs_seekdir are called.
The current implementation is beneficial for sequential directory
reading and probably indifferent to applications that do a lot of seekdir
and rewinddir after opening the directory. This is because
both these calls result in dirent cache invalidation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fop interface is such that we're able to extract more than
1 dirent in a readdir fop. This commit now enables libglusterfsclient
to read multiple entries on a glusterfs_readdir call. Once these
have been pre-fetched, they're cached till either glusterfs_closedir
,glusterfs_rewinddir or glusterfs_seekdir are called.
The current implementation is beneficial for sequential directory
reading and probably indifferent to applications that do a lot of seekdir
and rewinddir after opening the directory. This is because
both these calls result in dirent cache invalidation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfsclient: Simplify inode and stat caching</title>
<updated>2009-06-03T07:39:59+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-06-03T01:31:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=57dc67ce5583ebaaa8c96900b6f279752b896e31'/>
<id>57dc67ce5583ebaaa8c96900b6f279752b896e31</id>
<content type='text'>
There is a mechanism for caching the inode numbers got from a lookup
and a struct stat got from a stat or fstat but I wasnt sure if it worked.
This commit simplifies cache updates and checks and the accompanying
tests have made sure that the cache does work.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a mechanism for caching the inode numbers got from a lookup
and a struct stat got from a stat or fstat but I wasnt sure if it worked.
This commit simplifies cache updates and checks and the accompanying
tests have made sure that the cache does work.

Signed-off-by: Anand V. Avati &lt;avati@dev.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='https://fedorapeople.org/cgit/anoopcs/public_git/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>
</feed>
