]> 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 ec4d568fd58c7cfe855599af3c7dca603b97df3e..325781a1ae4d6d8ce918e5b6b7cf289895024f4a 100644 (file)
@@ -230,6 +230,9 @@ struct sit_info {
        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 */
 
@@ -583,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)