1
0
Fork 0
remarkable-linux/fs/gfs2
Andreas Gruenbacher c78e4a47bc gfs2: Fix fallocate chunk size
[ Upstream commit 174d1232eb ]

The chunk size of allocations in __gfs2_fallocate is calculated
incorrectly.  The size can collapse, causing __gfs2_fallocate to
allocate one block at a time, which is very inefficient.  This needs
fixing in two places:

In gfs2_quota_lock_check, always set ap->allowed to UINT_MAX to indicate
that there is no quota limit.  This fixes callers that rely on
ap->allowed to be set even when quotas are off.

In __gfs2_fallocate, reset max_blks to UINT_MAX in each iteration of the
loop to make sure that allocation limits from one resource group won't
spill over into another resource group.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:35 +02:00
..
Kconfig Finally eradicate CONFIG_HOTPLUG 2013-06-03 14:20:18 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.c gfs2: preserve i_mode if __gfs2_set_acl() fails 2017-08-31 07:53:15 -05:00
acl.h gfs2: Switch to generic xattr handlers 2016-05-12 22:28:05 -04:00
aops.c gfs2: forcibly flush ail to relieve memory pressure 2017-08-10 10:51:03 -05:00
bmap.c GFS2: Fix non-recursive truncate bug 2017-08-30 13:29:22 -05:00
bmap.h GFS2: Clean up journal extent mapping 2014-03-03 13:50:12 +00:00
dentry.c gfs2: Lock holder cleanup 2016-06-27 09:47:09 -05:00
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 GFS2: Make rename not save dirent location 2014-10-01 14:06:15 +01:00
export.c gfs2: Get rid of gfs2_ilookup 2016-06-27 09:47:08 -05:00
file.c gfs2: Fix fallocate chunk size 2018-05-30 07:52:35 +02:00
gfs2.h [GFS2] Remove remote lock dropping code 2008-06-27 09:39:44 +01:00
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 GFS2: update freeze code to use freeze/thaw_super on all nodes 2014-11-17 10:36:39 +00:00
incore.h gfs2: Silence gcc format-truncation warning 2017-08-25 10:59:21 -05:00
inode.c gfs2: Fix trivial typos 2017-08-09 09:36:39 -05:00
inode.h GFS2: use BIT() macro 2016-08-02 12:05:27 -05: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 GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
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 gfs2: use bio op accessors 2016-06-07 13:41:38 -06:00
main.c GFS2: Remove gl_list from glock structure 2017-06-12 14:39:12 -05: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 GFS2: Refactor gfs2_remove_from_journal 2016-05-06 11:27:27 -05:00
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 gfs2: Fix fallocate chunk size 2018-05-30 07:52:35 +02:00
recovery.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
recovery.h GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes 2016-07-21 13:02:44 -05:00
rgrp.c GFS2: Fix gl_object warnings 2017-08-30 08:14:27 -05:00
rgrp.h GFS2: Non-recursive delete 2017-04-19 08:25:43 -04:00
super.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
super.h GFS2: update freeze code to use freeze/thaw_super on all nodes 2014-11-17 10:36:39 +00:00
sys.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
sys.h GFS2: dlm based recovery coordination 2012-01-11 09:23:05 +00:00
trace_gfs2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trans.c GFS2: Reduce contention on gfs2_log_lock 2017-01-30 12:10:25 -05:00
trans.h GFS2: Split gfs2_trans_add_bh() into two 2013-01-29 10:28:04 +00:00
util.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
util.h GFS2: Fix up some sparse warnings 2017-08-25 18:47:18 -05:00
xattr.c gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing 2017-08-31 07:43:03 -05:00
xattr.h gfs2: Remove gfs2_xattr_acl_chmod 2015-12-06 21:25:17 -05:00