alistair23-linux/fs/gfs2
Andrew Price 65adc27375 gfs2: Add a next-resource-group pointer to resource groups
Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The
rg_skip field has the following meaning:

- If rg_skip is zero, it is considered unset and not useful.
- If rg_skip is non-zero, its value will be the number of blocks between
  this rgrp's address and the next rgrp's address. This can be used as a
  hint by fsck.gfs2 when rebuilding a bad rindex, for example.

This will provide less dependency on the rindex in future, and allow
tools such as fsck.gfs2 to iterate the resource groups without keeping
the rindex around.

The field is updated in gfs2_rgrp_out() so that existing file systems
will have it set. This means that any resource groups that aren't ever
written will not be updated. The final rgrp is a special case as there
is no next rgrp, so it will always have a rg_skip of 0 (unless the fs is
extended).

Before this patch, gfs2_rgrp_out() zeroes the __pad field explicitly, so
the rg_skip field can get set back to 0 in cases where nodes with and
without this patch are mixed in a cluster. In some cases, the field may
bounce between being set by one node and then zeroed by another which
may harm performance slightly, e.g. when two nodes create many small
files. In testing this situation is rare but it becomes more likely as
the filesystem fills up and there are fewer resource groups to choose
from. The problem goes away when all nodes are running with this patch.
Dipping into the space currently occupied by the rg_reserved field would
have resulted in the same problem as it is also explicitly zeroed, so
unfortunately there is no other way around it.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
2017-12-12 11:43:08 -06:00
..
acl.c gfs2: Always update inode ctime in set_acl 2017-09-25 12:33:19 -05:00
acl.h
aops.c gfs2: Remove unused gfs2_write_jdata_pagevec parameter 2017-11-27 10:54:55 -06:00
bmap.c GFS2: Implement iomap for block_map 2017-10-31 14:26:33 +01:00
bmap.h GFS2: Implement iomap for block_map 2017-10-31 14:26:33 +01:00
dentry.c
dir.c We've got a whopping 29 GFS2 patches for this merge window, mainly 2017-09-06 11:42:31 -07:00
dir.h
export.c
file.c gfs2: Fix and clean up {GET,SET}FLAGS ioctl 2017-10-31 14:26:57 +01:00
gfs2.h
glock.c gfs2: Fix debugfs glocks dump 2017-09-25 12:32:33 -05:00
glock.h gfs2: gfs2_evict_inode: Put glocks asynchronously 2017-08-10 10:45:21 -05:00
glops.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
glops.h
incore.h gfs2: Silence gcc format-truncation warning 2017-08-25 10:59:21 -05:00
inode.c gfs2: Add support for statx inode flags 2017-10-31 14:26:58 +01:00
inode.h gfs2: Implement SEEK_HOLE / SEEK_DATA via iomap 2017-10-31 14:26:35 +01:00
Kconfig GFS2: Switch fiemap implementation to use iomap 2017-10-31 14:26:34 +01:00
lock_dlm.c GFS2: Fix up some sparse warnings 2017-08-25 18:47:18 -05:00
log.c GFS2: Withdraw for IO errors writing to the journal or statfs 2017-08-25 10:59:09 -05:00
log.h
lops.c Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block 2017-09-07 11:59:42 -07:00
lops.h
main.c gfs2: Fix wrong error handling in init_gfs2_fs() 2017-11-27 10:47:22 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
meta_io.c Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block 2017-09-07 11:59:42 -07:00
meta_io.h
ops_fstype.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
quota.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
quota.h
recovery.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
recovery.h
rgrp.c gfs2: Add a next-resource-group pointer to resource groups 2017-12-12 11:43:08 -06:00
rgrp.h
super.c GFS2: flush the log and all pages for jdata as we do for WB_SYNC_ALL 2017-10-31 14:26:35 +01:00
super.h
sys.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
sys.h
trace_gfs2.h We've got a total of 17 GFS2 patches for this merge window. The 2017-11-14 13:55:51 -08:00
trans.c gfs2: Fix a harmless typo 2017-10-31 14:26:56 +01:00
trans.h
util.c
util.h GFS2: Fix up some sparse warnings 2017-08-25 18:47:18 -05:00
xattr.c gfs2: Allow gfs2_xattr_set to be called with the glock held 2017-10-31 14:26:59 +01:00
xattr.h