[PATCH 07/29] GFS2: add missing newline

2014-04-01 Thread Steven Whitehouse
From: David Teigland Log message is missing newline. Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 2a6ba06..6b97d98 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c @@ -1102,7 +1102,7 @@ static void

[PATCH 06/29] GFS2: Mark functions as static in gfs2/rgrp.c

2014-04-01 Thread Steven Whitehouse
previous prototype for ‘update_rgrp_lvb’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index c13e4c5..f585746 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1102,7 +1102,7

[PATCH 08/29] GFS2: Reduce struct gfs2_trans in size

2014-04-01 Thread Steven Whitehouse
A couple of "int" fields were being used as boolean values so we can make them bitfields of one bit, and put them in what might otherwise be a hole in the structure with 64 bit alignment. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index cf0e34

[PATCH 09/29] GFS2: Move log buffer lists into transaction

2014-04-01 Thread Steven Whitehouse
buffer lists are merged into the currently accumulating transaction. That transaction then is passed into the before and after commit functions at journal flush time. Thus there should be no change in overall behaviour yet. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glops.c b/fs/gfs2

[PATCH 04/29] GFS2: Lock i_mutex and use a local gfs2_holder for fallocate

2014-04-01 Thread Steven Whitehouse
From: Bob Peterson This patch causes GFS2 to lock the i_mutex during fallocate. It also switches from using a dinode's inode glock to using a local holder like the other GFS2 i_operations. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/file.c b/fs

[PATCH 05/29] GFS2: Add meta readahead field in directory entries

2014-04-01 Thread Steven Whitehouse
add the readahead in due course. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index fa32655..ffcfdd1 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -1684,6 +1684,14 @@ static int dir_new_leaf(struct inode *inode, const struct qstr *name) return 0

[PATCH 03/29] GFS2: journal data writepages update

2014-04-01 Thread Steven Whitehouse
problem in the past in the writeback code path, which is why I've hesitated to do it here. Signed-off-by: Steven Whitehouse diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e0259a1..82a1456 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -94,6 +94,8 @@ static inline struct

[PATCH 10/29] GFS2: Move log buffer accounting to transaction

2014-04-01 Thread Steven Whitehouse
easier understand. Also, by reducing the number of variables used to track the buffers being added and removed from the journal, a number of error checks are now no longer required. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 99aab64..d0c3928 100644 --- a

[PATCH 11/29] fs: NULL dereference in posix_acl_to_xattr()

2014-04-01 Thread Steven Whitehouse
From: Dan Carpenter This patch moves the dereference of "buffer" after the check for NULL. The only place which passes a NULL parameter is gfs2_set_acl(). Cc: stable Signed-off-by: Dan Carpenter Signed-off-by: Steven Whitehouse diff --git a/fs/posix_acl.c b/fs/posix_acl.c ind

[PATCH 12/29] GFS2: Remove extra "if" in gfs2_log_flush()

2014-04-01 Thread Steven Whitehouse
By reordering some of the assignments in gfs2_log_flush() it is possible to remove one of the "if" statements as it can be merged with one higher up the function. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index c1c9a29..edbd461 100644 --- a/fs/gfs2/l

[PATCH 13/29] GFS2: replace kmalloc - __vmalloc / memset 0

2014-04-01 Thread Steven Whitehouse
From: Fabian Frederick Use kzalloc and __vmalloc __GFP_ZERO for clean sd_quota_bitmap allocation. Signed-off-by: Fabian Frederick Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 8bec0e31..a5cccf6 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c

[PATCH 14/29] GFS2: Clean up journal extent mapping

2014-04-01 Thread Steven Whitehouse
also updated to show more detail about what went wrong. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index fe0500c..c62d4b9 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1328,6 +1328,121 @@ int gfs2_file_dealloc(struct gfs2_inode *ip

[PATCH 16/29] GFS2: global conversion to pr_foo()

2014-04-01 Thread Steven Whitehouse
From: Fabian Frederick -All printk(KERN_foo converted to pr_foo(). -Messages updated to fit in 80 columns. -fs_macros converted as well. -fs_printk removed. Signed-off-by: Fabian Frederick Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index ffcfdd1..39c7081

[PATCH 17/29] GFS2: Move recovery variables to journal structure in memory

2014-04-01 Thread Steven Whitehouse
s the necessary variables so that each journal has its own separate area for tracking its journal replay. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 456d8fa..ef26ed9 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -

[PATCH 21/29] GFS2: check NULL return value in gfs2_ok_to_move

2014-04-01 Thread Steven Whitehouse
From: Abhi Das gfs2_lookupi() can return NULL if the path to the root is broken by another rename/rmdir. In this case gfs2_ok_to_move() must check for this NULL pointer and return error. Resolves: rhbz#1060246 Signed-off-by: Abhi Das Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2

[PATCH 15/29] GFS2: return -E2BIG if hit the maximum limits of ACLs

2014-04-01 Thread Steven Whitehouse
Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index ba94566..9c59ebe 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -86,7 +86,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) BUG_ON(name == NULL); if (acl->a_co

[PATCH 22/29] GFS2: Ensure workqueue is scheduled after noexp request

2014-04-01 Thread Steven Whitehouse
glock state machine to finish the transition. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 52f7478..aec7f73 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1047,9 +1047,13 @@ int gfs2_glock_nq(struct gfs2_holde

[PATCH 20/29] GFS2: Convert gfs2_lm_withdraw to use fs_err

2014-04-01 Thread Steven Whitehouse
From: Joe Perches vprintk use is not prefixed by a KERN_, so emit these messages at KERN_ERR level. Using %pV can save some code and allow fs_err to be used, so do it. Signed-off-by: Joe Perches Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 256354c

[PATCH 23/29] GFS2: Re-add a call to log_flush_wait when flushing the journal

2014-04-01 Thread Steven Whitehouse
, which itself leads to infinite loops in journal replay, both in the kernel code and fsck.gfs2 code. This patch re-adds that call. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index edbd461..4a14d50 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2

[PATCH 19/29] GFS2: Use fs_ more often

2014-04-01 Thread Steven Whitehouse
From: Joe Perches Convert a couple of uses of pr_ to fs_ Add and use fs_emerg. Signed-off-by: Joe Perches Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 73ed925..27f9435 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1083,8 +1083,8 @@ static int

[PATCH 24/29] GFS2: Increase the max number of ACLs

2014-04-01 Thread Steven Whitehouse
-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 9c59ebe..394dc55 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -85,7 +85,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) BUG_ON(name == NULL); - if

[PATCH 25/29] GFS2: Remove extraneous function gfs2_security_init

2014-04-01 Thread Steven Whitehouse
From: Bob Peterson This patch eliminates function gfs2_security_init in favor of just calling security_inode_init_security directly. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index b52ebf8..69ed57a 100644 --- a/fs/gfs2/inode.c

[PATCH 26/29] GFS2: inline function gfs2_set_mode

2014-04-01 Thread Steven Whitehouse
From: Bob Peterson Here is a revised patch based on Steve's feedback: This patch eliminates function gfs2_set_mode which was only called in one place, and always returned 0. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 39

[PATCH 18/29] GFS2: Use pr_ more consistently

2014-04-01 Thread Steven Whitehouse
From: Joe Perches Add pr_fmt, remove embedded "GFS2: " prefixes. This now consistently emits lower case "gfs2: " for each message. Other miscellanea around these changes: o Add missing newlines o Coalesce formats o Realign arguments Signed-off-by: Joe Perches Signed-off-b

[PATCH 27/29] GFS2: Fix return value in slot_get()

2014-04-01 Thread Steven Whitehouse
From: Abhi Das ENOSPC was being returned in slot_get inspite of successful execution of the function. This patch fixes this return code. Signed-off-by: Abhi Das Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 27f9435..c4e 100644 --- a/fs/gfs2/quota.c

[PATCH 28/29] GFS2: Fix uninitialized VFS inode in gfs2_create_inode

2014-04-01 Thread Steven Whitehouse
Signed-off-by: Abhi Das Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index ef26ed9..bdf70c1 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -371,6 +371,7 @@ enum { GIF_ALLOC_FAILED= 2, GIF_SW_PAGED= 3

[PATCH 29/29] GFS2: Fix address space from page function

2014-04-01 Thread Steven Whitehouse
Now that rgrps use the address space which is part of the super block, we need to update gfs2_mapping2sbd() to take account of that. The only way to do that easily is to use a different set of address_space_operations for rgrps. Reported-by: Abhi Das Tested-by: Abhi Das Signed-off-by: Steven

GFS2: Pre-pull patch posting (merge window)

2014-04-01 Thread Steven Whitehouse
Hi, Here is the current content of the GFS2 -nmw tree for the current merge window. One of the main highlights this time, is not the patches themselves but instead the widening contributor base. It is good to see that interest is increasing in GFS2, and I'd like to thank all the contributors to t

Re: [PATCH 0/3] gfs: More logging neatening

2014-03-07 Thread Steven Whitehouse
Hi, On Thu, 2014-03-06 at 12:10 -0800, Joe Perches wrote: > Joe Perches (3): > gfs2: Use pr_ more consistently > gfs2: Use fs_ more often > gfs2: Convert gfs2_lm_withdraw to use fs_err > > fs/gfs2/dir.c| 14 > fs/gfs2/glock.c | 8 +++-- > fs/gfs2/lock_dlm.c | 9 ++

Re: [PATCH 1/1] fs: gfs2: global conversion to pr_foo()

2014-03-06 Thread Steven Whitehouse
Hi, On Thu, 2014-03-06 at 17:24 +0800, Fabian Frederick wrote: > On Thu, 06 Mar 2014 15:44:04 + > Steven Whitehouse wrote: > > > Hi, > > > > On Wed, 2014-03-05 at 22:06 +0800, Fabian Frederick wrote: > > > -All printk(KERN_foo converted to pr_foo().

Re: [PATCH 1/1] fs: gfs2: global conversion to pr_foo()

2014-03-06 Thread Steven Whitehouse
Hi, On Thu, 2014-03-06 at 09:47 -0800, Joe Perches wrote: > On Thu, 2014-03-06 at 15:44 +0000, Steven Whitehouse wrote: > > On Wed, 2014-03-05 at 22:06 +0800, Fabian Frederick wrote: > > > -All printk(KERN_foo converted to pr_foo(). > > > -Messages updated to fit in 8

Re: [PATCH 1/1] fs: gfs2: global conversion to pr_foo()

2014-03-06 Thread Steven Whitehouse
Hi, On Wed, 2014-03-05 at 22:06 +0800, Fabian Frederick wrote: > -All printk(KERN_foo converted to pr_foo(). > -Messages updated to fit in 80 columns. > -fs_macros converted as well. > -fs_printk removed. > > Signed-off-by: Fabian Frederick Due to various other patches, this didn't apply direct

Re: [PATCH 1/1] fs/gfs2/quota.c: replace kmalloc - __vmalloc / memset 0

2014-02-27 Thread Steven Whitehouse
Hi, On Wed, 2014-02-26 at 19:07 +0100, Fabian Frederick wrote: > Use kzalloc and __vmalloc __GFP_ZERO for clean sd_quota_bitmap allocation. > > Signed-off-by: Fabian Frederick > --- > fs/gfs2/quota.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > Thanks for the patch. I've ad

Re: [PATCH 10/21] fs: Mark functions as static in gfs2/rgrp.c

2014-02-10 Thread Steven Whitehouse
Hi, On Sun, 2014-02-09 at 18:40 +0530, Rashika Kheria wrote: > Mark functions as static in gfs2/rgrp.c because they are not used > outside this file. > > This eliminates the following warning in gfs2/rgrp.c: > fs/gfs2/rgrp.c:1092:5: warning: no previous prototype for ‘gfs2_rgrp_bh_get’ > [-Wmiss

Re: [PATCH v2] ceph: fix posix ACL hooks

2014-02-04 Thread Steven Whitehouse
On Mon, 2014-02-03 at 22:40 +, Al Viro wrote: > > >> +static int gfs2_vfs_permission(struct dentry *dentry, struct inode > > >> *inode, int mask) > > >> +{ > > >> + return gfs2_permission(inode, mask); > > >> +} > > > > > > Er... You do realize that callers of gfs2_permission() tend to ha

[PATCH] Fix race when checking i_size on direct i/o read

2014-01-24 Thread Steven Whitehouse
tems a problem as the test is performed after ->direct_IO has been called. It is possible that there is a race that does matter to btrfs, however this patch doesn't change that, so its still an overall improvement. Signed-off-by: Steven Whitehouse Reported-by: Zheng Liu Cc: Jan Kara C

Re: [PATCH 17/24] GFS2: Use RCU/hlist_bl based hash for quotas

2014-01-22 Thread Steven Whitehouse
Hi, On Tue, 2014-01-21 at 21:32 -0800, Paul E. McKenney wrote: > On Mon, Jan 20, 2014 at 12:23:40PM +0000, Steven Whitehouse wrote: > > Prior to this patch, GFS2 kept all the quotas for each > > super block in a single linked list. This is rather slow > > when there are la

Re: [PATCH 17/24] GFS2: Use RCU/hlist_bl based hash for quotas

2014-01-22 Thread Steven Whitehouse
Hi, On Wed, 2014-01-22 at 01:06 -0500, Sasha Levin wrote: > On 01/22/2014 12:32 AM, Paul E. McKenney wrote: > > On Mon, Jan 20, 2014 at 12:23:40PM +0000, Steven Whitehouse wrote: > >> >Prior to this patch, GFS2 kept all the quotas for each > >> >super block in a s

GFS2: Pull request (merge window)

2014-01-20 Thread Steven Whitehouse
grp GFS2: Drop inadequate rgrps from the reservation tree GFS2: Implement a "rgrp has no extents longer than X" scheme GFS2: Increase i_writecount during gfs2_setattr_chown GFS2: Small cleanup J. Bruce Fields (1): GFS2: revert "GFS2: d_splice_alias() can

[PATCH 06/24] GFS2: Remove test which is always true

2014-01-20 Thread Steven Whitehouse
Since gfs2_inplace_reserve() is always called with a valid alloc parms structure, there is no need to test for this within the function itself - and in any case, after we've all ready dereferenced it anyway. Reported-by: Dan Carpenter Signed-off-by: Steven Whitehouse diff --git a/fs

[PATCH 01/24] GFS2: If requested is too large, use the largest extent in the rgrp

2014-01-20 Thread Steven Whitehouse
akes it so that if we can't find a contiguous chunk of blocks big enough to satisfy the sizehint, we'll use the largest chunk of blocks we found that will still contain the write. It does so by keeping track of the largest run of blocks within the rgrp. Signed-off-by: Bob Peterson S

[PATCH 05/24] GFS2: Remove gfs2_quota_change_host structure

2014-01-20 Thread Steven Whitehouse
There is only one place this is used, when reading in the quota changes at mount time. It is not really required and much simpler to just convert the fields from the on-disk structure as required. There should be no functional change as a result of this patch. Signed-off-by: Steven Whitehouse

[PATCH 03/24] GFS2: Implement a "rgrp has no extents longer than X" scheme

2014-01-20 Thread Steven Whitehouse
-block reservations will fail. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index ba1ea67..0132816 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -93,6 +93,7 @@ struct gfs2_rgrpd { struct gfs2_rgrp_lvb *rd_rgl

[PATCH 04/24] GFS2: Clean up releasepage

2014-01-20 Thread Steven Whitehouse
its of unreachable code and make this more readable. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 73f3e4e..cf858da 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -1080,30 +1080,22 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_m

[PATCH 09/24] GFS2: Add directory addition info structure

2014-01-20 Thread Steven Whitehouse
bug where the link used during inode creation was adding requesting too many blocks in some cases. This is harmless unless the fs is close to being full. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 2e5fc26..0b6be20 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2

[PATCH 13/24] GFS2: For exhash conversion, only one block is needed

2014-01-20 Thread Steven Whitehouse
request the full reservation size in this case. Potentially we could calculate more accurately the value to use in other cases too, but that is much more complicated to do and it is doubtful that the benefit would outweigh the extra cost in code complexity. Signed-off-by: Steven Whitehouse diff

[PATCH 11/24] GFS2: Remember directory insert point

2014-01-20 Thread Steven Whitehouse
provide a performance improvement which will be greater as the size of the directory increases. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 0b6be20..d5988aa 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -1659,26 +1659,34 @@ static int dir_new_leaf(struct

[PATCH 10/24] GFS2: Consolidate transaction blocks calculation for dir add

2014-01-20 Thread Steven Whitehouse
single function rather than repeating it three times. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9ac8f13..fa4624f 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -469,6 +469,28 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_inode *ip

[PATCH 08/24] GFS2: Use only a single address space for rgrps

2014-01-20 Thread Steven Whitehouse
more complicated operation as it requires changing a lot more code paths. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 1b192c8d..b792dbc 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -133,7 +133,8 @@ void gfs2_ail_flush(struct gfs2_glock *gl, bool

[PATCH 12/24] GFS2: Increase i_writecount during gfs2_setattr_chown

2014-01-20 Thread Steven Whitehouse
also ensures that a multi-block reservation exists when needed for quota change operations during the chown. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 4acc584..51cf10d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.

[PATCH 16/24] GFS2: No need to invalidate pages for a dio read

2014-01-20 Thread Steven Whitehouse
We recently fixed the writeback of pages prior to performing direct i/o, however the initial fix was perhaps a bit heavy handed. There is no need to invalidate pages if the direct i/o is only a read, since they will be identical to what has been flushed to disk anyway. Signed-off-by: Steven

[PATCH 15/24] GFS2: Add initialization for address space in super block

2014-01-20 Thread Steven Whitehouse
Spotted by Andy Price. This should fix the odd messages from lockdep caused by 70d4ee94b370c5ef54d0870600f16bd92d18013c Signed-off-by: Steven Whitehouse Cc: Andrew Price diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 94aab31..3b820b6 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs

[PATCH 18/24] GFS2: Only run logd and quota when mounted read/write

2014-01-20 Thread Steven Whitehouse
waits for it to give up its reference on the quotas. Signed-off-by: Steven Whitehouse Cc: Abhijith Das diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 3b820b6..27648e8 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -969,40 +969,6 @@ fail: return error

[PATCH 19/24] GFS2: Clean up quota slot allocation

2014-01-20 Thread Steven Whitehouse
vmalloc fallback, just in case of memory fragmentation. We are then able to use the kernel's own find/test/set/clear bit functions, rather than rolling our own. Signed-off-by: Steven Whitehouse Cc: Abhijith Das diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 59d99ec..4b9aa5b 1

[PATCH 20/24] GFS2: Move quota bitmap operations under their own lock

2014-01-20 Thread Steven Whitehouse
the subject of a later patch, however this patch removes another barrier to doing that. Signed-off-by: Steven Whitehouse Cc: Abhijith Das diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 4b9aa5b..8c64e26 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -734,6 +734,7 @@ struct

[PATCH 21/24] GFS2: Fix kbuild test robot reported warning

2014-01-20 Thread Steven Whitehouse
'gfs2_quota_cleanup': >> fs/gfs2/quota.c:1361:4: error: implicit declaration of function 'vfree' >> [-Werror=implicit-function-declaration] vfree(sdp->sd_quota_bitmap); Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c

[PATCH 24/24] GFS2: revert "GFS2: d_splice_alias() can't return error"

2014-01-20 Thread Steven Whitehouse
imum it should be able to return -ELOOP in the case where inserting the given dentry would cause a directory loop. Signed-off-by: J. Bruce Fields Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index b8956f2..890588c 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2

[PATCH 17/24] GFS2: Use RCU/hlist_bl based hash for quotas

2014-01-20 Thread Steven Whitehouse
this is no longer used for its original role, it should be possible to shrink the number of items on that list in due course and remove the requirement to take qd_lock in qd_get. Signed-off-by: Steven Whitehouse Cc: Abhijith Das Cc: Paul E. McKenney diff --git a/fs/gfs2/incore.h b/fs/gfs2

[PATCH 22/24] GFS2: Don't use ENOBUFS when ENOMEM is the correct error code

2014-01-20 Thread Steven Whitehouse
XSI STREAMS option))" and since > we don't support STREAMS it's probably fair game, but... what the hell? Signed-off-by: Steven Whitehouse Cc: Al Viro diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 6f7a47c..ca0be6c 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c

[PATCH 23/24] GFS2: Small cleanup

2014-01-20 Thread Steven Whitehouse
From: Bob Peterson This is a small cleanup to function gfs2_rgrp_go_lock so that it uses rgd instead of its more complicated twin. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index e14e887..a1da213 100644 --- a/fs/gfs2/rgrp.c

[PATCH 14/24] GFS2: Add hints to directory leaf blocks

2014-01-20 Thread Steven Whitehouse
r the most recent insertion/deletion. For backwards compatibility, any of these new fields which is zero should be considered to be "unknown". Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index b2e5ebf..fa32655 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/di

[PATCH 07/24] GFS2: Use range based functions for rgrp sync/invalidation

2014-01-20 Thread Steven Whitehouse
extent information in the glock so that is is available for a final invalidation. This patch uses a field which is otherwise unused in rgrp glocks to do that, so that we do not have to expand the size of a glock. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index

GFS2: Pre-pull patch posting (merge window)

2014-01-20 Thread Steven Whitehouse
Hi, Here are the pending patches for the merge window which are currently in the GFS2 tree. The main topics this time are allocation, in the form of Bob's improvements when searching resource groups and several updates to quotas which should increase scalability. The quota changes follow on from

[PATCH 02/24] GFS2: Drop inadequate rgrps from the reservation tree

2014-01-20 Thread Steven Whitehouse
to after label skip_rgrp so that the disqualified reservation is properly removed from the tree, thus keeping the rgrp rd_reserved count sane. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 809fecd..1ccf89a 100644 --- a/fs/gfs2/

Re: [PATCH] dcache: fix d_splice_alias handling of aliases

2014-01-17 Thread Steven Whitehouse
Hi, On Thu, 2014-01-16 at 13:51 -0500, J. Bruce Fields wrote: > On Thu, Jan 16, 2014 at 11:54:07AM -0500, Bob Peterson wrote: > > - Original Message - > > | Something like this? > > (snip) > > | @@ -779,6 +782,11 @@ static struct dentry *__gfs2_lookup(struct inode > > *dir, > > | struct d

Re: [PATCH] dcache: fix d_splice_alias handling of aliases

2014-01-16 Thread Steven Whitehouse
noticed: > > commit 0d0d110720d7960b77c03c9f2597faaff4b484ae > Author: Miklos Szeredi > Date: Mon Sep 16 14:52:00 2013 +0200 > > GFS2: d_splice_alias() can't return error > > unless it was given an IS_ERR(inode), which isn't the case here.

Re: [Cluster-devel] Curious lockdep report

2014-01-09 Thread Steven Whitehouse
Hi, On Thu, 2014-01-09 at 11:43 +, Steven Whitehouse wrote: > Hi, > > I'm trying to track down the cause of the lockdep report which I've > included below. It is a bit odd since it doesn't say which lock it > refers to, although my suspicions are that it is

Curious lockdep report

2014-01-09 Thread Steven Whitehouse
Hi, I'm trying to track down the cause of the lockdep report which I've included below. It is a bit odd since it doesn't say which lock it refers to, although my suspicions are that it is the mapping's tree_lock. The other thing I know is that it goes away if I revert this patch: https://git.kern

GFS2: Pull request (fixes)

2014-01-02 Thread Steven Whitehouse
en calling gfs2_remove_from_ail GFS2: Fix slab memory leak in gfs2_bufdata Steven Whitehouse (3): GFS2: don't hold s_umount over blkdev_put GFS2: Fix incorrect invalidation for DIO/buffered I/O GFS2: Wait for async DIO in glock state changes Tetsuo Handa (1): GFS2: Fix unsafe

[PATCH 5/6] GFS2: Wait for async DIO in glock state changes

2014-01-02 Thread Steven Whitehouse
ed to wait if the state is not deferred, since DIO is valid anyway in that state. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index db908f6..f88dcd9 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -192,8 +192,11 @@ static void inode_go_sync(struct gfs2_gloc

[PATCH 3/6] GFS2: Fix slab memory leak in gfs2_bufdata

2014-01-02 Thread Steven Whitehouse
processes can call gfs2_remove_from_journal. In order to avoid double-frees, only the process that does the unpinning is allowed to free the bd. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 9324150..52f177b 100644 --- a/fs

[PATCH 4/6] GFS2: Fix incorrect invalidation for DIO/buffered I/O

2014-01-02 Thread Steven Whitehouse
unmap, flush and invalidate those pages. Since the glock state machine normally does that for us, mostly the code will be a no-op. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index b7fc035..73f3e4e 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -986,6 +986,7

[PATCH 2/6] GFS2: Fix use-after-free race when calling gfs2_remove_from_ail

2014-01-02 Thread Steven Whitehouse
this error: slab error in kmem_cache_destroy(): cache `gfs2_bufdata': Can't free all objects Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 610613f..9dcb977 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -551,10 +551,10 @@ void g

[PATCH 6/6] GFS2: Fix unsafe dereference in dump_holder()

2014-01-02 Thread Steven Whitehouse
From: Tetsuo Handa GLOCK_BUG_ON() might call this function without RCU read lock. Make sure that RCU read lock is held when using task_struct returned from pid_task(). Signed-off-by: Tetsuo Handa Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index c8420f7

[PATCH 1/6] GFS2: don't hold s_umount over blkdev_put

2014-01-02 Thread Steven Whitehouse
Tejun Heo Reported-by: Al Viro Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 82303b4..52fa883 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1366,8 +1366,18 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type,

GFS2: Pre-pull patch posting (fixes)

2014-01-02 Thread Steven Whitehouse
Hi, Here is a set of small fixes for GFS2. There is a fix to drop s_umount which is copied in from the core vfs, two patches relate to a hard to hit "use after free" and memory leak. Two patches related to using DIO and buffered I/O on the same file to ensure correct operation in relation to glock

Re: [PATCH] GFS2: Fix unsafe dereference in dump_holder()

2014-01-02 Thread Steven Whitehouse
Hi, Thanks - that looks good. I've applied it to the GFS2 -nmw and -fixes trees, Steve. On Thu, 2014-01-02 at 19:52 +0900, Tetsuo Handa wrote: > Steven Whitehouse wrote: > > > Subject: [PATCH] GFS2: Fix unsafe dereference in dump_holder() > > > > > > Since

Re: [PATCH] GFS2: Fix unsafe dereference in dump_holder()

2014-01-02 Thread Steven Whitehouse
Hi, On Tue, 2013-12-24 at 20:51 +0900, Tetsuo Handa wrote: > >From efee681e4ca6152d9549a50e93ca932b00f03014 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Tue, 24 Dec 2013 18:04:43 +0900 > Subject: [PATCH] GFS2: Fix unsafe dereference in dump_holder() > > Since we are not in RCU nor taskl

Re: [PATCH v13 12/16] fs: mark list_lru based shrinkers memcg aware

2013-12-11 Thread Steven Whitehouse
Hi, On Tue, 2013-12-10 at 15:17 +1100, Dave Chinner wrote: > On Mon, Dec 09, 2013 at 12:05:53PM +0400, Vladimir Davydov wrote: > > Since now list_lru automatically distributes objects among per-memcg > > lists and list_lru_{count,walk} employ information passed in the > > shrink_control argument t

Re: gfs2 deadlock (was Re: Found it)

2013-12-05 Thread Steven Whitehouse
Hi, On Thu, 2013-12-05 at 08:12 +, Al Viro wrote: > On Tue, Dec 03, 2013 at 04:28:30AM +, Al Viro wrote: > > > These should be safe, but damnit, we really need the lifecycle documented > > for > > all objects - the above is only a part of it (note that for e.g. superblocks > > we have ad

GFS2: Pull request (fixes)

2013-11-22 Thread Steven Whitehouse
Hi, Please consider pulling the following fixes, Steve. The following changes since commit ea0341e071527d5cec350917b01ab901af09d758: GFS2: Fix ref count bug relating to atomic_open (2013-11-21 18:47:57 +) are available

[PATCH 2/2] GFS2: Fix ref count bug relating to atomic_open

2013-11-22 Thread Steven Whitehouse
In the case that atomic_open calls finish_no_open() with the dentry that was supplied to gfs2_atomic_open() an extra reference count is required. This patch fixes that issue preventing a bug trap triggering at umount time. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/inode.c b/fs/gfs2

[PATCH 1/2] GFS2: fix potential NULL pointer dereference

2013-11-22 Thread Steven Whitehouse
o gi->gl needs to be used instead (which is guaranteed not to be NULL because fo the while loop checking that condition). Signed-off-by: Michal Nazarewicz Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e66a800..c8420f7 100644 --- a/fs/gfs2/glock.

GFS2: Pre-pull patch posting (fixes)

2013-11-22 Thread Steven Whitehouse
Hi, Here are a couple of very small, but important, fixes, Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www

Re: [Cluster-devel] [PATCH 0/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Steven Whitehouse
Hi, On Fri, 2013-11-15 at 06:11 -0800, Christoph Hellwig wrote: > On Fri, Nov 15, 2013 at 12:29:48PM +0800, Jeff Liu wrote: > > Hi Folks, > > > > This patch is trying to introduce a new list helper to retrieve the > > last entry or return NULL if the list is empty corresponding to it, > > which i

Re: [RFC] Coverity 1128444 - Dereference after null check (FORWARD_NULL) in glock.c

2013-11-12 Thread Steven Whitehouse
Hi, On Tue, 2013-11-12 at 12:53 -0200, Geyslan Gregório Bem wrote: > Hello, > > Coverity detected in 'fs/gfs2/glock.c' a possible dereference after > null check. Maybe a positive one. > > There is a initial check for possible 'gl' NULL. After that 'gl' is > dereferenced in the looping check by _

Re: [PATCH] gfs2: fix potential NULL pointer dereference

2013-11-12 Thread Steven Whitehouse
Hi, Yes, good catch. Thanks, I'll add it to the tree, Steve. On Tue, 2013-11-12 at 13:30 +0100, Michal Nazarewicz wrote: > From: Michal Nazarewicz > > Commit [e66cf1610: GFS2: Use lockref for glocks] replaced call: > atomic_read(&gi->gl->gl_ref) == 0 > with: > __lockref_is_dead(&gl->gl

GFS2: Pull request (merge window)

2013-11-05 Thread Steven Whitehouse
reset flags on active reservations GFS2: Introduce rbm field bii GFS2: new function gfs2_rbm_incr Miklos Szeredi (2): GFS2: d_splice_alias() can't return error GFS2: fix dentry leaks Steven Whitehouse (12): GFS2: Clean up reservation removal GFS2

[PATCH 19/19] GFS2: Use generic list_lru for quota

2013-11-04 Thread Steven Whitehouse
s where we traverse that list are updated to take account of that. As a result of this patch, the gfs2 quota shrinker is now NUMA zone aware, and we are also laying the foundations for further improvments in due course. Signed-off-by: Steven Whitehouse Signed-off-by: Abhijith Das Tested-by: Abhiji

[PATCH 17/19] GFS2: Use reflink for quota data cache

2013-11-04 Thread Steven Whitehouse
ittle as possible other change. Signed-off-by: Steven Whitehouse Signed-off-by: Abhijith Das Tested-by: Abhijith Das diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index bb88e41..9d77804 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -422,7 +422,7 @@ struct gfs2_quota

[PATCH 18/19] GFS2: Rename quota qd_lru_lock qd_lock

2013-11-04 Thread Steven Whitehouse
This is a straight forward rename which is in preparation for introducing the generic list_lru infrastructure in the following patch. Signed-off-by: Steven Whitehouse Signed-off-by: Abhijith Das Tested-by: Abhijith Das diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index ed08911..466516a

[PATCH 10/19] GFS2: Speed up starting point selection for block allocation

2013-11-04 Thread Steven Whitehouse
makes sense to avoid them entirely in this case. There is no functional change here, but the code should be a bit more efficient after this patch. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 4f0984a..4d83abd 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c

[PATCH 01/19] GFS2: d_splice_alias() can't return error

2013-11-04 Thread Steven Whitehouse
From: Miklos Szeredi unless it was given an IS_ERR(inode), which isn't the case here. So clean up the unnecessary error handling in gfs2_create_inode(). This paves the way for real fixes (hence the stable Cc). Signed-off-by: Miklos Szeredi Signed-off-by: Steven Whitehouse Cc

[PATCH 11/19] GFS2: Move gfs2_icbit_munge into quota.c

2013-11-04 Thread Steven Whitehouse
This function is only called twice, and both callers are quota related, so lets move this function into quota.c and make it static. Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 8fe7a0a..fd1ec52 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -289,6

[PATCH 03/19] GFS2: introduce bi_blocks for optimization

2013-11-04 Thread Steven Whitehouse
: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 26aabd7..f1a3243 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -71,6 +71,7 @@ struct gfs2_bitmap { u32 bi_offset; u32 bi_start; u32 bi_len; + u32 bi_blocks; }; struct gfs2_rgrpd { diff

[PATCH 04/19] GFS2: Do not reset flags on active reservations

2013-11-04 Thread Steven Whitehouse
rong thing because it clears the GL_SKIP bit that was set for the lvb tracking purposes. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 7d64a27..8e50038 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1825,7 +182

[PATCH 07/19] GFS2: fix dentry leaks

2013-11-04 Thread Steven Whitehouse
From: Miklos Szeredi We need to dput() the result of d_splice_alias(), unless it is passed to finish_no_open(). Edited by Steven Whitehouse in order to make it apply to the current GFS2 git tree, and taking account of a prerequisite patch which hasn't been applied. Signed-off-by: M

[PATCH 06/19] GFS2: new function gfs2_rbm_incr

2013-11-04 Thread Steven Whitehouse
, incrementing, then calling gfs2_rbm_from_block. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index dd3c4d3..285dd36 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -274,6 +274,32 @@ static int gfs2_rbm_from_block(struct gfs2_rbm

[PATCH 14/19] GFS2: Inline qd_trylock into gfs2_quota_unlock

2013-11-04 Thread Steven Whitehouse
The function qd_trylock was not a trylock despite its name and can be inlined into gfs2_quota_unlock in order to make the code a bit clearer. There should be no functional change as a result of this patch. Signed-off-by: Steven Whitehouse Cc: Abhijith Das diff --git a/fs/gfs2/quota.c b/fs/gfs2

[PATCH 05/19] GFS2: Introduce rbm field bii

2013-11-04 Thread Steven Whitehouse
array of bitmaps for an rgrp. This replaces *bi which was a pointer to the bitmap. This is being done for further optimizations. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index f1a3243..8c8f110 100644 --- a/fs/gfs2/incore.h

<    1   2   3   4   5   6   7   >