[Cluster-devel] [PATCH 09/11] gfs2: Remove unnecessary gfs2_rlist_alloc parameter

2018-10-05 Thread Andreas Gruenbacher
From: Bob Peterson The state parameter of gfs2_rlist_alloc is set to LM_ST_EXCLUSIVE in all calls, so remove it and hardcode that state in gfs2_rlist_alloc instead. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/dir.c | 2 +- fs/gfs2/rgrp.c | 5 ++--- fs/gfs2/rgrp.h | 2 +-

[Cluster-devel] [PATCH 05/11] gfs2: Fix some minor typos

2018-10-05 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher --- fs/gfs2/quota.c | 2 +- fs/gfs2/rgrp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 0efae7a0ee80..2ae5a109eea7 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1183,7 +1183,7 @@

[Cluster-devel] [PATCH 01/11] gfs2: Always check the result of gfs2_rbm_from_block

2018-10-05 Thread Andreas Gruenbacher
When gfs2_rbm_from_block fails, the rbm it returns is undefined, so we always want to make sure gfs2_rbm_from_block has succeeded before looking at the rbm. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[Cluster-devel] [PATCH 07/11] gfs2: Fix marking bitmaps non-full

2018-10-05 Thread Andreas Gruenbacher
Reservations in gfs can span multiple gfs2_bitmaps (but they won't span multiple resource groups). When removing a reservation, we want to clear the GBF_FULL flags of all involved gfs2_bitmaps, not just that of the first bitmap. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 13

[Cluster-devel] [PATCH 04/11] gfs2: Rename bitmap.bi_{len => bytes}

2018-10-05 Thread Andreas Gruenbacher
This field indicates the size of the bitmap in bytes, similar to how the bi_blocks field indicates the size of the bitmap in blocks. In count_unlinked, replace an instance of bi_bytes * GFS2_NBBY by bi_blocks. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/incore.h | 2 +- fs/gfs2/lops.c |

[Cluster-devel] [PATCH 08/11] gfs2: Add per-reservation reserved block accounting

2018-10-05 Thread Andreas Gruenbacher
Add a rs_reserved field to struct gfs2_blkreserv to keep track of the number of blocks reserved by this particular reservation. When making a reservation with gfs2_inplace_reserve, this field is set to somewhere between ap->min_target and ap->target depending on the number of free blocks in the

[Cluster-devel] [PATCH 06/11] gfs2: Only use struct gfs2_rbm for bitmap manipulations

2018-10-05 Thread Andreas Gruenbacher
GFS2 uses struct gfs2_rbm to represent a filesystem block number as a bit position within a resource group. This representation is used in the bitmap manipulation code to prevent excessive conversions between block numbers and bit positions, but also in struct gfs2_blkreserv which is part of

[Cluster-devel] [PATCH 11/11] gfs2: Add local resource group locking

2018-10-05 Thread Andreas Gruenbacher
From: Bob Peterson Prepare for treating resource group glocks as exclusive among nodes but shared among all tasks running on a node: introduce another layer of node-specific locking that the local tasks can use to coordinate their accesses. This patch only introduces the local locking changes

[Cluster-devel] [PATCH 02/11] gfs2: Move rs_{sizehint, rgd_gh} fields into the inode

2018-10-05 Thread Andreas Gruenbacher
Move the rs_sizehint and rs_rgd_gh fields from struct gfs2_blkreserv into the inode: they are more closely related to the inode than to a particular reservation. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 4 ++-- fs/gfs2/incore.h | 6 ++ fs/gfs2/main.c | 2 ++

[Cluster-devel] [PATCH 03/11] gfs2: Remove unused RGRP_RSRV_MINBYTES definition

2018-10-05 Thread Andreas Gruenbacher
This definition is only used to define RGRP_RSRV_MINBLKS, with no benefit over defining RGRP_RSRV_MINBLKS directly. In addition, instead of forcing RGRP_RSRV_MINBLKS to be of type u32, cast it to that type where that type is required. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 2

[Cluster-devel] [PATCH 00/11] gfs2: Prepare for resource group glock sharing

2018-10-05 Thread Andreas Gruenbacher
Here is a set of patches that are meant to prepare gfs2 for Bob's resource group glock sharing patches. The patches have only survived light testing so far, and Bob's remaining patches haven't been ported in top of this patch queue yet, so I'm mainly looking for feedback on the mode of operation

[Cluster-devel] [GFS2 PATCH] gfs2: Use fs_* functions instead of pr_* where we can

2018-10-05 Thread Bob Peterson
Hi, Earlier this week, I posted a patch that converted a few pr_warn messages to fs_warn. Following Steve Whitehouse's suggestion, I extended this concept and converted almost all such messages. Here, then, is the replacement patch. Bob Peterson --- Before this patch, various errors and messages