Raghavendra G 8fd4aa7414 features/locks: implement fgetxattr and fsetxattr
implement xattrs for GF_XATTR_LOCKINFO_KEY, which will be used
for posix-locks migration from old to new graph after a switch.

fgetxattr (fd, GF_XATTR_LOCKINFO_KEY) will return a dict.
This dict has a serialized dict stored for key
GF_XATTR_LOCKINFO_KEY. This serialized dict in turn has fdnum
value of locks acquired on this fd with modified pathinfo
(containing hostname and base directory components) as key.

fsetxattr (newfd, GF_XATTR_LOCKINFO_KEY, dict) has following
semantics. dict can be the result of a previous fgetxattr with
GF_XATTR_LOCKINFO_KEY. In that case, a dict_get on dict
constructed using serialized buffer is done on modified pathinfo
as key. If a value is got, that value is treated as fdnum and for
every lock l on newfd->inode we do,
      if (l->fdnum == fdnum) {
         l->fdnum = fd_fdnum (newfd);
         l->transport = <connection identifier of connection on which fsetxattr came>;
      }

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I73a8f43aa0b6077bc19f8de52205ba748f2d8bbe
BUG: 808400
Reviewed-on: http://review.gluster.org/4120
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2012-11-27 22:54:27 -08:00
2011-08-05 01:50:35 -07:00
2012-11-19 00:49:36 -08:00
2012-10-11 23:01:53 -07:00
2010-03-12 04:09:34 -08:00
2012-11-05 16:02:39 -08:00
2009-02-18 17:36:07 +05:30
2011-07-18 17:24:14 +05:30
2011-07-18 15:47:16 +05:30
2011-11-23 04:57:57 -08:00

For more info, please visit http://www.gluster.org/.
Description
No description provided
Readme 86 MiB
Languages
C 86.6%
Shell 7.5%
Python 3.6%
Perl 0.7%
Makefile 0.4%
Other 0.9%