kernel_optimize_test/fs
Mingming Cao 3f31fddfa2 jbd: fix race between free buffer and commit transaction
journal_try_to_free_buffers() could race with jbd commit transaction when
the later is holding the buffer reference while waiting for the data
buffer to flush to disk.  If the caller of journal_try_to_free_buffers()
request tries hard to release the buffers, it will treat the failure as
error and return back to the caller.  We have seen the directo IO failed
due to this race.  Some of the caller of releasepage() also expecting the
buffer to be dropped when passed with GFP_KERNEL mask to the
releasepage()->journal_try_to_free_buffers().

With this patch, if the caller is passing the __GFP_WAIT and __GFP_FS to
indicating this call could wait, in case of try_to_free_buffers() failed,
let's waiting for journal_commit_transaction() to finish commit the
current committing transaction, then try to free those buffers again.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Reviewed-by: Badari Pulavarty <pbadari@us.ibm.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:32 -07:00
..
9p
adfs
affs
afs
autofs
autofs4 autofs4: remove unused ioctls 2008-07-24 10:47:33 -07:00
befs
bfs
cifs
coda device create: coda: convert device_create to device_create_drvdata 2008-07-21 21:54:41 -07:00
configfs
cramfs
debugfs debugfs: Implement debugfs_remove_recursive() 2008-07-21 21:54:59 -07:00
devpts
dlm
ecryptfs eCryptfs: Make all persistent file opens delayed 2008-07-24 10:47:31 -07:00
efs
exportfs
ext2 ext2: remove double definitions of xattr macros 2008-07-25 10:53:31 -07:00
ext3 ext3: improve some code in rb tree part of dir.c 2008-07-25 10:53:32 -07:00
ext4
fat
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs hugetlbfs: per mount huge page sizes 2008-07-24 10:47:17 -07:00
isofs
jbd jbd: fix race between free buffer and commit transaction 2008-07-25 10:53:32 -07:00
jbd2
jffs2
jfs
lockd Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux 2008-07-20 21:21:46 -07:00
minix minix: remove !NO_TRUNCATE code 2008-07-25 10:53:30 -07:00
msdos
ncpfs
nfs fix fs/nfs/nfsroot.c compilation 2008-07-24 17:32:41 -07:00
nfs_common
nfsd Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux 2008-07-20 21:21:46 -07:00
nls
ntfs
ocfs2
openpromfs
partitions fs: ldm.[ch] use get_unaligned_* helpers 2008-07-25 10:53:26 -07:00
proc vmallocinfo: add NUMA information 2008-07-24 10:47:17 -07:00
qnx4
ramfs
reiserfs
romfs
smbfs
sysfs driver core: Suppress sysfs warnings for device_rename(). 2008-07-21 21:55:01 -07:00
sysv
ubifs
udf
ufs UFS: add const to parser token table 2008-07-24 11:50:15 -07:00
vfat
xfs
aio.c
anon_inodes.c flag parameters: NONBLOCK in anon_inode_getfd 2008-07-24 10:47:28 -07:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c execve filename: document and export via auxiliary vector 2008-07-22 09:59:40 -07:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c binfmt_misc: use simple_read_from_buffer() 2008-07-24 10:47:27 -07:00
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c autofs4: remove unused ioctls 2008-07-24 10:47:33 -07:00
compat.c flag parameters: signalfd 2008-07-24 10:47:27 -07:00
dcache.c fix soft lock up at NFS mount via per-SB LRU-list of unused dentries 2008-07-24 10:47:15 -07:00
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
eventpoll.c flag parameters add-on: remove epoll_create size param 2008-07-24 10:47:29 -07:00
exec.c exec: remove some includes 2008-07-25 10:53:28 -07:00
fcntl.c flag parameters: dup2 2008-07-24 10:47:28 -07:00
fifo.c
file_table.c
file.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
inotify.c
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c fs: check for statfs overflow 2008-07-24 10:47:19 -07:00
pipe.c flag parameters: NONBLOCK in pipe 2008-07-24 10:47:29 -07:00
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c
quota.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
splice.c
stack.c
stat.c
super.c fix soft lock up at NFS mount via per-SB LRU-list of unused dentries 2008-07-24 10:47:15 -07:00
sync.c SYNC_FILE_RANGE_WRITE may and will block. Document that. 2008-07-24 10:47:17 -07:00
timerfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
utimes.c
xattr_acl.c
xattr.c