Skip to contentSkip to conversation

sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit

PATCH In review Jaegeuk Kim 2 participants 7 messages May 25, 2021 – Jun 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit

Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

---
 fsck/segment.c    | 6 +++---
 include/f2fs_fs.h | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
fsck/segment.c +3 -3
index 0b257364fd5b..0156690ed9aa 100644
@@ -521,9 +521,9 @@ int f2fs_build_file(struct f2fs_sb_info *sbi, struct dentry *de)
 		node_blk->i.i_compress_algrithm = c.compress.alg;
 		node_blk->i.i_log_cluster_size =
 				c.compress.cc.log_cluster_size;
-		node_blk->i.i_flags = cpu_to_le32(
-				F2FS_COMPR_FL |
-				(c.compress.readonly ? FS_IMMUTABLE_FL : 0));
+		node_blk->i.i_flags = cpu_to_le32(F2FS_COMPR_FL);
+		if (c.compress.readonly)
+			node_blk->i.i_inline |= F2FS_COMPRESS_RELEASED;
 		ASSERT(write_inode(node_blk, ni.blk_addr) >= 0);
 
 		while (!eof && (n = bulkread(fd, rbuf, c.compress.cc.rlen,
include/f2fs_fs.h +2 -0
index 4c1d06cdae39..8969ae2ebc34 100644
@@ -889,6 +889,8 @@ struct f2fs_extent {
 #define F2FS_DATA_EXIST		0x08	/* file inline data exist flag */
 #define F2FS_INLINE_DOTS	0x10	/* file having implicit dot dentries */
 #define F2FS_EXTRA_ATTR		0x20	/* file having extra attribute */
+#define F2FS_PIN_FILE		0x40	/* file should not be gced */
+#define F2FS_COMPRESS_RELEASED	0x80	/* file released compressed blocks */
 
 #if !defined(offsetof)
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
Signature · 8 lines
2.32.0.rc0.204.g9fa02ecfa5-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
#3 lore raw
Quoted 9 lines · Jaegeuk Kim
Quoted 6 lines · Chao Yu
Quoted 3 lines · Jaegeuk Kim

Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

Too late, as I published it in master.

Oops, sorry for the delay.

So does the patch "f2fs-tools: support small RO partition"?

Thanks,

Quoted 3 lines
Quoted 3 lines

Thanks,

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

#4 lore raw
Quoted 7 lines · Chao Yu
Quoted 6 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 3 lines · Jaegeuk Kim

Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Too late, as I published it in master.

Oops, sorry for the delay.

So does the patch "f2fs-tools: support small RO partition"?

sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit

Quoted 6 lines

Thanks,

Quoted 3 lines
Quoted 3 lines

Thanks,

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

#5 lore raw
Quoted 10 lines · Jaegeuk Kim
Quoted 9 lines · Chao Yu
Quoted 8 lines · Jaegeuk Kim
Quoted 6 lines · Chao Yu
Quoted 3 lines · Jaegeuk Kim

Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Too late, as I published it in master.

Oops, sorry for the delay.

So does the patch "f2fs-tools: support small RO partition"?

sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit

Oh, I mean does patch "f2fs-tools: support small RO partition" be pushed as well? if so, seems I don't need to reply with the reviewed-by flag.

Thanks,

Quoted 7 lines
Quoted 7 lines

Thanks,

Quoted 3 lines
Quoted 3 lines

Thanks,

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

#6 lore raw
Quoted 15 lines · Chao Yu
Quoted 14 lines · Jaegeuk Kim
Quoted 13 lines · Chao Yu
Quoted 9 lines · Jaegeuk Kim
Quoted 6 lines · Chao Yu
Quoted 3 lines · Jaegeuk Kim

Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

Too late, as I published it in master.

Oops, sorry for the delay.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

So does the patch "f2fs-tools: support small RO partition"?

sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit

Oh, I mean does patch "f2fs-tools: support small RO partition" be pushed as well? if so, seems I don't need to reply with the reviewed-by flag.

Yes, it was merged in aosp.

Quoted 10 lines

Thanks,

Quoted 7 lines
Quoted 7 lines

Thanks,

Quoted 3 lines
Quoted 3 lines

Thanks,

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