linux/fs/ceph
Yan, Zheng eb13e832f8 ceph: use fl->fl_file as owner identifier of flock and posix lock
flock and posix lock should use fl->fl_file instead of process ID
as owner identifier. (posix lock uses fl->fl_owner. fl->fl_owner
is usually equal to fl->fl_file, but it also can be a customized
value). The process ID of who holds the lock is just for F_GETLK
fcntl(2).

The fix is rename the 'pid' fields of struct ceph_mds_request_args
and struct ceph_filelock to 'owner', rename 'pid_namespace' fields
to 'pid'. Assign fl->fl_file to the 'owner' field of lock messages.
We also set the most significant bit of the 'owner' field. MDS can
use that bit to distinguish between old and new clients.

The MDS counterpart of this patch modifies the flock code to not
take the 'pid_namespace' into consideration when checking conflict
locks.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-04 21:07:11 -07:00
..
acl.c ceph: make ceph_forget_all_cached_acls() static inline 2014-02-17 12:37:12 -08:00
addr.c ceph: fix dout() compile warnings in ceph_filemap_fault() 2014-01-28 09:57:06 -08:00
cache.c ceph: fscache: Wait for completion of object initialization 2014-04-03 10:33:53 +08:00
cache.h ceph: fscache: add an interface to synchronize object store limit 2014-04-03 10:33:53 +08:00
caps.c ceph: make sure write caps are registered with auth MDS 2014-04-04 21:07:05 -07:00
ceph_frag.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
debugfs.c ceph: print inode number for LOOKUPINO request 2014-04-03 10:33:54 +08:00
dir.c ceph: do not set r_old_dentry_dir on link() 2014-04-03 10:33:53 +08:00
export.c ceph: add get_name() NFS export callback 2014-04-03 10:33:53 +08:00
file.c ceph: fscache: Update object store limit after file writing 2014-04-03 10:33:53 +08:00
inode.c ceph: update i_max_size even if inode version does not change 2014-04-04 21:07:06 -07:00
ioctl.c ceph: do not chain inode updates to parent fsync 2014-04-03 10:33:52 +08:00
ioctl.h ceph: fully initialize new layout 2012-05-16 14:28:27 -05:00
Kconfig ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
locks.c ceph: use fl->fl_file as owner identifier of flock and posix lock 2014-04-04 21:07:11 -07:00
Makefile ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
mds_client.c ceph: do not assume r_old_dentry[_dir] always set together 2014-04-03 10:33:53 +08:00
mds_client.h ceph: add open export target session helper 2014-01-21 16:30:30 +08:00
mdsmap.c ceph: tidy ceph_mdsmap_decode() a little 2013-07-01 09:52:02 -07:00
snap.c ceph: use ceph_create_snap_context() 2013-05-01 21:20:09 -07:00
strings.c ceph: add get_name() NFS export callback 2014-04-03 10:33:53 +08:00
super.c ceph: use fl->fl_file as owner identifier of flock and posix lock 2014-04-04 21:07:11 -07:00
super.h ceph: use fl->fl_file as owner identifier of flock and posix lock 2014-04-04 21:07:11 -07:00
xattr.c ceph: do not chain inode updates to parent fsync 2014-04-03 10:33:52 +08:00