summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-10-17 16:10:28 +0530
committerVijay Bellur <vbellur@redhat.com>2012-11-27 22:54:27 -0800
commit8fd4aa74149411ab739e2075e1f7c0709b8a0342 (patch)
treeb1be85d05864053ab095ec0c4025a3a13fde34a2 /cli
parentdbc0968db04f09a57b3a2165803f8103c98c9acb (diff)
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>
Diffstat (limited to 'cli')
0 files changed, 0 insertions, 0 deletions