Skip to contentSkip to conversation

erofs-utils: mkfs: clear 'h_idata_size' when drop inline pcluster

PATCH In review [email protected] 2 participants 2 messages Aug 18, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: clear 'h_idata_size' when drop inline pcluster

From: Yue Hu <[email protected]>

The value of 'h_idata_size' should be zero if no inline pcluster.

---
 lib/compress.c | 1 +
 1 file changed, 1 insertion(+)
lib/compress.c +1 -0
index ee3b856..2453d0a 100644
@@ -565,6 +565,7 @@ void z_erofs_drop_inline_pcluster(struct erofs_inode *inode)
 
 	h->h_advise = cpu_to_le16(le16_to_cpu(h->h_advise) &
 				  ~Z_EROFS_ADVISE_INLINE_PCLUSTER);
+	h->h_idata_size = 0;
 	if (!inode->eof_tailraw)
 		return;
 	DBG_BUGON(inode->compressed_idata != true);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Thu, Aug 18, 2022 at 10:35:09AM +0800, [email protected] wrote:

From: Yue Hu <[email protected]>

The value of 'h_idata_size' should be zero if no inline pcluster.

Thanks,
Gao Xiang

Quoted 18 lines
---
 lib/compress.c | 1 +
 1 file changed, 1 insertion(+)
lib/compress.c +1 -0
index ee3b856..2453d0a 100644
@@ -565,6 +565,7 @@ void z_erofs_drop_inline_pcluster(struct erofs_inode *inode)
 
 	h->h_advise = cpu_to_le16(le16_to_cpu(h->h_advise) &
 				  ~Z_EROFS_ADVISE_INLINE_PCLUSTER);
+	h->h_idata_size = 0;
 	if (!inode->eof_tailraw)
 		return;
 	DBG_BUGON(inode->compressed_idata != true);
Signature · 1 line
2.17.1