[PATCH 4/4] erofs: simplify the name collision checking in share domain mode
Jingbo Xu
jefflexu at linux.alibaba.com
Thu Feb 9 16:01:11 AEDT 2023
On 2/8/23 3:17 PM, Jingbo Xu wrote:
> When share domain is enabled, data blobs can be shared among filesystem
> instances in the same domain for data deduplication, while bootstrap
> blobs are always dedicated to the corresponding filesystem instance, and
> have no need to be shared.
>
> In the initial implementation of share domain (commit 7d41963759fe
> ("erofs: Support sharing cookies in the same domain")), bootstrap blobs
> are also in the share domain, and thus can be referenced by the
> following filesystem instances. In this case, mounting twice with the
> same fsid and domain_id will trigger warning in sysfs. Commit
> 27f2a2dcc626 ("erofs: check the uniqueness of fsid in shared domain in
> advance") fixes this by introducing the name collision checking.
>
> This patch attempts to fix the above issue in another simpler way.
> Since the bootstrap blobs have no need to be shared, move them out of
> the share domain, so that one bootstrap blob can not be referenced by
> other filesystem instances. Attempt to mount twice with the same fsid
> and domain_id will fail with info of duplicate cookies, which is
> consistent with the behavior in non-share-domain mode.
>
In non-share-domain mode, the uniqueness of primary data blob is
actually guaranteed by fscache_acquire_volume(), since
fscache_acquire_volume() will fail if attempt to mount the same fsid twice.
Thus hold on for this patch.
--
Thanks,
Jingbo
More information about the Linux-erofs
mailing list