[PATCH v8 8/8] erofs-utils: mkfs: add `--ovlfs-strip` option

Gao Xiang xiang at kernel.org
Wed Sep 13 23:47:52 AEST 2023


On Wed, Sep 13, 2023 at 08:03:03PM +0800, Jingbo Xu wrote:
> Add `--ovlfs-strip=[0|1]` option for tarfs and rebuild mode for now
> in order to control whether some overlayfs related stuffs (e.g.
> whiteout files, OVL_XATTR_OPAQUE and OVL_XATTR_ORIGIN xattrs) are
> finally stripped.
> 
> This option is disabled by default for mkfs, that is, the overlayfs
> related stuffs described above are kept in the image by default.
> 
> Specify `--ovlfs-strip=1` explicitly to strip these stuffs.
> 
> Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>
> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
> ---

...

> diff --git a/lib/xattr.c b/lib/xattr.c
> index e3a1b44..fffccb4 100644
> --- a/lib/xattr.c
> +++ b/lib/xattr.c
> @@ -499,11 +499,29 @@ int erofs_setxattr(struct erofs_inode *inode, char *key,
>  	return erofs_xattr_add(&inode->i_xattrs, item);
>  }
>  
> +static void erofs_clearxattr(struct erofs_inode *inode, const char *key)

I rename it as erofs_removexattr().

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list