diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-15 13:55:58 +0900 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-05-02 14:35:30 +0200 |
commit | 02180afd8c63f97a7b2eb06d39a7a780211a5605 (patch) | |
tree | 6edf5519ada0e98a596aa7f529a042f05a763879 /fs/f2fs/f2fs.h | |
parent | a7cf6fed9cce3470f2993c2e877a3b103f5868fd (diff) | |
download | kernel_samsung_tuna-02180afd8c63f97a7b2eb06d39a7a780211a5605.zip kernel_samsung_tuna-02180afd8c63f97a7b2eb06d39a7a780211a5605.tar.gz kernel_samsung_tuna-02180afd8c63f97a7b2eb06d39a7a780211a5605.tar.bz2 |
f2fs: add a slab cache entry for small discards
This patch adds a slab cache entry for small discards.
Each entry consists of:
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 */
};
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 0cfad29..e61083e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -97,6 +97,13 @@ struct dir_inode_entry { struct inode *inode; /* vfs inode pointer */ }; +/* for the list of blockaddresses 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 */ +}; + /* for the list of fsync inodes, used only during recovery */ struct fsync_inode_entry { struct list_head list; /* list head */ @@ -308,6 +315,11 @@ struct f2fs_sm_info { /* a threshold to reclaim prefree segments */ unsigned int rec_prefree_segments; + + /* for small discard management */ + struct list_head discard_list; /* 4KB discard list */ + int nr_discards; /* # of discards in the list */ + int max_discards; /* max. discards to be issued */ }; /* @@ -1079,6 +1091,8 @@ int lookup_journal_in_cursum(struct f2fs_summary_block *, void flush_sit_entries(struct f2fs_sb_info *); int build_segment_manager(struct f2fs_sb_info *); void destroy_segment_manager(struct f2fs_sb_info *); +int __init create_segment_manager_caches(void); +void destroy_segment_manager_caches(void); /* * checkpoint.c |