[PATCH v6 15/22] erofs: register cookie context for bootstrap blob

Gao Xiang hsiangkao at linux.alibaba.com
Mon Mar 28 14:04:41 AEDT 2022


On Fri, Mar 25, 2022 at 08:22:16PM +0800, Jeffle Xu wrote:
> Registers fscache_cookie for the bootstrap blob file. The bootstrap blob
> file can be specified by a new mount option, which is going to be
> introduced by a following patch.
> 
> Something worth mentioning about the cleanup routine.
> 
> 1. The init routine is prior to when the root inode gets initialized,
> and thus the corresponding cleanup routine shall be placed inside
> .kill_sb() callback.
> 
> 2. The init routine will instantiate anonymous inodes under the
> super_block, and thus .put_super() callback shall also contain the
> cleanup routine. Or we'll get "VFS: Busy inodes after unmount." warning.
> 
> Signed-off-by: Jeffle Xu <jefflexu at linux.alibaba.com>
> ---
>  fs/erofs/internal.h |  3 +++
>  fs/erofs/super.c    | 17 +++++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index 459f31803c3b..d8c886a7491e 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -73,6 +73,7 @@ struct erofs_mount_opts {
>  	/* threshold for decompression synchronously */
>  	unsigned int max_sync_decompress_pages;
>  #endif
> +	char *tag;
>  	unsigned int mount_opt;
>  };
>  
> @@ -151,6 +152,8 @@ struct erofs_sb_info {
>  	/* sysfs support */
>  	struct kobject s_kobj;		/* /sys/fs/erofs/<devname> */
>  	struct completion s_kobj_unregister;
> +
> +	struct erofs_fscache *bootstrap;

the concept of bootstrap is nydus-specific. Actually here we need
a fscache context of the primary device.

So I prefer struct erofs_fscache *s_fscache;

Also please help revise the subject and commit message about
bootstrap.

Thanks,
Gao Xiang



More information about the Linux-erofs mailing list