diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-19 12:47:22 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-23 10:18:01 +0900 |
commit | 1ff7bd3bb5f7f57bc7418ee6ed12f3ae217e4e9c (patch) | |
tree | 13501b9baf93ba8ba9f35355fc8b37a6c2da30b8 /fs/f2fs/super.c | |
parent | c11abd1a8075e428ecf5303359513b48193b29cd (diff) | |
download | op-kernel-dev-1ff7bd3bb5f7f57bc7418ee6ed12f3ae217e4e9c.zip op-kernel-dev-1ff7bd3bb5f7f57bc7418ee6ed12f3ae217e4e9c.tar.gz |
f2fs: introduce a bio array for per-page write bios
The f2fs has three bio types, NODE, DATA, and META, and manages some data
structures per each bio types.
The codes are a little bit messy, thus, this patch introduces a bio array
which groups individual data structures as follows.
struct f2fs_bio_info {
struct bio *bio; /* bios to merge */
sector_t last_block_in_bio; /* last block number */
struct mutex io_mutex; /* mutex for bio */
};
struct f2fs_sb_info {
...
struct f2fs_bio_info write_io[NR_PAGE_TYPE]; /* for write bios */
...
};
The code changes from this new data structure are trivial.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index e194578..8c677e9 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -879,7 +879,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) spin_lock_init(&sbi->stat_lock); for (i = 0; i < NR_PAGE_TYPE; i++) - mutex_init(&sbi->write_mutex[i]); + mutex_init(&sbi->write_io[i].io_mutex); init_rwsem(&sbi->cp_rwsem); init_waitqueue_head(&sbi->cp_wait); |