linux-stable/fs/f2fs
Chao Yu 0c3a579758 f2fs: introduce f2fs_submit_merged_bio_cond
f2fs use single bio buffer per type data (META/NODE/DATA) for caching
writes locating in continuous block address as many as possible, after
submitting, these writes may be still cached in bio buffer, so we have
to flush cached writes in bio buffer by calling f2fs_submit_merged_bio.

Unfortunately, in the scenario of high concurrency, bio buffer could be
flushed by someone else before we submit it as below reasons:
a) there is no space in bio buffer.
b) add a request of different type (SYNC, ASYNC).
c) add a discontinuous block address.

For this condition, f2fs_submit_merged_bio will be devastating, because
it could break the following merging of writes in bio buffer, split one
big bio into two smaller one.

This patch introduces f2fs_submit_merged_bio_cond which can do a
conditional submitting with bio buffer, before submitting it will judge
whether:
 - page in DATA type bio buffer is matching with specified page;
 - page in DATA type bio buffer is belong to specified inode;
 - page in NODE type bio buffer is belong to specified inode;
If there is no eligible page in bio buffer, we will skip submitting step,
result in gaining more chance to merge consecutive block IOs in bio cache.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 16:07:23 -08:00
..
acl.c f2fs: make posix_acl_create() safer and cleaner 2015-05-07 11:38:31 -07:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
crypto.c f2fs crypto: add alloc_bounce_page 2015-06-11 15:04:20 -07:00
crypto_fname.c f2fs crypto: clean up error handling in f2fs_fname_setup_filename 2015-06-01 16:21:08 -07:00
crypto_key.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
crypto_policy.c f2fs crypto: do not set encryption policy for non-directory by ioctl 2015-06-01 16:21:07 -07:00
data.c f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
debug.c Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs 2016-01-13 21:01:44 -08:00
dir.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
extent_cache.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
f2fs.h f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
f2fs_crypto.h f2fs crypto: remove alloc_page for bounce_page 2015-06-01 16:21:10 -07:00
file.c f2fs: speed up handling holes in fiemap 2016-02-22 16:07:23 -08:00
gc.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
gc.h f2fs: detect idle time depending on user behavior 2016-01-11 15:56:37 -08:00
hash.c f2fs: introduce dot and dotdot name check 2015-05-28 15:41:34 -07:00
inline.c f2fs: delete unnecessary wait for page writeback 2016-02-22 16:07:23 -08:00
inode.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
Kconfig f2fs: fix typo 2015-08-21 22:43:32 -07:00
Makefile f2fs: maintain extent cache in separated file 2015-08-04 14:09:58 -07:00
namei.c Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs 2016-01-13 21:01:44 -08:00
node.c f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
node.h f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
recovery.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
segment.c f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
segment.h f2fs: fix conflict on page->private usage 2016-02-22 16:07:23 -08:00
shrinker.c f2fs: speed up shrinking extent tree entries 2015-12-30 10:13:00 -08:00
super.c f2fs: flush bios to handle cp_error in put_super 2016-02-22 16:07:23 -08:00
trace.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
trace.h f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
xattr.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
xattr.h vfs: Distinguish between full xattr names and proper prefixes 2015-12-06 21:33:52 -05:00