diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-18 17:16:17 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-23 10:18:01 +0900 |
commit | 971767caf632190f77a40b4011c19948232eed75 (patch) | |
tree | 2a3eb454e7924271978932a81b825b1b0136db98 /fs/f2fs/f2fs.h | |
parent | 7d5e510944ce60ef0c6c2300a58547679df76db7 (diff) |
f2fs: use sbi->write_mutex for write bios
This patch removes an unnecessary semaphore (i.e., sbi->bio_sem).
There is no reason to use the semaphore when f2fs submits read and write IOs.
Instead, let's use a write mutex and cover the sbi->bio[] by the lock.
Change log from v1:
o split write_mutex suggested by Chao Yu
Chao described,
"All DATA/NODE/META bio buffers in superblock is protected by
'sbi->write_mutex', but each bio buffer area is independent, So we
should split write_mutex to three for DATA/NODE/META."
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 38963b4b500..c2de5491972 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -374,7 +374,7 @@ struct f2fs_sb_info { struct f2fs_sm_info *sm_info; /* segment manager */ struct bio *bio[NR_PAGE_TYPE]; /* bios to merge */ sector_t last_block_in_bio[NR_PAGE_TYPE]; /* last block number */ - struct rw_semaphore bio_sem; /* IO semaphore */ + struct mutex write_mutex[NR_PAGE_TYPE]; /* mutex for writing IOs */ /* for checkpoint */ struct f2fs_checkpoint *ckpt; /* raw checkpoint pointer */ |