Skip to contentSkip to conversation

erofs: support large folio in inode_share mode

PATCH In review Jingbo Xu 3 participants 3 messages Aug 21 – Aug 24 EROFS file system

lore
Share & tools
lore

Jingbo Xu

author
#0 lore raw

PATCH 1/1 erofs: support large folio in inode_share mode

erofs_fill_inode() calls mapping_set_large_folios() on each erofs file's own mapping, but in inode_share mode reads are routed to the shared inode's page cache instead, whose mapping never had large folio support enabled.

Set up large folios for the shared inode's mapping as well.

---
 fs/erofs/ishare.c | 1 +
 1 file changed, 1 insertion(+)
fs/erofs/ishare.c +1 -0
index 4c7be60565cb..b8897dd6be72 100644
@@ -54,6 +54,7 @@ bool erofs_ishare_fill_inode(struct inode *inode)
 		si->i_mapping->a_ops = aops;
 		si->i_mode = 0444 | S_IFREG;
 		si->i_size = inode->i_size;
+		mapping_set_large_folios(si->i_mapping);
 		unlock_new_inode(si);
 	} else {
 		kfree(fp.opaque);
Signature · 1 line
2.19.1.6.gb485710b
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jingbo Xu

erofs_fill_inode() calls mapping_set_large_folios() on each erofs file's own mapping, but in inode_share mode reads are routed to the shared inode's page cache instead, whose mapping never had large folio support enabled.

Set up large folios for the shared inode's mapping as well.

Thanks,
Gao Xiang

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Jingbo Xu
Quoted 8 lines · Jingbo Xu

erofs_fill_inode() calls mapping_set_large_folios() on each erofs file's own mapping, but in inode_share mode reads are routed to the shared inode's page cache instead, whose mapping never had large folio support enabled.

Set up large folios for the shared inode's mapping as well.

Thanks,