#
d93cfa98 |
| 11-Jun-2007 |
Abhijith Das <adas@redhat.com> |
[GFS2] Fix deallocation issues
There were two issues during deallocation of unlinked inodes. The first was relating to the use of a "try" lock which in the case of the inode lock wasn't trying hard
[GFS2] Fix deallocation issues
There were two issues during deallocation of unlinked inodes. The first was relating to the use of a "try" lock which in the case of the inode lock wasn't trying hard enough to deallocate in all circumstances (now changed to a normal glock) and in the case of the iopen lock didn't wait for the demotion of the shared lock before attempting to get the exclusive lock, and thereby sometimes (timing dependent) not completing the deallocation when it should have done.
The second issue related to the lack of a way to invalidate dcache entries on remote nodes (now fixed by this patch) which meant that unlinks were taking a long time to return disk space to the fs. By adding some code to invalidate the dcache entries across the cluster for unlinked inodes, that is now fixed.
This patch was written jointly by Abhijith Das and Steven Whitehouse.
Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
037bcbb7 |
| 08-Jun-2007 |
akpm@linux-foundation.org <akpm@linux-foundation.org> |
[GFS2] gfs2_lookupi() uninitialised var fix
fs/gfs2/inode.c: In function 'gfs2_lookupi': fs/gfs2/inode.c:392: warning: 'error' may be used uninitialized in this function
Looks like a real bug to me
[GFS2] gfs2_lookupi() uninitialised var fix
fs/gfs2/inode.c: In function 'gfs2_lookupi': fs/gfs2/inode.c:392: warning: 'error' may be used uninitialized in this function
Looks like a real bug to me.
Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
c8cdf479 |
| 08-Jun-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Recovery for lost unlinked inodes
Under certain circumstances its possible (though rather unlikely) that inodes which were unlinked by one node while still open on another might get "lost" in
[GFS2] Recovery for lost unlinked inodes
Under certain circumstances its possible (though rather unlikely) that inodes which were unlinked by one node while still open on another might get "lost" in the sense that they don't get deallocated if the node which held the inode open crashed before it was unlinked.
This patch adds the recovery code which allows automatic deallocation of the inode if its found during block allocation (the sensible time to look for such inodes since we are scanning the rgrp's bitmaps anyway at this time, so it adds no overhead to do this).
Since the inode will have had its i_nlink set to zero, all we need to trigger recovery is a lookup and an iput(), and the normal deallocation code takes care of the rest.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
e1cc8603 |
| 07-Jun-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Fix bug in error path of inode
This fixes a bug in the ordering of operations in the error path of createi. Its not valid to do an iput() when holding the inode's glock since the iput() will
[GFS2] Fix bug in error path of inode
This fixes a bug in the ordering of operations in the error path of createi. Its not valid to do an iput() when holding the inode's glock since the iput() will (in this case) result in delete_inode() being called which needs to grab the lock itself. This was causing the recursive lock checking code to trigger.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
4bd91ba1 |
| 05-Jun-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Add nanosecond timestamp feature
This adds a nanosecond timestamp feature to the GFS2 filesystem. Due to the way that the on-disk format works, older filesystems will just appear to have this
[GFS2] Add nanosecond timestamp feature
This adds a nanosecond timestamp feature to the GFS2 filesystem. Due to the way that the on-disk format works, older filesystems will just appear to have this field set to zero. When mounted by an older version of GFS2, the filesystem will simply ignore the extra fields so that it will again appear to have whole second resolution, so that its trivially backward compatible.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
bb8d8a6f |
| 01-Jun-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Fix sign problem in quota/statfs and cleanup _host structures
This patch fixes some sign issues which were accidentally introduced into the quota & statfs code during the endianess annotation
[GFS2] Fix sign problem in quota/statfs and cleanup _host structures
This patch fixes some sign issues which were accidentally introduced into the quota & statfs code during the endianess annotation process. Also included is a general clean up which moves all of the _host structures out of gfs2_ondisk.h (where they should not have been to start with) and into the places where they are actually used (often only one place). Also those _host structures which are not required any more are removed entirely (which is the eventual plan for all of them).
The conversion routines from ondisk.c are also moved into the places where they are actually used, which for almost every one, was just one single place, so all those are now static functions. This also cleans up the end of gfs2_ondisk.h which no longer needs the #ifdef __KERNEL__.
The net result is a reduction of about 100 lines of code, many functions now marked static plus the bug fixes as mentioned above. For good measure I ran the code through sparse after making these changes to check that there are no warnings generated.
This fixes Red Hat bz #239686
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
dbb7cae2 |
| 15-May-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Clean up inode number handling
This patch cleans up the inode number handling code. The main difference is that instead of looking up the inodes using a struct gfs2_inum_host we now use just
[GFS2] Clean up inode number handling
This patch cleans up the inode number handling code. The main difference is that instead of looking up the inodes using a struct gfs2_inum_host we now use just the no_addr member of this structure. The tests relating to no_formal_ino can then be done by the calling code. This has advantages in that we want to do different things in different code paths if the no_formal_ino doesn't match. In the NFS patch we want to return -ESTALE, but in the ->lookup() path, its a bug in the fs if the no_formal_ino doesn't match and thus we can withdraw in this case.
In order to later fix bz #201012, we need to be able to look up an inode without knowing no_formal_ino, as the only information that is known to us is the on-disk location of the inode in question.
This patch will also help us to fix bz #236099 at a later date by cleaning up a lot of the code in that area.
There are no user visible changes as a result of this patch and there are no changes to the on-disk format either.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
1be38679 |
| 01-Mar-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Fix bz 229831, lookup returns wrong inode
The following patch fixes Red Hat bz 229831. Without this patch its possible for the wrong inode to be returned in certain cases. It is a pretty unus
[GFS2] Fix bz 229831, lookup returns wrong inode
The following patch fixes Red Hat bz 229831. Without this patch its possible for the wrong inode to be returned in certain cases. It is a pretty unusual event, so that its taken some time to track down. Thanks and due to Josef Whiter who did a lot of the testing required to thrack this down and fix it.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
fb0d3bce |
| 28-Feb-2007 |
Wendy Cheng <wcheng@redhat.com> |
[GFS2] pass formal ino in do_filldir_main
ok, the following is the minimum changes to get NFSD going before we settle down this issue .. would appreciate this in the tree so other NFS related works
[GFS2] pass formal ino in do_filldir_main
ok, the following is the minimum changes to get NFSD going before we settle down this issue .. would appreciate this in the tree so other NFS related works can get done in parallel.
Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
ddee7608 |
| 29-Jan-2007 |
Russell Cattelan <cattelan@redhat.com> |
[GFS2] Fix unlink deadlocks
Move the glock acquisition to outside of the transactions.
Lock odering must be preserved in order to prevent ABBA deadlocks. The current gfs2_change_nlink code would tr
[GFS2] Fix unlink deadlocks
Move the glock acquisition to outside of the transactions.
Lock odering must be preserved in order to prevent ABBA deadlocks. The current gfs2_change_nlink code would tries to grab the glock after having started a transaction and thus is holding the log lock. This is inconsistent with other code paths in gfs that grab the resource group glock prior to staring a tranactions.
One problem with this fix is that the resource group lock is always grabbed now even if the inode still has ref count and can not be marked for unlink.
Signed-off-by: Russell Cattelan <cattelan@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
d7c103d0 |
| 25-Jan-2007 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Fix recursive locking attempt with NFS
In certain cases, its possible for NFS to call the lookup code while holding the glock (when doing a readdirplus operation) so we need to check for that
[GFS2] Fix recursive locking attempt with NFS
In certain cases, its possible for NFS to call the lookup code while holding the glock (when doing a readdirplus operation) so we need to check for that and not try and lock the glock twice. This also fixes a typo in a previous NFS related GFS2 patch.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
ddfe0627 |
| 18-Jan-2007 |
Eric Sandeen <sandeen@redhat.com> |
[GFS2] use CURRENT_TIME_SEC instead of get_seconds in gfs2
I was looking something else up and came across this...
I don't honestly have a good reason to change it other than to make it like every
[GFS2] use CURRENT_TIME_SEC instead of get_seconds in gfs2
I was looking something else up and came across this...
I don't honestly have a good reason to change it other than to make it like every other Linux filesystem in this regard. ;-) It doesn't functionally change anything, but makes some lines shorter. :)
I'm also curious; why does gfs2 have 64-bits of on-disk timestamps, but not in timespec_t format, and only stores second resolutions? Seems like you're halfway to sub-second resolutions already.
I suppose if that gets implemented then all of the below should instead be CURRENT_TIME not CURRENT_TIME_SEC.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
03dc6a53 |
| 13-Jan-2007 |
Adrian Bunk <bunk@stusta.de> |
[GFS2] make gfs2_change_nlink_i() static
On Thu, Jan 11, 2007 at 10:26:27PM -0800, Andrew Morton wrote: >... > Changes since 2.6.20-rc3-mm1: >... > git-gfs2-nmw.patch >... > git trees >...
This p
[GFS2] make gfs2_change_nlink_i() static
On Thu, Jan 11, 2007 at 10:26:27PM -0800, Andrew Morton wrote: >... > Changes since 2.6.20-rc3-mm1: >... > git-gfs2-nmw.patch >... > git trees >...
This patch makes the needlessly globlal gfs2_change_nlink_i() static.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
87d21e07 |
| 18-Jan-2007 |
S. Wendy Cheng <wcheng@redhat.com> |
[GFS2] Fix gfs2_rename deadlock
Second round of gfs2_rename lock re-ordering to allow Anaconda adding root partition on top of gfs2. Previous to this patch the recursive lock detector in glock.c can
[GFS2] Fix gfs2_rename deadlock
Second round of gfs2_rename lock re-ordering to allow Anaconda adding root partition on top of gfs2. Previous to this patch the recursive lock detector in glock.c can be triggered due to attempting to lock the rgrp twice. This fixes it by checking to see whether the rgrp is already locked.
This fixes Red Hat bugzilla #221237
Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
6c93fd1e |
| 08-Jan-2007 |
Russell Cattelan <cattelan@redhat.com> |
[GFS2] BZ 217008 fsfuzzer fix.
Update the quilt header comments to match the code changes.
Change gfs2_lookup_simple to return an error in the case of a NULL inode. The callers of gfs2_lookup_simpl
[GFS2] BZ 217008 fsfuzzer fix.
Update the quilt header comments to match the code changes.
Change gfs2_lookup_simple to return an error in the case of a NULL inode. The callers of gfs2_lookup_simple do not check for NULL in the no entry case and such would end up dereferencing a NULL ptr.
This fixes: http://projects.info-pull.com/mokb/MOKB-15-11-2006.html
Signed-off-by: Russell Cattelan <cattelan@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
5509826f |
| 18-Jan-2007 |
S. Wendy Cheng <wcheng@redhat.com> |
[GFS2] Fix change nlink deadlock
Bugzilla 215088
Fix deadlock in gfs2_change_nlink() while installing RHEL5 into GFS2 partition. The gfs2_rename() apparently needs block allocation for the new name
[GFS2] Fix change nlink deadlock
Bugzilla 215088
Fix deadlock in gfs2_change_nlink() while installing RHEL5 into GFS2 partition. The gfs2_rename() apparently needs block allocation for the new name (into the directory) where it requires rg locks. At the same time, while updating the nlink count for the replaced file, gfs2_change_nlink() tries to return the inode meta-data back to resource group where it needs rg locks too. Our logic doesn't allow process to acquire these locks recursively by the same process (RHEL installer) that results a BUG call. This only happens within rename code path and only if the destination file exists before the rename operation.
Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
28626e20 |
| 22-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Fix glock ordering on inode creation
The lock order here should be parent -> child rather than numeric order.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
|
#
dcd24799 |
| 16-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Remove unused function from inode.c
The gfs2_glock_nq_m_atime function is unused in so far as its only ever called with num_gh = 1, and this falls through to the gfs2_glock_nq_atime function,
[GFS2] Remove unused function from inode.c
The gfs2_glock_nq_m_atime function is unused in so far as its only ever called with num_gh = 1, and this falls through to the gfs2_glock_nq_atime function, so we might as well call that directly.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
9e2dbdac |
| 08-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Remove gfs2_inode_attr_in
This function wasn't really doing the right thing. There was no need to update the inode size at this point and the updating of the i_blocks field has now been moved
[GFS2] Remove gfs2_inode_attr_in
This function wasn't really doing the right thing. There was no need to update the inode size at this point and the updating of the i_blocks field has now been moved to the places where di_blocks is updated. A result of this patch and some those preceeding it is that unlocking a glock is now a much more efficient process, since there is no longer any requirement to copy data from the gfs2 inode into the vfs inode at this point.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
e7c698d7 |
| 08-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Inode number is constant
Since the inode number is constant, we don't need to keep updating it everytime we refresh the other inode fields.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.
[GFS2] Inode number is constant
Since the inode number is constant, we don't need to keep updating it everytime we refresh the other inode fields.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
6b124d8d |
| 08-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Only set inode flags when required
We were setting the inode flags from GFS2's flags far too often, even when they couldn't possibly have changed. This patch reduces the amount of flag settin
[GFS2] Only set inode flags when required
We were setting the inode flags from GFS2's flags far too often, even when they couldn't possibly have changed. This patch reduces the amount of flag setting going on so that we do it only when the inode is read in or when the flags have changed. The create case is covered by the "when the inode is read in" case.
This also fixes a bug where we didn't set S_SYNC correctly.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
294caaa3 |
| 02-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Tidy up 0 initialisations in inode.c
We don't need to use endian conversions for 0 initialisations when creating a new on-disk inode.
Cc: Christoph Hellwig <hch@infradead.org> Cc: Alexey Dob
[GFS2] Tidy up 0 initialisations in inode.c
We don't need to use endian conversions for 0 initialisations when creating a new on-disk inode.
Cc: Christoph Hellwig <hch@infradead.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
bfded27b |
| 01-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Shrink gfs2_inode (8) - i_vn
This shrinks the size of the gfs2_inode by 8 bytes by replacing the version counter with a one bit valid/invalid flag.
Signed-off-by: Steven Whitehouse <swhiteho
[GFS2] Shrink gfs2_inode (8) - i_vn
This shrinks the size of the gfs2_inode by 8 bytes by replacing the version counter with a one bit valid/invalid flag.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
show more ...
|
#
a9583c79 |
| 01-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Shrink gfs2_inode (7) - di_payload_format
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 i
[GFS2] Shrink gfs2_inode (7) - di_payload_format
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>
show more ...
|
#
1a7b1eed |
| 01-Nov-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
[GFS2] Shrink gfs2_inode (6) - di_atime/di_mtime/di_ctime
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 Wh
[GFS2] Shrink gfs2_inode (6) - di_atime/di_mtime/di_ctime
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>
show more ...
|