kernel-hacking-2024-linux-s.../fs/gfs2
Abhi Das 00a158be83 GFS2: fix bad inode i_goal values during block allocation
This patch checks if i_goal is either zero or if doesn't exist
within any rgrp (i.e gfs2_blk2rgrpd() returns NULL). If so, it
assigns the ip->i_no_addr block as the i_goal.

There are two scenarios where a bad i_goal can result in a
-EBADSLT error.

1. Attempting to allocate to an existing inode:
Control reaches gfs2_inplace_reserve() and ip->i_goal is bad.
We need to fix i_goal here.

2. A new inode is created in a directory whose i_goal is hosed:
In this case, the parent dir's i_goal is copied onto the new
inode. Since the new inode is not yet created, the ip->i_no_addr
field is invalid and so, the fix in gfs2_inplace_reserve() as per
1) won't work in this scenario. We need to catch and fix it sooner
in the parent dir itself (gfs2_create_inode()), before it is
copied to the new inode.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2014-09-19 10:45:18 +01:00
..
acl.c
acl.h
aops.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-06-12 10:30:18 -07:00
bmap.c GFS2: Change maxlen variables to size_t 2014-08-21 10:22:23 +01:00
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c GFS2: Request demote when a "try" flock fails 2014-08-21 10:22:52 +01:00
gfs2.h
glock.c Merge branch 'sched/urgent' into sched/core, to merge fixes before applying new changes 2014-07-28 10:03:00 +02:00
glock.h
glops.c GFS2: memcontrol: Spelling s/invlidate/invalidate/ 2014-07-18 11:14:31 +01:00
glops.h GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
incore.h GFS2: Don't use MAXQUOTAS value 2014-09-11 10:59:56 +01:00
inode.c GFS2: fix bad inode i_goal values during block allocation 2014-09-19 10:45:18 +01:00
inode.h
Kconfig
lock_dlm.c Merge branch 'sched/urgent' into sched/core, to merge fixes before applying new changes 2014-07-28 10:03:00 +02:00
log.c GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
log.h GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
lops.c GFS2: lops.c: replace 0 by NULL for pointers 2014-04-28 09:41:55 +01:00
lops.h
main.c
Makefile
meta_io.c mm: non-atomically mark page accessed during page cache allocation where possible 2014-06-04 16:54:10 -07:00
meta_io.h
ops_fstype.c sched: Remove proliferation of wait_on_bit() action functions 2014-07-16 15:10:39 +02:00
quota.c GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
quota.h
recovery.c sched: Remove proliferation of wait_on_bit() action functions 2014-07-16 15:10:39 +02:00
recovery.h
rgrp.c GFS2: fix bad inode i_goal values during block allocation 2014-09-19 10:45:18 +01:00
rgrp.h GFS2: fix bad inode i_goal values during block allocation 2014-09-19 10:45:18 +01:00
super.c GFS2: fs/gfs2/super.c: replace seq_printf by seq_puts 2014-08-21 10:22:05 +01:00
super.h
sys.c This must be about the smallest merge window patch set ever for GFS2. 2014-06-04 08:30:10 -07:00
sys.h
trace_gfs2.h
trans.c GFS2: remove transaction glock 2014-05-14 10:04:34 +01:00
trans.h
util.c
util.h
xattr.c
xattr.h