kernel-ark/fs/9p
M. Mohan Kumar a099027c77 9p: Implement TLOCK
Synopsis

    size[4] TLock tag[2] fid[4] flock[n]
    size[4] RLock tag[2] status[1]

Description

Tlock is used to acquire/release byte range posix locks on a file
identified by given fid. The reply contains status of the lock request

    flock structure:
        type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
        flags[4] - Flags could be either of
          P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
            conflicting lock exists, wait for that lock to be released.
          P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
            trying to reclaim a lock after a server restrart (due to crash)
        start[8] - Starting offset for lock
        length[8] - Number of bytes to lock
          If length is 0, lock all bytes starting at the location 'start'
          through to the end of file
        pid[4] - PID of the process that wants to take lock
        client_id[4] - Unique client id

        status[1] - Status of the lock request, can be
          P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
          P9_LOCK_GRACE(3)
          P9_LOCK_SUCCESS - Request was successful
          P9_LOCK_BLOCKED - A conflicting lock is held by another process
          P9_LOCK_ERROR - Error while processing the lock request
          P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
            requests in this period (except locks with
            P9_LOCK_FLAGS_RECLAIM flag set)

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-10-28 09:08:47 -05:00
..
acl.c fs/9p: Add access = client option to opt in acl evaluation. 2010-10-28 09:08:46 -05:00
acl.h fs/9p: Implement create time inheritance 2010-10-28 09:08:46 -05:00
cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cache.h 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
fid.c fs/9p: Add access = client option to opt in acl evaluation. 2010-10-28 09:08:46 -05:00
fid.h 9p: Documentation updates 2008-05-14 19:23:25 -05:00
Kconfig fs/9p: Implement POSIX ACL permission checking function 2010-10-28 09:08:46 -05:00
Makefile fs/9p: Implement POSIX ACL permission checking function 2010-10-28 09:08:46 -05:00
v9fs_vfs.h 9p: Implement TLOCK 2010-10-28 09:08:47 -05:00
v9fs.c fs/9p: Add access = client option to opt in acl evaluation. 2010-10-28 09:08:46 -05:00
v9fs.h fs/9p: Add access = client option to opt in acl evaluation. 2010-10-28 09:08:46 -05:00
vfs_addr.c 9p: Add a Direct IO support for non-cached operations. 2010-10-28 09:08:45 -05:00
vfs_dentry.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vfs_dir.c 9p: Pass the correct end of buffer to p9dirent_read 2010-10-28 09:08:44 -05:00
vfs_file.c 9p: Implement TLOCK 2010-10-28 09:08:47 -05:00
vfs_inode.c fs/9p: Implement create time inheritance 2010-10-28 09:08:46 -05:00
vfs_super.c fs/9p: Add access = client option to opt in acl evaluation. 2010-10-28 09:08:46 -05:00
xattr_user.c fs/9p: Add support user. xattr 2010-08-02 14:28:35 -05:00
xattr.c fs/9p: Add xattr callbacks for POSIX ACL 2010-10-28 09:08:46 -05:00
xattr.h fs/9p: Add xattr callbacks for POSIX ACL 2010-10-28 09:08:46 -05:00