summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-01-11 14:40:24 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-02-22 18:48:53 -0800
commit0b54fb8458199dbed409abb06933c27439ea0911 (patch)
tree32da2196ef3fe6b1485a89ac7ae15833b293748d /fs/f2fs/f2fs.h
parentd4adb30f25f5f2aa9b205891e395251d2a9098be (diff)
downloadop-kernel-dev-0b54fb8458199dbed409abb06933c27439ea0911.zip
op-kernel-dev-0b54fb8458199dbed409abb06933c27439ea0911.tar.gz
f2fs: factor out discard command info into discard_cmd_control
This patch adds discard_cmd_control with the existing discarding controls. 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.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 548e75d..90eb2b3 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -189,6 +189,13 @@ struct discard_cmd {
struct bio *bio; /* bio */
};
+struct discard_cmd_control {
+ struct list_head discard_entry_list; /* 4KB discard entry list */
+ int nr_discards; /* # of discards in the list */
+ struct list_head discard_cmd_list; /* discard cmd list */
+ int max_discards; /* max. discards to be issued */
+};
+
/* for the list of fsync inodes, used only during recovery */
struct fsync_inode_entry {
struct list_head list; /* list head */
@@ -632,12 +639,6 @@ struct f2fs_sm_info {
/* a threshold to reclaim prefree segments */
unsigned int rec_prefree_segments;
- /* for small discard management */
- struct list_head discard_entry_list; /* 4KB discard entry list */
- struct list_head discard_cmd_list; /* discard cmd list */
- int nr_discards; /* # of discards in the list */
- int max_discards; /* max. discards to be issued */
-
/* for batched trimming */
unsigned int trim_sections; /* # of sections to trim */
@@ -649,6 +650,9 @@ struct f2fs_sm_info {
/* for flush command control */
struct flush_cmd_control *fcc_info;
+
+ /* for discard command control */
+ struct discard_cmd_control *dcc_info;
};
/*
OpenPOWER on IntegriCloud