aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
Commit message (Collapse)AuthorAgeFilesLines
* [GFS2] Remove pointless comment from nolock/main.cSteven Whitehouse2006-02-271-3/+0
| | | | | | | | | As requested by: Pavel Machek <pavel@suse.cz> Pavel's other comments will be dealt with in later patches. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] 80 Column audit of locking modulesSteven Whitehouse2006-02-272-4/+8
| | | | | | | Requested by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] 80 Column audit of GFS2Steven Whitehouse2006-02-2720-72/+146
| | | | | | | Requested by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Use BUG_ON() rather then if (...) BUG();Steven Whitehouse2006-02-271-2/+2
| | | | | | | This issue was raised by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Audit printk and kmallocSteven Whitehouse2006-02-2710-66/+64
| | | | | | | | | | | 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-234-6/+0
| | | | | 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-2312-226/+10
| | | | | Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [DLM] Remove support for range locks (II)David Teigland2006-02-233-7/+7
| | | | | | | | This is the second of two patches removing support for range locks from the DLM Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Missed deletion of debugging codeSteven Whitehouse2006-02-221-1/+0
| | | | | | | One line which should have been deleted in the last patch was missed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Add list empty test to databuf_lo_addSteven Whitehouse2006-02-221-25/+8
| | | | | | | | | | | Heinz had spotted that I'd forgotten to test in databuf_lo_add() that the data buffer in question hadn't already been added to the list. This was causing an infinite loop later on in the "before commit" routine. This means that GFS2 is now ready to be tested by everybody. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Use mutices rather than semaphoresSteven Whitehouse2006-02-2117-118/+118
| | | | | | | | 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] Fix a case where we didn't get unstuffing rightSteven Whitehouse2006-02-151-9/+9
| | | | | | | There was a bug in the unstuffing logic which caused a crash under certain circumstances. This is now fixed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix for lock recursion problem for internal filesSteven Whitehouse2006-02-153-8/+25
| | | | | | | | | | | | | | | | Two internal files which are read through the gfs2_internal_read() routine were already locked when the routine was called and this do not need locking at the redapages level. This patch introduces a struct file which is used as a sentinal so that readpage will only perform locking in the case that the struct file passed to it is _not_ equal to this sentinal. Since the comments in the generic kernel code indicate that the struct file will never be used for anything other than passing straight through to readpage(), this should be ok. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix the bugs I introduced in the last patch but oneSteven Whitehouse2006-02-141-27/+29
| | | | | | Various endianess changes required in the directory code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Put back O_DIRECT supportSteven Whitehouse2006-02-142-26/+75
| | | | | | | | | | | | | | | | | | | This patch adds back O_DIRECT support with various caveats attached: 1. Journaled data can be read via O_DIRECT since its now the same on disk format as normal data files. 2. Journaled data writes with O_DIRECT will be failed sliently back to normal writes (should we really do this I wonder or should we return an error instead?) 3. Stuffed files will be failed back to normal buffered I/O 4. All the usual corner cases (write beyond current end of file, write to an unallocated block) will also revert to normal buffered I/O. The I/O path is slightly odd as reads arrive at the page cache layer with the lock for the file already held, but writes arrive unlocked. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Change ondisk format (hopefully for the last time)Steven Whitehouse2006-02-131-17/+19
| | | | | | | | | | | | | There were one or two fields in structures which didn't get changed last time back to their gfs1 sizes and alignments. One or two constants have also changed back to their original values which were missed the first time. Its possible that indirect pointer blocks might need to change. If they don't we'll have to rewrite them all on upgrade due to a change in the amount of padding that they use. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix for root inode ref count bugSteven Whitehouse2006-02-1312-133/+103
| | | | | | | | | | | | | | | Umount is now working correctly again. The bug was due to not getting an extra ref count when mounting the fs. We should have bumped it by two (once for the internal pointer to the root inode from the super block and once for the inode hanging off the dcache entry for root). Also this patch tidys up the code dealing with looking up and creating inodes. We now pass Linux inodes (with gfs2_inodes attached) rather than the other way around and this reduces code duplication in various places. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make journaled data files identical to normal files on diskSteven Whitehouse2006-02-0818-1477/+714
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very large patch, with a few still to be resolved issues so you might want to check out the previous head of the tree since this is known to be unstable. Fixes for the various bugs will be forthcoming shortly. This patch removes the special data format which has been used up till now for journaled data files. Directories still retain the old format so that they will remain on disk compatible with earlier releases. As a result you can now do the following with journaled data files: 1) mmap them 2) export them over NFS 3) convert to/from normal files whenever you want to (the zero length restriction is gone) In addition the level at which GFS' locking is done has changed for all files (since they all now use the page cache) such that the locking is done at the page cache level rather than the level of the fs operations. This should mean that things like loopback mounts and other things which touch the page cache directly should now work. Current known issues: 1. There is a lock mode inversion problem related to the resource group hold function which needs to be resolved. 2. Any significant amount of I/O causes an oops with an offset of hex 320 (NULL pointer dereference) which appears to be related to a journaled data buffer appearing on a list where it shouldn't be. 3. Direct I/O writes are disabled for the time being (will reappear later) 4. There is probably a deadlock between the page lock and GFS' locks under certain combinations of mmap and fs operation I/O. 5. Issue relating to ref counting on internally used inodes causes a hang on umount (discovered before this patch, and not fixed by it) 6. One part of the directory metadata is different from GFS1 and will need to be resolved before next release. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Update truncate function (shrinking partial blocks)Steven Whitehouse2006-01-314-57/+63
| | | | | | | | | | Update the function in GFS2 which deals with truncation of partial blocks. Some of the code is "borrowed" from ext3 since it appears to give a good model of how to do this operation. The function is renamed gfs2_block_truncate_page accordingly. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Add gfs2_internal_read()Steven Whitehouse2006-01-3012-149/+187
| | | | | | | | | | | | | | | | | Add the new external read function. Its temporarily in jdata.c even though the protoype is in ops_file.h - this will change shortly. The current implementation will change to a page cache one when that happens. In order to effect the above changes, the various internal inodes now have Linux inodes attached to them. We keep the references to the Linux inodes, rather than the gfs2_inodes in the super block. In order to get everything to work correctly I've had to reorder the init sequence on mount (which I should probably have done earlier when .gfs2_admin was made visible). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove unused prototypeSteven Whitehouse2006-01-301-1/+0
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make dir.c independant of jdata.cSteven Whitehouse2006-01-301-9/+255
| | | | | | | | Copy & rename various jdata functions into dir.c. The plan being that directory metadata format will not change although the journalled data format for "normal" files will change. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Use mpage_readpage() in gfs2_readpage()Steven Whitehouse2006-01-301-1/+2
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Bug fix relating to endian conversion in inode.cSteven Whitehouse2006-01-301-1/+2
| | | | | | A two line fix to get endian conversion correct. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Rename get_block and make it externSteven Whitehouse2006-01-302-7/+9
| | | | | | | This renames get_block to gfs2_get_block and makes it accessible from outside ops_address.c. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove unused file resize.cSteven Whitehouse2006-01-303-311/+0
| | | | | | | The code in this file is no longer used as the rindex file is now accessible to userspace, so can be read/written directly. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove pointless argument relating to truncateSteven Whitehouse2006-01-243-12/+8
| | | | | | | | | For some reason a function pointer was being passed through the truncate code which only ever took one value. This removes the function pointer and replaces it with a single call to the function in question. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Rename gfs2_meta_pin to gfs2_pinSteven Whitehouse2006-01-183-10/+10
| | | | | | | | | Since we'll need to pin data if we are going to journal it, then I'm renaming this function to make it less confusing. It might also be worth moving it into lops.c since there are no users outside that file. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Change memory allocations to GFP_NOFSSteven Whitehouse2006-01-181-3/+3
| | | | | | | | I'd like to be rid of these memory allocations entirely so far as is possible. For the moment though, mark them GFP_NOFS to make them less harmful. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove gfs2_databuf in favour of gfs2_bufdata structureSteven Whitehouse2006-01-185-32/+24
| | | | | | | | | | | | | Removing the gfs2_databuf structure and using gfs2_bufdata instead is a step towards allowing journaling of data without requiring the metadata header on each journaled block. The idea is to merge the code paths for ordered data with that of journaled data, with the log operations in lops.c tacking account of the different types of buffers as they are presented to it. Largely the code path for metadata will be similar too, but obviously through a different set of log operations. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make the new argument to gfs2_trans_add_bh() actually do somethingSteven Whitehouse2006-01-183-6/+9
| | | | | | | Passes the flag through to ensure that the correct log operations are invoked when the flag is set. Signed-off-by: Steven Whitehouse: <swhiteho@redhat.com>
* [GFS2] Add an additional argument to gfs2_trans_add_bh()Steven Whitehouse2006-01-1817-85/+86
| | | | | | | | | This adds an extra argument to gfs2_trans_add_bh() to indicate whether the bh being added to the transaction is metadata or data. Its currently unused since all existing callers set it to 1 (metadata) but following patches will make use of it. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Update init_dinode() to reduce stack usageSteven Whitehouse2006-01-182-18/+31
| | | | | | | | | | We no longer allocate a dinode on the stack in init_dinode() and we no longer use gfs2_dinode_out (eliminating one copy) and gfs2_meta_header_in (eliminating another copy). The meta_header_in fucntion is now no longer referenced from outside gfs2_ondisk.c, so make it static. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove unused code from ondisk.c/gfs2_ondisk.hSteven Whitehouse2006-01-181-63/+0
| | | | | | | Removal of unused conversion functions from ondisk.c and gfs2_ondisk.h Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove unused code from various filesSteven Whitehouse2006-01-188-232/+1
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove remains of the GFS2 identify ioctl()David Teigland2006-01-181-7/+0
| | | | | | | We don't need this ioctl, we can use stat() to gain the same information. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Only two args for kobject_uevent() in locking/dlm/mount.cDavid Teigland2006-01-181-3/+3
| | | | | | | | Update the dlm interface module to take account of the recently removed third argument to kobject_uevent() Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
* [GFS2] An update of the GFS2 lock modulesDavid Teigland2006-01-1710-490/+752
| | | | | | | | 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>
* [GFS2] Fix typo in GFS2 MakefileDavid Teigland2006-01-171-2/+2
| | | | | | | A two line fix to the GFS2 Makefile. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
* [GFS2] The lock modules for GFS2David Teigland2006-01-169-0/+1916
| | | | | | | | This patch contains the pluggable locking modules for GFS2. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] The core of GFS2David Teigland2006-01-1679-0/+28772
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>