[Cluster-devel] [PATCH v2 3/6] gfs2: Add per-reservation reserved block accounting

2018-12-01 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 v2 0/6] gfs2: Prepare for resource group glock sharing

2018-12-01 Thread Andreas Gruenbacher
This is an update of the resource group glock sharing patch queue by Bob and myself. Some of the cleanups and fixes posted previously [*] have been integrated upstream in the meantime. Patch "gfs2: Add local resource group locking" is now built on top of the existing rgrp locking scheme; I'll

[Cluster-devel] [PATCH v2 6/6] gfs2: Introduce resource group sharing

2018-12-01 Thread Andreas Gruenbacher
From: Bob Peterson This patch takes advantage of the new glock holder sharing feature for resource groups. We have already introduced local resource group locking in a previous patch, so competing accesses of local processes are already under control. Signed-off-by: Bob Peterson ---

[Cluster-devel] [PATCH v2 2/6] gfs2: Clean up gfs2_adjust_reservation

2018-12-01 Thread Andreas Gruenbacher
Unconditionally call gfs2_adjust_reservation in gfs2_alloc_blocks. Move the code for updating rd_free and rd_free_clone from gfs2_alloc_blocks into gfs2_adjust_reservation. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 26 -- 1 file changed, 16 insertions(+),

[Cluster-devel] [PATCH v2 5/6] gfs2: Allow node-wide exclusive glock sharing

2018-12-01 Thread Andreas Gruenbacher
From: Bob Peterson Introduce a new LM_FLAG_NODE_SCOPE glock holder flag: when taking a glock in LM_ST_EXCLUSIVE (EX) mode and with the LM_FLAG_NODE_SCOPE flag set, the exclusive lock is shared among all local processes who are holding the glock in EX mode and have the LM_FLAG_NODE_SCOPE flag set