aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking/dlm/plock.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-21dlm: move plock code from gfs2David Teigland1-406/+0
Move the code that handles cluster posix locks from gfs2 into the dlm so that it can be used by both gfs2 and ocfs2. Signed-off-by: David Teigland <teigland@redhat.com>
2008-01-25[GFS2] use pid for plock owner for nfs clientsDavid Teigland1-4/+14
The fl_owner is that of lockd when posix locks arrive from nfs clients, so it can't be used to distinguish between lock holders. Use fl_pid as owner instead; it's the pid of the process on the nfs client. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-10-10[GFS2] use an temp variable to reduce a spin_unlockDenis Cheng1-5/+6
this is more clear. Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-07-09[GFS2] return conflicts for GETLKDavid Teigland1-1/+5
We weren't returning the correct result when GETLK found a conflict, which is indicated by userspace passing back a 1. Signed-off-by: Abhijith Das <adas redhat com> Signed-off-by: David Teigland <teigland redhat com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-07-09[GFS2] set plock owner in GETLK infoDavid Teigland1-1/+1
Set the owner field in the plock info sent to userspace for GETLK. Without this, gfs_controld won't correctly see when the GETLK from a process matches one of the process's existing locks. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-05-06gfs2: nfs lock support for gfs2Marc Eshel1-10/+99
Add NFS lock support to GFS2. Signed-off-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
2007-02-12[PATCH] mark struct file_operations const 6Arjan van de Ven1-1/+1
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-04[PATCH] severing skbuff.h -> poll.hAl Viro1-0/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-08[GFS2] Use void * instead of typedef for locking module interfaceSteven Whitehouse1-8/+7
As requested by Jan Engelhardt, this removes the typedefs in the locking module interface and replaces them with void *. Also since we are changing the interface, I've added a few consts as well. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-09-01[GFS2] Update copyright, tidy up incore.hSteven Whitehouse1-1/+1
As per comments from Jan Engelhardt <jengelh@linux01.gwdg.de> this updates the copyright message to say "version" in full rather than "v.2". Also incore.h has been updated to remove forward structure declarations which are not required. The gfs2_quota_lvb structure has now had endianess annotations added to it. Also quota.c has been updated so that we now store the lvb data locally in endian independant format to avoid needing a structure in host endianess too. As a result the endianess conversions are done as required at various points and thus the conversion routines in lvb.[ch] are no longer required. I've moved the one remaining constant in lvb.h thats used into lm.h and removed the unused lvb.[ch]. I have not changed the HIF_ constants. That is left to a later patch which I hope will unify the gh_flags and gh_iflags fields of the struct gfs2_holder. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-08-07[GFS2] match plock result with correct requestDavid Teigland1-1/+2
When the result of a posix lock request is read it needs to be matched up with the correct waiting request. The owner field needs to be used in the comparison since more than one process may be waiting for locks on the same file. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-31[GFS2] add plock ownerDavid Teigland1-0/+2
We need to use fl_owner instead of fl_pid to track the owner of a posix lock. Pass the owner value out to user space where cluster plocks are managed. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-05-24[GFS2] Cast 64 bit printk args to unsigned long long.David Teigland1-3/+4
Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-04-25[GFS2] Update plock code in DLM locking moduleDavid Teigland1-3/+3
We should be using fl_pid not fl_owner. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-02-27[GFS2] Audit printk and kmallocSteven Whitehouse1-6/+7
All printk calls now have KERN_ set where required and a couple of kmalloc(), memset(.., 0, ...) calls changed to kzalloc(). This is in response to comments from: Pekka Enberg <penberg@cs.helsinki.fi> and Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-01-17[GFS2] An update of the GFS2 lock modulesDavid Teigland1-0/+297
This brings the lock modules uptodate and removes the stray .mod.c file which accidently got included in the last check in. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>