« Previous | Next » 

Revision 8f354003

ID8f35400358488ffa1147e9eab9e2c9cf0efd5e4e

Added by M. Mohan Kumar over 10 years ago

qemu-virtio9p: Implement TGETLOCK

Synopsis

size[4] TGetlock tag[2] fid[4] getlock[n]
size[4] RGetlock tag[2] getlock[n]

Description

TGetlock is used to test for the existence of byte range posix locks on
a file identified by given fid. The reply contains getlock structure. If
the lock could be placed it returns F_UNLCK in type field of getlock structure.
Otherwise it returns the details of the conflicting locks in the getlock
structure

getlock structure:
type[1] - Type of lock: F_RDLCK, F_WRLCK
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
proc_id[4] - process id that wants to take lock/owns the task
in case of reply
client[4] - Client id of the system that owns the process

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Venkateswararao Jujjuri <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences