On Wed, Oct 18, 2017 at 12:05 AM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > If it makes sense to copy up only metadata during copy up, do it. This > is done for regular files which are not opened for WRITE and have origin > being saved. > > Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx> Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> See one nit below Also, for bisectability, it may make better sense to organize the patch series so that data copy is skipped after reading a metacopy file is implemented, but with metacopy being a new opt-in feature, I guess it doesn't matter that much. up to Mikos. > --- > fs/overlayfs/copy_up.c | 28 ++++++++++++++++++++-------- > 1 file changed, 20 insertions(+), 8 deletions(-) > > diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c > index 4c0acb2a23ea..cf0b36518a3a 100644 > --- a/fs/overlayfs/copy_up.c > +++ b/fs/overlayfs/copy_up.c > @@ -306,11 +306,8 @@ static int ovl_set_origin(struct dentry *dentry, struct dentry *lower, > return PTR_ERR(fh); > } > > - /* > - * Do not fail when upper doesn't support xattrs. > - */ > err = ovl_check_setxattr(dentry, upper, OVL_XATTR_ORIGIN, fh, > - fh ? fh->len : 0, 0); > + fh ? fh->len : 0, -EOPNOTSUPP); > kfree(fh); > > return err; > @@ -328,6 +325,7 @@ struct ovl_copy_up_ctx { > struct dentry *workdir; > bool tmpfile; > bool origin; > + bool metadata_only; Why not metacopy? to be consistent? -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html