summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
Commit message (Collapse)AuthorAgeFilesLines
* [GFS2] Fix deadlock in memory allocationSteven Whitehouse2006-07-111-1/+1
| | | | | | | | | | | | | | 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>
* [GFS2] Add generation numberSteven Whitehouse2006-07-118-147/+149
| | | | | | | | | | | | | | | | | 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>
* [GFS2] Bug fix to gfs2_readpages()Steven Whitehouse2006-07-101-5/+5
| | | | | | | | | 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>
* [GFS2] Remove unused code from dir.cSteven Whitehouse2006-07-101-5/+0
| | | | | | | Remove a couple of commented out, and unused lines of code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fixes to scanning of glocks (again)Steven Whitehouse2006-07-064-11/+7
| | | | | | | | | | | 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>
* [GFS2] Correct logic in glock scannerSteven Whitehouse2006-07-051-2/+5
| | | | | | | | 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>
* [GFS2] Add cast for printkSteven Whitehouse2006-07-051-1/+1
| | | | | | Cast a uint64_t to unsigned long long for a printk. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make GFS2 work with lock validatorSteven Whitehouse2006-07-051-1/+1
| | | | | | | 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>
* [GFS2] Fix locking for Direct I/O readsSteven Whitehouse2006-07-051-3/+7
| | | | | | We need to hold i_mutex when doing direct i/o reads. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Mark file_operations constSteven Whitehouse2006-07-032-4/+4
| | | | | | | | | | | 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>
* [GFS2] Make our address_space_operations constSteven Whitehouse2006-07-033-3/+3
| | | | | | | | | 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>
* [GFS2] API change for gfs2_statfsSteven Whitehouse2006-07-031-1/+2
| | | | | | | 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>
* [patch 1/1] gfs2: get_sb_dev() fixAndrew Morton2006-07-031-4/+3
| | | | | | | | | 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>
* [GFS2] Remove dependance on tty_write_message()Steven Whitehouse2006-07-031-19/+4
| | | | | | | | 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>
* [GFS2] Eliminate one instance of __GFP_NOFAILSteven Whitehouse2006-06-242-7/+7
| | | | | | | | 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>
* [GFS2] Use generic_file_sendfile directlySteven Whitehouse2006-06-231-19/+1
| | | | | | | | 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>
* [GFS2] gfs2/dlm: mailing list and web pageDavid Teigland2006-06-221-1/+1
| | | | | | | 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>
* [GFS2] Remove unused flagSteven Whitehouse2006-06-222-2/+0
| | | | | | The flag GIF_MIN_INIT is no longer used or required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] [-mm patch] fs/gfs2/: make code staticAdrian Bunk2006-06-224-5/+2
| | | | | | | | | 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>
* [GFS2] Remove gfs2_repermissionSteven Whitehouse2006-06-225-20/+9
| | | | | | | 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>
* [GFS2] Fix double locking problem in renameSteven Whitehouse2006-06-211-5/+11
| | | | | | | | | 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>
* [GFS2] Remove unused ra_state variableSteven Whitehouse2006-06-201-6/+2
| | | | | | | | 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>
* [GFS2] Fix printk format warnings in DLM codeDavid Woodhouse2006-06-201-7/+14
| | | | | | | | | | | | 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>
* [GFS2] Fix use of bitops on unsigned int (struct gfs2_holder->gh_iflags)David Woodhouse2006-06-201-1/+1
| | | | | | | | | | | 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>
* [GFS2] Always include glock in transactionSteven Whitehouse2006-06-191-1/+1
| | | | | | | | 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>
* [GFS2] Remove debugging printksSteven Whitehouse2006-06-195-20/+3
| | | | | | | A few of my printks slipped through last time. Also fix a couple of minor bugs. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix unlinked file handlingSteven Whitehouse2006-06-1438-1867/+738
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [GFS2] Fix warning on impossible event in eattr codeSteven Whitehouse2006-06-061-5/+4
| | | | | | | | 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>
* [GFS2] Move some fields around to reduce wasted spaceSteven Whitehouse2006-06-061-9/+5
| | | | | | | 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>
* [GFS2] Fix for selinux supportRyan O'Hara2006-05-251-0/+1
| | | | | | | 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>
* [GFS2] Casts for printing 64bit numbersSteven Whitehouse2006-05-245-24/+27
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Cast 64 bit printk args to unsigned long long.David Teigland2006-05-242-21/+25
| | | | | Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Flag up issue in selinux codeSteven Whitehouse2006-05-221-7/+4
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] selinux supportRyan O'Hara2006-05-224-6/+69
| | | | | | | | | | This adds support to GFS2 for selinux extended attributes. There is a known bug in gfs2_ea_get() which is believed to be independant of this patch. Further patches will follow once that bug is fixed in order to make GFS2 use as much of the generic eattr infrastructure as possible. Signed-off-by: Ryan O'Hara <rohara@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] setup lock_dlm kobject earlierDavid Teigland2006-05-191-7/+7
| | | | | | | | | Setup the lock_dlm kobject before setting up the dlm lockspace instead of after. We want to use the sysfs files to detect the mount without having to wait for the dlm setup which can take a while. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] glock debugging and inode cache changesSteven Whitehouse2006-05-186-43/+92
| | | | | | | | | | | | | | | This adds some extra debugging to glock.c and changes inode.c's deallocation code to call the debugging code at a suitable moment. I'm chasing down a particular bug to do with deallocation at the moment and the code can go again once the bug is fixed. Also this includes the first part of some changes to unify the Linux struct inode and GFS2's struct gfs2_inode. This transformation will happen in small parts over the next short period. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Update copyright date to 2006Steven Whitehouse2006-05-1871-71/+71
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove semaphore.h from C filesSteven Whitehouse2006-05-1833-33/+0
| | | | | | | We no longer use semaphores, everything has been converted to mutex or rwsem, so we don't need to include this header any more. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Drop log lock on I/O error & tidy upSteven Whitehouse2006-05-184-16/+17
| | | | | | | | | This patch drops the log spinlock when an I/O error occurs to avoid any possible problems in case of blocking or recursion in the I/O error routine. It also has a few cosmetic changes to tidy up various other files. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove bits.c from the MakefileSteven Whitehouse2006-05-181-1/+1
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make newly moved functions staticSteven Whitehouse2006-05-181-9/+10
| | | | | | The functions moved from bits.c can now be made static. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Merge bits.[ch] into rgrp.cSteven Whitehouse2006-05-183-211/+161
| | | | | | | | Since they are small and will be inlined by the complier, it makes sense to merge the contents of bits.[ch] into rgrp.c Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix ref count bug that used to bite us on umountSteven Whitehouse2006-05-161-16/+6
| | | | | | | The ref count of certain glock's got elevated too far during unlink which caused umount to fail. This fixes it. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix attributes setting logicSteven Whitehouse2006-05-121-3/+10
| | | | | | | | The attributes logic for immutable was wrong so that there was not way to remove this attribute once set. This fixes the bug. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove incorrect initialisation of gh_ownerSteven Whitehouse2006-05-122-6/+0
| | | | | | | | The gh_owner field shouldn't be set or reset outside the glock code. These were left over from when recursive locking was allowed. It isn't any more, so they are not needed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Reverse block order in build_heightSteven Whitehouse2006-05-121-56/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code ordered the blocks allocated in the build_height routine backwards causing excessive disk seeks during a read of the metadata. This patch reverses the order to try and reduce disk seeks. Example: A five level metadata tree, I = Inode, P = Pointers, D = Data You need to read the blocks in the order: I P5 P4 P3 P2 P1 D in order to read a single data block. The new code now orders the blocks in this way. The old code used to order them as: I P1 P2 P3 P4 P5 D requiring two extra seeks on average. Note that for files which are grown by gradual extension rather than by truncate or by llseek/write at a large offset, this doesn't apply. In the case of writing to a file linearly, this routine will only be called upon to extend the height of the tree by one block at a time, so the ordering is determined by when its called rather than by the internals of the routine itself. Optimising that part of the ordering is a much harder problem. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Readpages supportSteven Whitehouse2006-05-0513-129/+254
| | | | | | | | | | | | | | | | | | This adds readpages support (and also corrects a small bug in the readpage error path at the same time). Hopefully this will improve performance by allowing GFS to submit larger lumps of I/O at a time. In order to simplify the setting of BH_Boundary, it currently gets set when we hit the end of a indirect pointer block. There is always a boundary at this point with the current allocation code. It doesn't get all the boundaries right though, so there is still room for improvement in this. See comments in fs/gfs2/ops_address.c for further information about readpages with GFS2. Signed-off-by: Steven Whitehouse
* [GFS2] Set d_ops for root inodeRobert S Peterson2006-05-051-0/+3
| | | | | | | | | | | | | | Well, I managed to track down the bug in gfs2 that was causing my grief. Below is a patch for the problem. Please incorporate as you see fit. Or should I say: as you see git. The problem was basically that you never set d_ops for the root inode, so the wrong hash algorithm was being used. But only for the root directory. Turns out that if I used subdirectories, it used the proper hash and my files were found just fine. Signed-off-by: Robert S Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix bug in writepage()Steven Whitehouse2006-05-021-1/+1
| | | | | | | | | As pointed out by Wendy Cheng, the logic in GFS2's writepage() function wasn't quite right with respect to invalidating pages when a file has been truncated. This patch fixes that. CC: Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove some unused codeSteven Whitehouse2006-04-285-315/+0
| | | | | | | Remove some of the unused code flagged up by Adrian Bunk. Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse
OpenPOWER on IntegriCloud