* [PATCH v7 0/2] erofs: share the superblock for file-backed mounts
@ 2026-10-02 16:31 Giuseppe Scrivano
2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Giuseppe Scrivano @ 2026-10-02 16:31 UTC (permalink / raw)
To: linux-erofs
Cc: xiang, linux-fsdevel, amir73il, giuseppe, brauner, viro, jack,
hch
v6: https://lore.kernel.org/linux-fsdevel/20260812142907.1010046-1-gscrivan@redhat.com/
v5: https://lore.kernel.org/linux-fsdevel/20260811071241.389589-1-gscrivan@redhat.com/
v4: https://lore.kernel.org/linux-fsdevel/20260804060455.2928514-1-gscrivan@redhat.com/
v3: https://lore.kernel.org/linux-fsdevel/20260801075446.2508805-1-gscrivan@redhat.com/
v2: https://lore.kernel.org/linux-fsdevel/20260731160901.2276832-1-gscrivan@redhat.com/
v1: https://lore.kernel.org/linux-fsdevel/20260730124120.1501126-1-gscrivan@redhat.com/
Giuseppe Scrivano (2):
fs: rename vfs_get_super() to get_tree_super() and export it
erofs: reuse superblock for file-backed mounts
Documentation/filesystems/erofs.rst | 7 ++++
fs/erofs/internal.h | 1 +
fs/erofs/super.c | 56 +++++++++++++++++++++++++++--
fs/super.c | 19 +++++++---
include/linux/fs_context.h | 4 +++
5 files changed, 80 insertions(+), 7 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it 2026-10-02 16:31 [PATCH v7 0/2] erofs: share the superblock for file-backed mounts Giuseppe Scrivano @ 2026-10-02 16:31 ` Giuseppe Scrivano 2026-10-05 8:14 ` Christoph Hellwig ` (2 more replies) 2026-10-02 16:31 ` [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts Giuseppe Scrivano 2026-10-12 10:48 ` (subset) [PATCH v7 0/2] erofs: share the " Christian Brauner 2 siblings, 3 replies; 8+ messages in thread From: Giuseppe Scrivano @ 2026-10-02 16:31 UTC (permalink / raw) To: linux-erofs Cc: xiang, linux-fsdevel, amir73il, giuseppe, brauner, viro, jack, hch Rename and export it so filesystems that need a custom superblock matching policy can reuse it directly instead of open-coding sget_fc() + fill_super(). No functional change. This is a preparatory fix for the next patch. Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org> --- fs/super.c | 19 +++++++++++++++---- include/linux/fs_context.h | 4 ++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/fs/super.c b/fs/super.c index 1d5ccf540a9b..a1dc4de1b657 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1374,7 +1374,17 @@ static int test_single_super(struct super_block *s, struct fs_context *fc) return 1; } -static int vfs_get_super(struct fs_context *fc, +/** + * get_tree_super - Get a superblock, optionally sharing an existing one + * @fc: The filesystem context holding the parameters + * @test: Comparison function to find a matching existing superblock, or NULL + * @fill_super: Helper to initialise a new superblock + * + * If @test is non-NULL and matches an existing superblock, that superblock is + * reused; otherwise a new anonymous superblock is created and initialised with + * @fill_super. Passing NULL for @test always creates a new superblock. + */ +int get_tree_super(struct fs_context *fc, int (*test)(struct super_block *, struct fs_context *), int (*fill_super)(struct super_block *sb, struct fs_context *fc)) @@ -1401,12 +1411,13 @@ static int vfs_get_super(struct fs_context *fc, deactivate_locked_super(sb); return err; } +EXPORT_SYMBOL_GPL(get_tree_super); int get_tree_nodev(struct fs_context *fc, int (*fill_super)(struct super_block *sb, struct fs_context *fc)) { - return vfs_get_super(fc, NULL, fill_super); + return get_tree_super(fc, NULL, fill_super); } EXPORT_SYMBOL(get_tree_nodev); @@ -1414,7 +1425,7 @@ int get_tree_single(struct fs_context *fc, int (*fill_super)(struct super_block *sb, struct fs_context *fc)) { - return vfs_get_super(fc, test_single_super, fill_super); + return get_tree_super(fc, test_single_super, fill_super); } EXPORT_SYMBOL(get_tree_single); @@ -1424,7 +1435,7 @@ int get_tree_keyed(struct fs_context *fc, void *key) { fc->s_fs_info = key; - return vfs_get_super(fc, test_keyed_super, fill_super); + return get_tree_super(fc, test_keyed_super, fill_super); } EXPORT_SYMBOL(get_tree_keyed); diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h index 0d6c8a6d7be2..d1727dffecc5 100644 --- a/include/linux/fs_context.h +++ b/include/linux/fs_context.h @@ -150,6 +150,10 @@ extern int vfs_parse_fs_param_source(struct fs_context *fc, struct fs_parameter *param); extern void fc_drop_locked(struct fs_context *fc); +int get_tree_super(struct fs_context *fc, + int (*test)(struct super_block *, struct fs_context *), + int (*fill_super)(struct super_block *sb, + struct fs_context *fc)); extern int get_tree_nodev(struct fs_context *fc, int (*fill_super)(struct super_block *sb, struct fs_context *fc)); -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano @ 2026-10-05 8:14 ` Christoph Hellwig 2026-10-05 12:38 ` Jan Kara 2026-10-06 11:08 ` Gao Xiang 2 siblings, 0 replies; 8+ messages in thread From: Christoph Hellwig @ 2026-10-05 8:14 UTC (permalink / raw) To: Giuseppe Scrivano Cc: linux-erofs, xiang, linux-fsdevel, amir73il, brauner, viro, jack, hch Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano 2026-10-05 8:14 ` Christoph Hellwig @ 2026-10-05 12:38 ` Jan Kara 2026-10-06 11:08 ` Gao Xiang 2 siblings, 0 replies; 8+ messages in thread From: Jan Kara @ 2026-10-05 12:38 UTC (permalink / raw) To: Giuseppe Scrivano Cc: linux-erofs, xiang, linux-fsdevel, amir73il, brauner, viro, jack, hch On Fri 02-10-26 18:31:43, Giuseppe Scrivano wrote: > Rename and export it so filesystems that need a custom superblock > matching policy can reuse it directly instead of open-coding sget_fc() > + fill_super(). No functional change. > > This is a preparatory fix for the next patch. > > Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org> OK, AFAIU you are essentially implementing kind of bind-mounting for your file-backed mounts, aren't you? I guess makes sense. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > fs/super.c | 19 +++++++++++++++---- > include/linux/fs_context.h | 4 ++++ > 2 files changed, 19 insertions(+), 4 deletions(-) > > diff --git a/fs/super.c b/fs/super.c > index 1d5ccf540a9b..a1dc4de1b657 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -1374,7 +1374,17 @@ static int test_single_super(struct super_block *s, struct fs_context *fc) > return 1; > } > > -static int vfs_get_super(struct fs_context *fc, > +/** > + * get_tree_super - Get a superblock, optionally sharing an existing one > + * @fc: The filesystem context holding the parameters > + * @test: Comparison function to find a matching existing superblock, or NULL > + * @fill_super: Helper to initialise a new superblock > + * > + * If @test is non-NULL and matches an existing superblock, that superblock is > + * reused; otherwise a new anonymous superblock is created and initialised with > + * @fill_super. Passing NULL for @test always creates a new superblock. > + */ > +int get_tree_super(struct fs_context *fc, > int (*test)(struct super_block *, struct fs_context *), > int (*fill_super)(struct super_block *sb, > struct fs_context *fc)) > @@ -1401,12 +1411,13 @@ static int vfs_get_super(struct fs_context *fc, > deactivate_locked_super(sb); > return err; > } > +EXPORT_SYMBOL_GPL(get_tree_super); > > int get_tree_nodev(struct fs_context *fc, > int (*fill_super)(struct super_block *sb, > struct fs_context *fc)) > { > - return vfs_get_super(fc, NULL, fill_super); > + return get_tree_super(fc, NULL, fill_super); > } > EXPORT_SYMBOL(get_tree_nodev); > > @@ -1414,7 +1425,7 @@ int get_tree_single(struct fs_context *fc, > int (*fill_super)(struct super_block *sb, > struct fs_context *fc)) > { > - return vfs_get_super(fc, test_single_super, fill_super); > + return get_tree_super(fc, test_single_super, fill_super); > } > EXPORT_SYMBOL(get_tree_single); > > @@ -1424,7 +1435,7 @@ int get_tree_keyed(struct fs_context *fc, > void *key) > { > fc->s_fs_info = key; > - return vfs_get_super(fc, test_keyed_super, fill_super); > + return get_tree_super(fc, test_keyed_super, fill_super); > } > EXPORT_SYMBOL(get_tree_keyed); > > diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h > index 0d6c8a6d7be2..d1727dffecc5 100644 > --- a/include/linux/fs_context.h > +++ b/include/linux/fs_context.h > @@ -150,6 +150,10 @@ extern int vfs_parse_fs_param_source(struct fs_context *fc, > struct fs_parameter *param); > extern void fc_drop_locked(struct fs_context *fc); > > +int get_tree_super(struct fs_context *fc, > + int (*test)(struct super_block *, struct fs_context *), > + int (*fill_super)(struct super_block *sb, > + struct fs_context *fc)); > extern int get_tree_nodev(struct fs_context *fc, > int (*fill_super)(struct super_block *sb, > struct fs_context *fc)); > -- > 2.55.0 > -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano 2026-10-05 8:14 ` Christoph Hellwig 2026-10-05 12:38 ` Jan Kara @ 2026-10-06 11:08 ` Gao Xiang 2 siblings, 0 replies; 8+ messages in thread From: Gao Xiang @ 2026-10-06 11:08 UTC (permalink / raw) To: brauner Cc: Giuseppe Scrivano, linux-erofs, xiang, linux-fsdevel, amir73il, viro, jack, hch Hi Christian, On Fri, Oct 02, 2026 at 06:31:43PM +0200, Giuseppe Scrivano wrote: > Rename and export it so filesystems that need a custom superblock > matching policy can reuse it directly instead of open-coding sget_fc() > + fill_super(). No functional change. > > This is a preparatory fix for the next patch. > > Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org> Could you replace the previous patch in https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs-7.4.shared.super with this version? It addresses Christoph's previous review, I could pick up the updated branch then: https://lore.kernel.org/r/arY9FCatWwCw418K@infradead.org Thanks for Christoph and Jan's review here again! Thanks, Gao Xiang ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts 2026-10-02 16:31 [PATCH v7 0/2] erofs: share the superblock for file-backed mounts Giuseppe Scrivano 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano @ 2026-10-02 16:31 ` Giuseppe Scrivano 2026-10-12 16:23 ` Gao Xiang 2026-10-12 10:48 ` (subset) [PATCH v7 0/2] erofs: share the " Christian Brauner 2 siblings, 1 reply; 8+ messages in thread From: Giuseppe Scrivano @ 2026-10-02 16:31 UTC (permalink / raw) To: linux-erofs Cc: xiang, linux-fsdevel, amir73il, giuseppe, brauner, viro, jack, hch When the same file-backed image is mounted multiple times (via path or fd) with the superblock_share mount option, reuse the existing superblock instead of creating a new one. This allows multiple mounts of the same image to share in-kernel data structures more efficiently. The backing file is identified by its inode and fsoffset. If mount options conflict or extra devices are used, a separate superblock is created transparently as a fallback. Remount is not allowed on shared superblocks. Tested by mounting a 177M Fedora EROFS image 20 times with full traversal: #!/bin/sh IMG=${1:-/root/fedora.erofs} OPTS=${2:+-o $2} N=20 DIR=$(mktemp -d) trap "umount $DIR/m* 2>/dev/null; rm -rf $DIR" EXIT sync; echo 3 > /proc/sys/vm/drop_caches INODES_BEFORE=$(grep erofs_inode /proc/slabinfo | awk '{print $2}') MEM_BEFORE=$(grep ^Slab: /proc/meminfo | awk '{print $2}') for i in $(seq 1 $N); do mkdir $DIR/m$i mount -t erofs $OPTS "$IMG" $DIR/m$i find $DIR/m$i > /dev/null done echo "Superblocks: $(grep $DIR /proc/self/mountinfo | \ awk '{print $3}' | sort -u | wc -l)" echo "erofs_inode delta: +$(( $(grep erofs_inode /proc/slabinfo | \ awk '{print $2}') - INODES_BEFORE ))" echo "Slab delta: +$(( $(grep ^Slab: /proc/meminfo | \ awk '{print $2}') - MEM_BEFORE )) kB" without superblock_share: # time ./test.sh /root/fedora.erofs Superblocks: 20 erofs_inode delta: +45864 Slab delta: +37448 kB real 0m2.311s user 0m0.222s sys 0m1.998s with superblock_share: # time ./test.sh /root/fedora.erofs superblock_share Superblocks: 1 erofs_inode delta: +2044 Slab delta: +284 kB real 0m0.679s user 0m0.157s sys 0m0.469s The time difference shows that sharing the superblock also benefits the page cache and inode cache, as subsequent mounts of the same image avoid re-reading the backing file. This is particularly useful for container hosts running multiple containers from the same base image. Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org> --- Documentation/filesystems/erofs.rst | 7 ++++ fs/erofs/internal.h | 1 + fs/erofs/super.c | 56 +++++++++++++++++++++++++++-- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst index d301d9ac946a..02caf3b061fe 100644 --- a/Documentation/filesystems/erofs.rst +++ b/Documentation/filesystems/erofs.rst @@ -139,6 +139,9 @@ inode_share Enable inode page sharing for this filesystem. Inodes wi page cache. source=%s (For file-backed mounts) Specify the backing image as a path or as an already-opened file descriptor. +superblock_share (For file-backed mounts) Share the superblock when the same + backing file is mounted more than once with compatible + options. Remount is not allowed on shared superblocks. =================== ========================================================= File-backed mounts @@ -156,6 +159,10 @@ Only regular files are accepted as backing files; to mount an image that resides on a block device, use the traditional block device mount path instead. +When superblock_share is specified, multiple mounts of the same backing +file at the same fsoffset with compatible mount options can share a single +superblock. Remount is not allowed on shared superblocks. + Sysfs Entries ============= diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 12e3a5b80a5a..da58053c1116 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -150,6 +150,7 @@ struct erofs_sb_info { #define EROFS_MOUNT_DAX_NEVER 0x00000080 #define EROFS_MOUNT_DIRECT_IO 0x00000100 #define EROFS_MOUNT_INODE_SHARE 0x00000200 +#define EROFS_MOUNT_SUPERBLOCK_SHARE 0x00000400 #define clear_opt(opt, option) ((opt)->mount_opt &= ~EROFS_MOUNT_##option) #define set_opt(opt, option) ((opt)->mount_opt |= EROFS_MOUNT_##option) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 0967aace9f7f..16fa3b853f1b 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -386,7 +386,7 @@ static void erofs_default_options(struct erofs_sb_info *sbi) enum { Opt_user_xattr, Opt_acl, Opt_cache_strategy, Opt_dax, Opt_dax_enum, Opt_device, Opt_domain_id, Opt_directio, Opt_fsoffset, Opt_inode_share, - Opt_source, + Opt_source, Opt_superblock_share, }; static const struct constant_table erofs_param_cache_strategy[] = { @@ -415,6 +415,7 @@ static const struct fs_parameter_spec erofs_fs_parameters[] = { fsparam_u64("fsoffset", Opt_fsoffset), fsparam_flag("inode_share", Opt_inode_share), fsparam_file_or_string("source", Opt_source), + fsparam_flag("superblock_share", Opt_superblock_share), {} }; @@ -560,6 +561,12 @@ static int erofs_fc_parse_param(struct fs_context *fc, else set_opt(&sbi->opt, INODE_SHARE); break; + case Opt_superblock_share: + if (!IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE)) + errorfc(fc, "%s option not supported", erofs_fs_parameters[opt].name); + else + set_opt(&sbi->opt, SUPERBLOCK_SHARE); + break; case Opt_source: return erofs_fc_parse_source(fc, param); } @@ -667,6 +674,16 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) errorfc(fc, "FSDAX is not allowed when inode_share is on"); return -EINVAL; } + if (test_opt(&sbi->opt, SUPERBLOCK_SHARE) && + test_opt(&sbi->opt, INODE_SHARE)) { + errorfc(fc, "superblock_share is not allowed when inode_share is on"); + return -EINVAL; + } + if (test_opt(&sbi->opt, SUPERBLOCK_SHARE) && + sbi->devs->extra_devices) { + errorfc(fc, "superblock_share does not support extra devices"); + return -EINVAL; + } sbi->blkszbits = PAGE_SHIFT; if (erofs_is_fileio_mode(sbi)) { @@ -794,6 +811,35 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) return 0; } +/* + * The function is used only with a sbi that has SUPERBLOCK_SHARE set, + * so that the memcmp later ensures new_sbi is also shareable. + */ +static int erofs_sb_share_test_super(struct super_block *sb, + struct fs_context *fc) +{ + struct erofs_sb_info *sbi = EROFS_SB(sb); + struct erofs_sb_info *new_sbi = fc->s_fs_info; + + if (sb->s_iflags & SB_I_RETIRED) + return 0; + if (!sbi->dif0.file || !new_sbi->dif0.file) + return 0; + return file_inode(sbi->dif0.file) == file_inode(new_sbi->dif0.file) && + sbi->dif0.fsoff == new_sbi->dif0.fsoff && + !memcmp(&sbi->opt, &new_sbi->opt, sizeof(sbi->opt)); +} + +static int erofs_file_get_tree(struct fs_context *fc) +{ + struct erofs_sb_info *sbi = fc->s_fs_info; + + if (!test_opt(&sbi->opt, SUPERBLOCK_SHARE)) + return get_tree_nodev(fc, erofs_fc_fill_super); + + return get_tree_super(fc, erofs_sb_share_test_super, erofs_fc_fill_super); +} + static int erofs_fc_get_tree(struct fs_context *fc) { struct erofs_sb_info *sbi = fc->s_fs_info; @@ -809,7 +855,7 @@ static int erofs_fc_get_tree(struct fs_context *fc) errorfc(fc, "source is unsupported"); return -EINVAL; } - return get_tree_nodev(fc, erofs_fc_fill_super); + return erofs_file_get_tree(fc); } ret = get_tree_bdev_flags(fc, erofs_fc_fill_super, @@ -827,7 +873,7 @@ static int erofs_fc_get_tree(struct fs_context *fc) if (S_ISREG(file_inode(sbi->dif0.file)->i_mode) && sbi->dif0.file->f_mapping->a_ops->read_folio) - return get_tree_nodev(fc, erofs_fc_fill_super); + return erofs_file_get_tree(fc); } return ret; } @@ -840,6 +886,10 @@ static int erofs_fc_reconfigure(struct fs_context *fc) DBG_BUGON(!sb_rdonly(sb)); + /* Shared superblocks must not be reconfigured. */ + if (test_opt(&sbi->opt, SUPERBLOCK_SHARE)) + return -EBUSY; + if (new_sbi->domain_id) erofs_info(sb, "ignoring reconfiguration for domain_id."); -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts 2026-10-02 16:31 ` [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts Giuseppe Scrivano @ 2026-10-12 16:23 ` Gao Xiang 0 siblings, 0 replies; 8+ messages in thread From: Gao Xiang @ 2026-10-12 16:23 UTC (permalink / raw) To: Giuseppe Scrivano Cc: linux-erofs, xiang, linux-fsdevel, amir73il, brauner, viro, jack, hch On Fri, Oct 02, 2026 at 06:31:44PM +0200, Giuseppe Scrivano wrote: > When the same file-backed image is mounted multiple times (via path or > fd) with the superblock_share mount option, reuse the existing > superblock instead of creating a new one. This allows multiple mounts > of the same image to share in-kernel data structures more efficiently. > > The backing file is identified by its inode and fsoffset. If mount > options conflict or extra devices are used, a separate superblock > is created transparently as a fallback. Remount is not allowed on > shared superblocks. > > Tested by mounting a 177M Fedora EROFS image 20 times with full > traversal: > > #!/bin/sh > IMG=${1:-/root/fedora.erofs} > OPTS=${2:+-o $2} > N=20 > DIR=$(mktemp -d) > trap "umount $DIR/m* 2>/dev/null; rm -rf $DIR" EXIT > > sync; echo 3 > /proc/sys/vm/drop_caches > INODES_BEFORE=$(grep erofs_inode /proc/slabinfo | awk '{print $2}') > MEM_BEFORE=$(grep ^Slab: /proc/meminfo | awk '{print $2}') > > for i in $(seq 1 $N); do > mkdir $DIR/m$i > mount -t erofs $OPTS "$IMG" $DIR/m$i > find $DIR/m$i > /dev/null > done > > echo "Superblocks: $(grep $DIR /proc/self/mountinfo | \ > awk '{print $3}' | sort -u | wc -l)" > echo "erofs_inode delta: +$(( $(grep erofs_inode /proc/slabinfo | \ > awk '{print $2}') - INODES_BEFORE ))" > echo "Slab delta: +$(( $(grep ^Slab: /proc/meminfo | \ > awk '{print $2}') - MEM_BEFORE )) kB" > > without superblock_share: > > # time ./test.sh /root/fedora.erofs > Superblocks: 20 > erofs_inode delta: +45864 > Slab delta: +37448 kB > real 0m2.311s > user 0m0.222s > sys 0m1.998s > > with superblock_share: > > # time ./test.sh /root/fedora.erofs superblock_share > Superblocks: 1 > erofs_inode delta: +2044 > Slab delta: +284 kB > real 0m0.679s > user 0m0.157s > sys 0m0.469s > > The time difference shows that sharing the superblock also benefits > the page cache and inode cache, as subsequent mounts of the same image > avoid re-reading the backing file. This is particularly useful for > container hosts running multiple containers from the same base image. > > Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org> Reviewed-by: Gao Xiang <xiang@kernel.org> And applied to -next. Thanks, Gao Xiang ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH v7 0/2] erofs: share the superblock for file-backed mounts 2026-10-02 16:31 [PATCH v7 0/2] erofs: share the superblock for file-backed mounts Giuseppe Scrivano 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano 2026-10-02 16:31 ` [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts Giuseppe Scrivano @ 2026-10-12 10:48 ` Christian Brauner 2 siblings, 0 replies; 8+ messages in thread From: Christian Brauner @ 2026-10-12 10:48 UTC (permalink / raw) To: linux-erofs, Giuseppe Scrivano Cc: Christian Brauner, xiang, linux-fsdevel, amir73il, viro, jack, hch On Fri, 02 Oct 2026 18:31:42 +0200, Giuseppe Scrivano wrote: > v6: https://lore.kernel.org/linux-fsdevel/20260812142907.1010046-1-gscrivan@redhat.com/ > v5: https://lore.kernel.org/linux-fsdevel/20260811071241.389589-1-gscrivan@redhat.com/ > v4: https://lore.kernel.org/linux-fsdevel/20260804060455.2928514-1-gscrivan@redhat.com/ > v3: https://lore.kernel.org/linux-fsdevel/20260801075446.2508805-1-gscrivan@redhat.com/ > v2: https://lore.kernel.org/linux-fsdevel/20260731160901.2276832-1-gscrivan@redhat.com/ > v1: https://lore.kernel.org/linux-fsdevel/20260730124120.1501126-1-gscrivan@redhat.com/ > > [...] Applied to the vfs-7.4.shared.super branch of the vfs/vfs.git tree. Patches in the vfs-7.4.shared.super branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-7.4.shared.super [1/2] fs: rename vfs_get_super() to get_tree_super() and export it https://git.kernel.org/vfs/vfs/c/64571ba65816 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-12 16:23 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-02 16:31 [PATCH v7 0/2] erofs: share the superblock for file-backed mounts Giuseppe Scrivano 2026-10-02 16:31 ` [PATCH v7 1/2] fs: rename vfs_get_super() to get_tree_super() and export it Giuseppe Scrivano 2026-10-05 8:14 ` Christoph Hellwig 2026-10-05 12:38 ` Jan Kara 2026-10-06 11:08 ` Gao Xiang 2026-10-02 16:31 ` [PATCH v7 2/2] erofs: reuse superblock for file-backed mounts Giuseppe Scrivano 2026-10-12 16:23 ` Gao Xiang 2026-10-12 10:48 ` (subset) [PATCH v7 0/2] erofs: share the " Christian Brauner
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.