Quoted from manual of chattr:
"
CHATTR(1)
...

ATTRIBUTES
A file with the 'd' attribute set is not a candidate for backup when
the dump(8) program is run.
"

Once we set F2FS_NODUMP_FL flag to inode, do not allow dumping info
from it.

Signed-off-by: Chao Yu <[email protected]>
---
 fsck/dump.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fsck/dump.c b/fsck/dump.c
index 8d5613e..1fb9a1d 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -605,6 +605,10 @@ static int dump_filesystem(struct f2fs_sb_info *sbi, 
struct node_info *ni,
                MSG(force, "Wrong name info\n\n");
                return -1;
        }
+       if (le32_to_cpu(inode->i_flags) & F2FS_NODUMP_FL) {
+               MSG(force, "File has nodump flag\n\n");
+               return -1;
+       }
        base_path = base_path ?: "./lost_found";
        if (force)
                goto dump;
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to