summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2020-11-23 10:58:32 +0530
committerJaegeuk Kim <jaegeuk@kernel.org>2020-12-02 22:00:21 -0800
commit8769918bf06c9cfb01a1a6ee0e547c9916881496 (patch)
tree5ac4d1494b84a00c6736f28b0fad369d10432ff8 /fs/f2fs/f2fs.h
parent7ad08a58bf67594057362e45cbddd3e27e53e557 (diff)
downloadlinux-8769918bf06c9cfb01a1a6ee0e547c9916881496.tar.bz2
f2fs: change to use rwsem for cp_mutex
Use rwsem to ensure serialization of the callers and to avoid starvation of high priority tasks, when the system is under heavy IO workload. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index c626fb03d5bc..273f068e8899 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1369,7 +1369,7 @@ struct f2fs_sb_info {
int cur_cp_pack; /* remain current cp pack */
spinlock_t cp_lock; /* for flag in ckpt */
struct inode *meta_inode; /* cache meta blocks */
- struct mutex cp_mutex; /* checkpoint procedure lock */
+ struct rw_semaphore cp_global_sem; /* checkpoint procedure lock */
struct rw_semaphore cp_rwsem; /* blocking FS operations */
struct rw_semaphore node_write; /* locking node writes */
struct rw_semaphore node_change; /* locking node change */