172e045a7f
This is a fix for bz #208514. When GFS2 frees up space, the freed blocks aren't available for reuse until the resource group is successfully written to the ondisk journal. So in rare cases, GFS2 operations will fail, saying that the filesystem is out of space, when in reality, you are just waiting for a log flush. For instance, on a 1Gig filesystem, if I continually write 10 Mb to a file, and then truncate it, after a hundred interations, the write will fail with -ENOSPC, even though the filesystem is just 1% full. The attached patch calls a log flush in these cases. I tested this patch fairly heavily to check if there were any locking issues that I missed, and it seems to work just fine. Also, this patch only does the log flush if get_local_rgrp makes a complete loop of resource groups without skipping any do to locking issues. The code would be slightly simpler if it just always did the log flush after the first failed pass, and you could only ever have to go through the loop twice, instead of up to three times. However, I guessed that failing to find a rg simply do to locking issues would be common enough to skip the log flush in that case, but I'm not certain that this is the right way to go. Either way, I don't suppose this code will be hit all that often. Signed-off-by: Benjamin E. Marzinski <bmarzins@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> |
||
---|---|---|
.. | ||
locking | ||
acl.c | ||
acl.h | ||
bmap.c | ||
bmap.h | ||
daemon.c | ||
daemon.h | ||
dir.c | ||
dir.h | ||
eaops.c | ||
eaops.h | ||
eattr.c | ||
eattr.h | ||
gfs2.h | ||
glock.c | ||
glock.h | ||
glops.c | ||
glops.h | ||
incore.h | ||
inode.c | ||
inode.h | ||
Kconfig | ||
lm.c | ||
lm.h | ||
locking.c | ||
log.c | ||
log.h | ||
lops.c | ||
lops.h | ||
main.c | ||
Makefile | ||
meta_io.c | ||
meta_io.h | ||
mount.c | ||
mount.h | ||
ondisk.c | ||
ops_address.c | ||
ops_address.h | ||
ops_dentry.c | ||
ops_dentry.h | ||
ops_export.c | ||
ops_export.h | ||
ops_file.c | ||
ops_file.h | ||
ops_fstype.c | ||
ops_fstype.h | ||
ops_inode.c | ||
ops_inode.h | ||
ops_super.c | ||
ops_super.h | ||
ops_vm.c | ||
ops_vm.h | ||
quota.c | ||
quota.h | ||
recovery.c | ||
recovery.h | ||
rgrp.c | ||
rgrp.h | ||
super.c | ||
super.h | ||
sys.c | ||
sys.h | ||
trans.c | ||
trans.h | ||
util.c | ||
util.h |