aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
Commit message (Collapse)AuthorAge
* [GFS2] Remove some unused codeSteven Whitehouse2006-04-28
| | | | | | | Remove some of the unused code flagged up by Adrian Bunk. Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse
* [GFS2] [-mm patch] fs/gfs2/: possible cleanupsAdrian Bunk2006-04-28
| | | | | | | | | | | | This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused functions - remove the following global function that was both unused and unimplemented: - super.c: gfs2_do_upgrade() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Reordering in deallocation to avoid recursive lockingSteven Whitehouse2006-04-28
| | | | | | | | | | | | | | | | | Despite my earlier careful search, there was a recursive lock left in the deallocation code. This removes it. It also should speed up deallocation be reducing the number of locking operations which take place by using two "try lock" operations on the two locks involved in inode deallocation which allows us to grab the locks out of order (compared with NFS which grabs the inode lock first and the iopen lock later). It is ok for us to fail while doing this since if it does fail it means that someone else is still using the inode and thus it wouldn't be possible to deallocate anyway. This fixes the bug reported to me by Rob Kenna. Cc: Rob Kenna <rkenna@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove redundant casts to/from voidDavid Teigland2006-04-27
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove GL_NEVER_RECURSE flagSteven Whitehouse2006-04-26
| | | | | | | There is no point in keeping this flag since recursion is not now allowed for any glock. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Don't do recursive locking in glock layerSteven Whitehouse2006-04-26
| | | | | | | | | | | | | | | This patch changes the last user of recursive locking so that it no longer needs this feature and removes it from the glock layer. This makes the glock code a lot simpler and easier to understand. Its also a prerequsite to adding support for the AOP_TRUNCATED_PAGE return code (or at least it is if you don't want your brain to melt in the process) I've left in a couple of checks just in case there is some place else in the code which is still using this feature that I didn't spot yet, but they can probably be removed long term. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix a bug: scheduling under a spinlockSteven Whitehouse2006-04-20
| | | | | | | | | At some stage, a mutex was added to gfs2_glock_put() without checking all its call sites. Two of them were called from under a spinlock causing random delays at various points and crashes. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Use vmalloc() in dir codeSteven Whitehouse2006-04-18
| | | | | | | | | | | | When allocating memory to sort directory entries, use vmalloc() rather than kmalloc() since for larger directories, the required size can easily be graeter than the 128k maximum of kmalloc(). Also adding the first steps towards getting the AOP_TRUNCATED_PAGE return code get in the glock code by flagging all places where we request a glock and we are holding a page lock. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Update debugging codeSteven Whitehouse2006-03-29
| | | | | | | | | | | | Update the debugging code in trans.c and at the same time improve the debugging code for gfs2_holders. The new code should be pretty fast during the normal case and provide just as much information in case of errors (or more). One small function from glock.c has moved to glock.h as a static inline so that its return address won't get in the way of the debugging. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Macros removal in gfs2.hSteven Whitehouse2006-02-27
| | | | | | | | | | | | | | As suggested by Pekka Enberg <penberg@cs.helsinki.fi>. The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h The other macros are gone from gfs2.h as (although not requested by Pekka Enberg) are a number of included header file which are now included individually. The inode number comparison function is now an inline function. The DT2IF and IF2DT may be addressed in a future patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Audit printk and kmallocSteven Whitehouse2006-02-27
| | | | | | | | | | | 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>
* [GFS2] Patch to remove stats counters from GFS2 (II)David Teigland2006-02-23
| | | | | Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Patch to remove stats gathering from GFS2David Teigland2006-02-23
| | | | | Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Use mutices rather than semaphoresSteven Whitehouse2006-02-21
| | | | | | | | As well as a number of minor bug fixes, this patch changes GFS to use mutices rather than semaphores. This results in better information in case there are any locking problems. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] The core of GFS2David Teigland2006-01-16
This patch contains all the core files for GFS2. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>