summaryrefslogtreecommitdiff
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-03-28 13:18:50 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2017-04-05 21:05:04 +0300
commita7eeb823854c4ab19765a25fabbda07fe27be177 (patch)
tree9d5a10993ce88b21141911f4cc76deee3b3fd84d /fs/f2fs/f2fs.h
parentf099405fc8d6c837487dcd6ab288073a44e6a91f (diff)
downloadlinux-a7eeb823854c4ab19765a25fabbda07fe27be177.tar.xz
f2fs: use bitmap in discard_entry
This patch changes to use bitmap instead of extent in struct discard_entry to indicate discard range in one segment, for fragmented space, this implementation can save memory footprint. Signed-off-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 8741d5102f14..43b6e1eeceb6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -182,11 +182,11 @@ struct inode_entry {
struct inode *inode; /* vfs inode pointer */
};
-/* for the list of blockaddresses to be discarded */
+/* for the bitmap indicate blocks to be discarded */
struct discard_entry {
struct list_head list; /* list head */
- block_t blkaddr; /* block address to be discarded */
- int len; /* # of consecutive blocks of the discard */
+ block_t start_blkaddr; /* start blockaddr of current segment */
+ unsigned char discard_map[SIT_VBLOCK_MAP_SIZE]; /* segment discard bitmap */
};
enum {