- 30 Nov, 2006 5 commits
-
-
Steven Whitehouse authored
This is almost never used. Its there for backward compatibility with GFS1. It doesn't need its own field since it can always be calculated from the inode mode & flags. This saves a bit more space in the gfs2_inode. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
Remove the di_[amc]time fields and use inode->i_[amc]time fields instead. This saves 24 bytes from the gfs2_inode. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
Everywhere this was called, a struct gfs2_inode was available, but despite that, it was always called with a struct gfs2_dinode as an argument. By making this change it paves the way to start eliminating fields duplicated between the kernel's struct inode and the struct gfs2_dinode. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 20 Oct, 2006 4 commits
-
-
Adrian Bunk authored
In the "if (extlen)" case, "bh" was used uninitialized. This patch changes the code to what seems to have been intended. Spotted by the Coverity checker. This patch also removes a pointless "bh = NULL" asignment (the variable is never accessed again after this point). Signed-off-by:
Adrian Bunk <bunk@stusta.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Adrian Bunk authored
In the "if (extlen)" case, "new" might be used uninitialized. Looking at the code, it should be initialized to 0. Spotted by the Coverity checker. Signed-off-by:
Adrian Bunk <bunk@stusta.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Adrian Bunk authored
The Coverity checker spotted this obviously dead code. Signed-off-by:
Adrian Bunk <bunk@stusta.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 25 Sep, 2006 1 commit
-
-
Steven Whitehouse authored
As per Andrew Morton's request, removed trailing whitespace. Cc: Andrew Morton <akpm@osdl.org> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 21 Sep, 2006 1 commit
-
-
Steven Whitehouse authored
Fix a bug in the directory reading code, where we might have dereferenced a NULL pointer in case of OOM. Updated the directory code to use the new & improved version of gfs2_meta_ra() which now returns the first block that was being read. Previously it was releasing it requiring following code to grab the block again at each point it was called. Also turned off readahead on directory lookups since we are reading a hash table, and therefore reading the entries in order is very unlikely. Readahead is still used for all other calls to the directory reading function (e.g. when growing the hash table). Removed the DIO_START constant. Everywhere this was used, it was used to unconditionally start i/o aside from a couple of places, so I've removed it and made the couple of exceptions to this rule into separate functions. Also hunted through the other DIO flags and removed them as arguments from functions which were always called with the same combination of arguments. Updated gfs2_meta_indirect_buffer to be a bit more efficient and hopefully also be a bit easier to read. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 19 Sep, 2006 1 commit
-
-
Fabio Massimo Di Nitto authored
lm_interface.h has a few out of the tree clients such as GFS1 and userland tools. Right now, these clients keeps a copy of the file in their build tree that can go out of sync. Move lm_interface.h to include/linux, export it to userland and clean up fs/gfs2 to use the new location. Signed-off-by:
Fabio M. Di Nitto <fabbione@ubuntu.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 07 Sep, 2006 1 commit
-
-
Jan Engelhardt authored
Remove redundant brackets Signed-off-by:
Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 05 Sep, 2006 1 commit
-
-
Steven Whitehouse authored
As per comments from Jan Engelhardt, remove redundant casts, redundant endian conversions, add a smattering of const and rewrite the dirent_next function in order to avoid as many casts as possible. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 04 Sep, 2006 2 commits
-
-
Steven Whitehouse authored
This makes all fixed size types have consistent names. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
This makes everything consistent. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 01 Sep, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 01 Aug, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 26 Jul, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 17 Jul, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 11 Jul, 2006 1 commit
-
-
Steven Whitehouse authored
Fix a couple of compiler warnings in dir.c caused by potentially uninitialised variables. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 10 Jul, 2006 1 commit
-
-
Steven Whitehouse authored
Remove a couple of commented out, and unused lines of code. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 14 Jun, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 18 May, 2006 1 commit
-
-
Steven Whitehouse authored
Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 05 May, 2006 1 commit
-
-
Steven Whitehouse authored
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
-
- 28 Apr, 2006 1 commit
-
-
Adrian Bunk authored
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>
-
- 24 Apr, 2006 1 commit
-
-
Steven Whitehouse authored
1. Comment whitespace fix 2. Removed unused header files from dir.c 3. Split the gfs2_dir_get_buffer() function into two functions Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 18 Apr, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-
- 12 Apr, 2006 1 commit
-
-
Steven Whitehouse authored
A typo in the directory code was causing postmark to fail somewhere in the allocation code, since it was unable to find newly allocated directory leaf blocks under certain circumstances. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 11 Apr, 2006 1 commit
-
-
Steven Whitehouse authored
A small update to the journaling code to change the way that the "extra" blocks are accounted for in the journal. These are used at a rate of one per 503 metadata blocks or one per 251 journaled data blocks (or just one if the total number of journaled blocks in the transaction is smaller). Since we are using them at two different rates the old method of accounting for them no longer works and we count them up as required. Since the "per transaction" accounting can't handle this (there is no fixed number of header blocks per transaction) we have to account for it in the general journal code. We now require that each transaction reserves more blocks than it actually needs to take account of the possible extra blocks. Also a final fix to dir.c to ensure that all ref counts are handled correctly. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 07 Apr, 2006 2 commits
-
-
Steven Whitehouse authored
The last patch missed some other instances of incorrect ref counting, this fixes all of those too. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
This fixes a ref count bug that sometimes showed up a umount time (causing it to hang) but it otherwise mostly harmless. At the same time there are some clean ups including making the log operations structures const, moving a memory allocation so that its not done in the fast path of checking to see if there is an outstanding transaction related to a particular glock. Removes the sd_log_wrap varaible which was updated, but never actually used anywhere. Updates the gfs2 ioctl() to run without the kernel lock (which it never needed anyway). Removes the "invalidate inodes" loop from GFS2's put_super routine. This is done in kill super anyway so we don't need to do it here. The loop was also bogus in that if there are any inodes "stuck" at this point its a bug and we need to know about it rather than hide it by hanging forever. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 30 Mar, 2006 2 commits
-
-
Steven Whitehouse authored
In some cases 16 bit functions were being used rather than 32 bit functions. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
We didn't properly check that leaf splitting was allowed. We do now. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 28 Mar, 2006 1 commit
-
-
Steven Whitehouse authored
This reduces the size of the directory code by about 3k and gets readdir() to use the functions which were introduced in the previous directory code update. Two memory allocations are merged into one. Eliminates zeroing of some buffers which were never used before they were initialised by other data. There is still scope for further improvement in the directory code. On the logging side, a hand created mutex has been replaced by a standard Linux mutex in the log allocation code. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 20 Mar, 2006 1 commit
-
-
Steven Whitehouse authored
Due to a typo, the dir leaf split operation was (for the first split in a directory) writing the new hash vaules at the wrong offset. This is now fixed. Also some other tidy ups are included: - We use GFS2's hash function for dentries (see ops_dentry.c) so that we don't have to keep recalculating the hash values. - A lot of common code is eliminated between the various directory lookup routines. - Better error checking on directory lookup (previously different routines checked for different errors) - The leaf split operation has a couple of redundant operations removed from it, so it should be faster. There is still further scope for further clean ups in the directory code, and readdir in particular could do with slimming down a bit. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 27 Feb, 2006 2 commits
-
-
Steven Whitehouse authored
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>
-
Steven Whitehouse authored
Requested by: Prarit Bhargava <prarit@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 14 Feb, 2006 1 commit
-
-
Steven Whitehouse authored
Various endianess changes required in the directory code. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- 13 Feb, 2006 1 commit
-
-
Steven Whitehouse authored
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>
-