]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/f2fs/segment.h
Merge tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson...
[linux.git] / fs / f2fs / segment.h
index b74602813a0553043af68e451af8656980fb9a70..325781a1ae4d6d8ce918e5b6b7cf289895024f4a 100644 (file)
@@ -226,9 +226,13 @@ struct sit_info {
        block_t sit_base_addr;          /* start block address of SIT area */
        block_t sit_blocks;             /* # of blocks used by SIT area */
        block_t written_valid_blocks;   /* # of valid blocks in main area */
+       char *bitmap;                   /* all bitmaps pointer */
        char *sit_bitmap;               /* SIT bitmap pointer */
 #ifdef CONFIG_F2FS_CHECK_FS
        char *sit_bitmap_mir;           /* SIT bitmap mirror */
+
+       /* bitmap of segments to be ignored by GC in case of errors */
+       unsigned long *invalid_segmap;
 #endif
        unsigned int bitmap_size;       /* SIT bitmap size */
 
@@ -582,13 +586,13 @@ static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi,
                reserved_sections(sbi) + needed);
 }
 
-static inline int f2fs_is_checkpoint_ready(struct f2fs_sb_info *sbi)
+static inline bool f2fs_is_checkpoint_ready(struct f2fs_sb_info *sbi)
 {
        if (likely(!is_sbi_flag_set(sbi, SBI_CP_DISABLED)))
-               return 0;
+               return true;
        if (likely(!has_not_enough_free_secs(sbi, 0, 0)))
-               return 0;
-       return -ENOSPC;
+               return true;
+       return false;
 }
 
 static inline bool excess_prefree_segs(struct f2fs_sb_info *sbi)