f2fs: introduce discard_map for f2fs_trim_fs
This patch adds a bitmap for discard issues from f2fs_trim_fs. There-in rule is to issue discard commands only for invalidated blocks after mount. Once mount is done, f2fs_trim_fs trims out whole invalid area. After ehn, it will not issue and discrads redundantly. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -163,6 +163,7 @@ struct seg_entry {
|
||||
*/
|
||||
unsigned short ckpt_valid_blocks;
|
||||
unsigned char *ckpt_valid_map;
|
||||
unsigned char *discard_map;
|
||||
unsigned char type; /* segment type like CURSEG_XXX_TYPE */
|
||||
unsigned long long mtime; /* modification time of the segment */
|
||||
};
|
||||
|
Reference in New Issue
Block a user