diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-03-22 17:23:45 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-24 15:10:50 -0400 |
commit | 648d50ba12c805d3fc75105ede7af254b3349dbd (patch) | |
tree | 4efe2862ac68aa102ed46a03307e4a426456166a /fs/f2fs/file.c | |
parent | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 (diff) | |
download | linux-648d50ba12c805d3fc75105ede7af254b3349dbd.tar.gz linux-648d50ba12c805d3fc75105ede7af254b3349dbd.tar.bz2 linux-648d50ba12c805d3fc75105ede7af254b3349dbd.zip |
f2fs: show the max number of volatile operations
This patch adds to show the max number of volatile operations which are
conducting concurrently.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 7704bd99b990..f3be240ef129 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1426,6 +1426,7 @@ static int f2fs_release_file(struct inode *inode, struct file *filp) drop_inmem_pages(inode); if (f2fs_is_volatile_file(inode)) { clear_inode_flag(inode, FI_VOLATILE_FILE); + stat_dec_volatile_write(inode); set_inode_flag(inode, FI_DROP_CACHE); filemap_fdatawrite(inode->i_mapping); clear_inode_flag(inode, FI_DROP_CACHE); @@ -1613,6 +1614,9 @@ static int f2fs_ioc_start_volatile_write(struct file *filp) if (ret) goto out; + stat_inc_volatile_write(inode); + stat_update_max_volatile_write(inode); + set_inode_flag(inode, FI_VOLATILE_FILE); f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); out: @@ -1668,6 +1672,7 @@ static int f2fs_ioc_abort_volatile_write(struct file *filp) drop_inmem_pages(inode); if (f2fs_is_volatile_file(inode)) { clear_inode_flag(inode, FI_VOLATILE_FILE); + stat_dec_volatile_write(inode); ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true); } |