[PATCH] erofs-utils: set opaque flag for directories in tarerofs mode

Jingbo Xu jefflexu at linux.alibaba.com
Tue Apr 2 16:51:47 AEDT 2024



On 4/2/24 10:58 AM, Gao Xiang wrote:
> Opaque dir flag is needed if the tar tree is used immediately for
> the upcoming append mode.
> 
> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
> ---
>  lib/tar.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/tar.c b/lib/tar.c
> index 7c271f6..b45657d 100644
> --- a/lib/tar.c
> +++ b/lib/tar.c
> @@ -909,6 +909,11 @@ restart:
>  	} else if (opq) {
>  		DBG_BUGON(d->type == EROFS_FT_UNKNOWN);
>  		DBG_BUGON(!d->inode);
> +		/*
> +		 * needed if the tar tree is used soon, thus we have no chance
> +		 * to generate it from xattrs.  No impact to mergefs.
> +		 */
> +		d->inode->opaque = true;
>  		ret = erofs_set_opaque_xattr(d->inode);
>  		goto out;
>  	} else if (th->typeflag == '1') {	/* hard link cases */

LGTM.

Reviewed-by: Jingbo Xu <jefflexu at linux.alibaba.com>

-- 
Thanks,
Jingbo


More information about the Linux-erofs mailing list