aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2
AgeCommit message (Collapse)Author
2006-08-07[GFS2] lockproto api prefixDavid Teigland
Use the gfs2_ prefix on the register/unregister functions for the lock modules. The gfs_ prefix was left from an old idea on how to share these with gfs1. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-08-04[GFS2] Fix lock ordering bug in page fault pathSteven Whitehouse
Mmapped files were able to trigger a lock ordering bug. Private maps do not need to take the glock so early on. Shared maps do unfortunately, however we can get around that by adding a flag into the flags for the struct gfs2_file. This only works because we are taking an exclusive lock at this point, so we know that nobody else can be racing with us. Fixes Red Hat bugzilla: #201196 Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-08-01[GFS2] Fix bug in directory codeSteven Whitehouse
This was a nasty bug which resulted in corruption of hash tables in the directory code with larger directories. We forgot to increment a pointer in the read/write routines internal to the directory code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-31[GFS2] add plock ownerDavid Teigland
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-07-31[GFS2] Tidy up in various filesSteven Whitehouse
Tidy up some files and remove an unused routine in meta_io.h. Also added a bit of extra debugging in meta_io.h. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-28[GFS2] Fix bug in clear_inodeSteven Whitehouse
We should have been waiting for lock demotion to finish in clear_inode. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-27[GFS2] Fix bug in super block reading codeSteven Whitehouse
This gets the argument to submit_bio() correct. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-27[GFS2] Change some allocations to GFP_NOFSSteven Whitehouse
Some allocations in rgrp.c should have been GFP_NOFS rather than GFP_KERNEL. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-27[GFS2] Use a bio to read the superblockSteven Whitehouse
This means that we don't need to create a special inode just to contain a struct address_space in order to read a single disk block. Instead we read the disk block directly. Its slightly faster, and uses slightly less memory, but the real reason for doing this is that it removes a special case from the glock code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-26[GFS2] Remove page.[ch]Steven Whitehouse
The remaining routines in page.c were all only used in one other file, so they are now moved into the files where they are referenced and made static. Thus page.[ch] are no longer required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-26[GFS2] Tidy gfs2_unstuffer_pageSteven Whitehouse
Tidy up gfs2_unstuffer_page by: a) Moving it into bmap.c b) Making it static c) Calling it directly from gfs2_unstuff_dinode d) Updating all callers of gfs2_unstuff_dinode due to one less required argument. It doesn't change the behaviour at all. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-25[GFS2] Alter direct I/O pathSteven Whitehouse
As per comments received, alter the GFS2 direct I/O path so that it uses the standard read functions "out of the box". Needs a small change to one of the VFS functions. This reduces the size of the code quite a lot and also removes the need for one new export. Some more work remains to be done, but this is the bones of the thing. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-21[GFS2] gfs2_set_flags double locking patchAbhijith Das
traced the "umount hang due to spurious glock" issue that I was having with gfs2meta. It's in the do_gfs2_set_flags function, which does a gfs2_holder_init as well as a gfs2_glock_nq_init (increases ref count by 2 instead of 1). Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-21[GFS2] fix typo in locking/dlmDavid Teigland
Typo causes the error value from the wrong lock to be checked. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-17[GFS2] Fix endian conversion bugSteven Whitehouse
Fix an endian coversion bug in log.c spotted by Kevin Anderson. Cc: Kevin Anderson <kanderso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-17[GFS2] Fix use after free bug in dir.cSteven Whitehouse
Fix a use after free bug in dir.c spotted by Kevin Anderson. Cc: Kevin Anderson <kanderso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-13[GFS2] NFS updateWendy Cheng
Update the NFS filehandles so that they contain the file type. Signed-off-by: Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-11[GFS2] Fix a coupls of warnings in dir.cSteven Whitehouse
Fix a couple of compiler warnings in dir.c caused by potentially uninitialised variables. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-11[PATCH] patch to init di_payload_format field in gfs2_dinodeAbhijith Das
A missing initialisation when creating a new on disk inode. Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-11[GFS2] Fix deadlock in memory allocationSteven Whitehouse
We must not call GFP_KERNEL memory allocations while we are holding the log lock (read or write) since that may trigger a log flush resulting in a deadlock. Eventually we need to fix the locking in log.c, for now this solves the problem at the expense of freeing up memory as fast as we would like to. This needs to be revisited later on. Cc: Kevin Anderson <kanderso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-11[GFS2] Add generation numberSteven Whitehouse
This adds a generation number for the eventual use of NFS to the ondisk inode. Its backward compatible with the current code since it doesn't really matter what the generation number is to start with, and indeed since its set to zero, due to it being taken from padding in both the inode and rgrp header, it should be fine. The eventual plan is to use this rather than no_formal_ino in the NFS filehandles. At that point no_formal_ino will be unused. At the same time we also add a releasepages call back to the "normal" address space for gfs2 inodes. Also I've removed a one-linrer function thats not required any more. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-10[GFS2] Bug fix to gfs2_readpages()Steven Whitehouse
This fixes a bug where we were releasing a page incorrectly sometimes when reading a stuffed file. This fixes the bug that Kevin reported when using Xen. Cc: Kevin Anderson <kanderso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-10[GFS2] Remove unused code from dir.cSteven Whitehouse
Remove a couple of commented out, and unused lines of code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-06[GFS2] Fixes to scanning of glocks (again)Steven Whitehouse
This really is the correct fix this time. We just ignore all glocks associated with inodes until the inodes are pushed from the inode cache. At that point the glocks are queued for reclaim, so we don't need to do it here. Also fix one or two other minor bugs. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-05[GFS2] Correct logic in glock scannerSteven Whitehouse
Under certain circumstances the glock scanning logic would demote locks which ought not to have been selected for demotion. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-05[GFS2] Add cast for printkSteven Whitehouse
Cast a uint64_t to unsigned long long for a printk. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-05[GFS2] Make GFS2 work with lock validatorSteven Whitehouse
Change our one existing old-style lock initialiser to a new-style one. This allows the lock validator to work as intended. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-05[GFS2] Fix locking for Direct I/O readsSteven Whitehouse
We need to hold i_mutex when doing direct i/o reads. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-03[GFS2] Mark file_operations constSteven Whitehouse
As per Arjan's patches: http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=99ac48f54a91d02140c497edc31dc57d4bc5c85d and http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=4b6f5d20b04dcbc3d888555522b90ba6d36c4106 make the GFS2 file_operations structures const. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-03[GFS2] Make our address_space_operations constSteven Whitehouse
As per Christoph's patch: http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=f5e54d6e53a20cef45af7499e86164f0e0d16bb2 We mark struct address_space_operations const in GFS2. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-03[GFS2] API change for gfs2_statfsSteven Whitehouse
The kernel API for super_operations->statfs() has changed so this updates GFS2 to the new API. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-03[patch 1/1] gfs2: get_sb_dev() fixAndrew Morton
Update GFS2 for dhowells API changes. Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-07-03[GFS2] Remove dependance on tty_write_message()Steven Whitehouse
This removes the call in GFS2 to tty_write_message and replaces it with a printk. As the export was added by GFS2, we remove this as well. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-24[GFS2] Eliminate one instance of __GFP_NOFAILSteven Whitehouse
This removes one instance of GFP_NOFAIL from the glock callback function. It also fixes a bug where a , was used at a line end rather than ; causing unintended results. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-23[GFS2] Use generic_file_sendfile directlySteven Whitehouse
Don't use a wrapper for generic_file_sendfile but call it directly. Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-22[GFS2] gfs2/dlm: mailing list and web pageDavid Teigland
List new development mailing list and correct web page url. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-22[GFS2] Remove unused flagSteven Whitehouse
The flag GIF_MIN_INIT is no longer used or required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-22[GFS2] [-mm patch] fs/gfs2/: make code staticAdrian Bunk
This patch makes the following needlessly global code static: - eaops.c: struct gfs2_security_eaops - rgrp.c: gfs2_free_uninit_di() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-22[GFS2] Remove gfs2_repermissionSteven Whitehouse
gfs2_repermission is just a wrapper for permission, so remove it and call permission directly where required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-21[GFS2] Fix double locking problem in renameSteven Whitehouse
The rename inode operation was trying to lock the same inode twice in the case of renaming with the source and destination directories the same. We now test for this and just lock once. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-20[GFS2] Remove unused ra_state variableSteven Whitehouse
As per Nick Piggin's comments on lkml, remove the unused ra_state variable. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au>
2006-06-20[GFS2] Fix printk format warnings in DLM codeDavid Woodhouse
fs/gfs2/locking/dlm/thread.c: In function ‘process_complete’: fs/gfs2/locking/dlm/thread.c:56: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:69: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:102: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:124: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:146: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:148: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-20[GFS2] Fix use of bitops on unsigned int (struct gfs2_holder->gh_iflags)David Woodhouse
fs/gfs2/glock.c: In function ‘gfs2_holder_get’: fs/gfs2/glock.c:439: warning: passing argument 2 of ‘set_bit’ from incompatible pointer type fs/gfs2/glock.c: In function ‘rq_promote’: fs/gfs2/glock.c:512: warning: passing argument 2 of ‘set_bit’ from incompatible pointer type fs/gfs2/glock.c:526: warning: passing argument 2 of ‘set_bit’ from incompatible pointer type ... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-19[GFS2] Always include glock in transactionSteven Whitehouse
Include the glock in the transaction, even when not journaling data in order that ordered write data will be correctly flushed when the lock is released. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-19[GFS2] Remove debugging printksSteven Whitehouse
A few of my printks slipped through last time. Also fix a couple of minor bugs. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-14[GFS2] Fix unlinked file handlingSteven Whitehouse
This patch fixes the way we have been dealing with unlinked, but still open files. It removes all limits (other than memory for inodes, as per every other filesystem) on numbers of these which we can support on GFS2. It also means that (like other fs) its the responsibility of the last process to close the file to deallocate the storage, rather than the person who did the unlinking. Note that with GFS2, those two events might take place on different nodes. Also there are a number of other changes: o We use the Linux inode subsystem as it was intended to be used, wrt allocating GFS2 inodes o The Linux inode cache is now the point which we use for local enforcement of only holding one copy of the inode in core at once (previous to this we used the glock layer). o We no longer use the unlinked "special" file. We just ignore it completely. This makes unlinking more efficient. o We now use the 4th block allocation state. The previously unused state is used to track unlinked but still open inodes. o gfs2_inoded is no longer needed o Several fields are now no longer needed (and removed) from the in core struct gfs2_inode o Several fields are no longer needed (and removed) from the in core superblock There are a number of future possible optimisations and clean ups which have been made possible by this patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-06[GFS2] Fix warning on impossible event in eattr codeSteven Whitehouse
The caller ensures that ea_list_i() is never called with an invalid type, so lets BUG() if we see one. This clears up a couple of compiler warnings too. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-06-06[GFS2] Move some fields around to reduce wasted spaceSteven Whitehouse
We can reclaim some space by moving fields in some structures in order to allow them to pack better on 64 bit architectures. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-05-25[GFS2] Fix for selinux supportRyan O'Hara
This should fix the mount problems with gfs2 and selinux. Signed-off-by: Ryan O'Hara <rohara@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-05-24[GFS2] Casts for printing 64bit numbersSteven Whitehouse
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>