Merge tag 'for_linux-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwess...
[firefly-linux-kernel-4.4.55.git] / fs / f2fs / f2fs.h
index db1ff55de0bc9cc8f0a3806e2a7e5f6edc5a3681..7fa3313ab0e27381b95d48b22da8315e605ef567 100644 (file)
@@ -105,6 +105,10 @@ enum {
        CP_DISCARD,
 };
 
+#define DEF_BATCHED_TRIM_SECTIONS      32
+#define BATCHED_TRIM_SEGMENTS(sbi)     \
+               (SM_I(sbi)->trim_sections * (sbi)->segs_per_sec)
+
 struct cp_control {
        int reason;
        __u64 trim_start;
@@ -448,6 +452,9 @@ struct f2fs_sm_info {
        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 */
+
        struct list_head sit_entry_set; /* sit entry set list */
 
        unsigned int ipu_policy;        /* in-place-update policy */
@@ -1674,6 +1681,7 @@ extern const struct address_space_operations f2fs_meta_aops;
 extern const struct inode_operations f2fs_dir_inode_operations;
 extern const struct inode_operations f2fs_symlink_inode_operations;
 extern const struct inode_operations f2fs_special_inode_operations;
+extern struct kmem_cache *inode_entry_slab;
 
 /*
  * inline.c