All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs-tools: cleanup is_sit_bitmap_set
@ 2024-07-12  2:01 Sheng Yong via Linux-f2fs-devel
  2024-07-12  2:01 ` [f2fs-dev] [PATCH] f2fs-tools: show device info of sb->devs Sheng Yong via Linux-f2fs-devel
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Sheng Yong via Linux-f2fs-devel @ 2024-07-12  2:01 UTC (permalink / raw)
  To: chao, jaegeuk; +Cc: linux-f2fs-devel

Remove redundant function definition of is_sit_bitmap_set() and
export it.

Signed-off-by: Sheng Yong <shengyong@oppo.com>
---
 fsck/dump.c |  2 +-
 fsck/fsck.c | 12 ------------
 fsck/fsck.h |  2 +-
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/fsck/dump.c b/fsck/dump.c
index 90e3e0e93c61..4c1d4d3cdb19 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -660,7 +660,7 @@ dump:
 	return 0;
 }
 
-static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
+bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
 {
 	struct seg_entry *se;
 	u32 offset;
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 7400dcf35a11..e2fb042d3dec 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -633,18 +633,6 @@ err:
 	return -EINVAL;
 }
 
-static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
-{
-	struct seg_entry *se;
-	u32 offset;
-
-	se = get_seg_entry(sbi, GET_SEGNO(sbi, blk_addr));
-	offset = OFFSET_IN_SEG(sbi, blk_addr);
-
-	return f2fs_test_bit(offset,
-			(const char *)se->cur_valid_map) != 0;
-}
-
 int fsck_chk_root_inode(struct f2fs_sb_info *sbi)
 {
 	struct f2fs_node *node_blk;
diff --git a/fsck/fsck.h b/fsck/fsck.h
index 6cac926037bb..79cf08522873 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -281,7 +281,7 @@ extern int dump_node(struct f2fs_sb_info *, nid_t, int, char *, int, int);
 extern int dump_info_from_blkaddr(struct f2fs_sb_info *, u32);
 extern unsigned int start_bidx_of_node(unsigned int, struct f2fs_node *);
 extern void dump_node_scan_disk(struct f2fs_sb_info *sbi, nid_t nid);
-
+extern bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr);
 
 /* defrag.c */
 int f2fs_defragment(struct f2fs_sb_info *, u64, u64, u64, int);
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-12  7:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12  2:01 [f2fs-dev] [PATCH] f2fs-tools: cleanup is_sit_bitmap_set Sheng Yong via Linux-f2fs-devel
2024-07-12  2:01 ` [f2fs-dev] [PATCH] f2fs-tools: show device info of sb->devs Sheng Yong via Linux-f2fs-devel
2024-07-12  7:13   ` Chao Yu
2024-07-12  2:01 ` [f2fs-dev] [PATCH] fsck.f2fs: check all-zero inline data with helper is_zeroed Sheng Yong via Linux-f2fs-devel
2024-07-12  7:14   ` Chao Yu
2024-07-12  2:01 ` [f2fs-dev] [PATCH] fsck.f2fs: fix checking wp of all devices Sheng Yong via Linux-f2fs-devel
2024-07-12  7:23   ` Chao Yu
2024-07-12  2:01 ` [f2fs-dev] [PATCH] fsck.f2fs: update superblock if invalid Sheng Yong via Linux-f2fs-devel
2024-07-12  7:33   ` Chao Yu
2024-07-12  7:13 ` [f2fs-dev] [PATCH] f2fs-tools: cleanup is_sit_bitmap_set Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.