Re: [PATCH 04/11] ovl: Provide a mount option metacopy=on/off for metadata copyup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 18, 2017 at 07:31:51AM +0300, Amir Goldstein wrote:

[..]
> > @@ -644,9 +664,16 @@ static int ovl_lower_dir(const char *name, struct path *path,
> >          * The inodes index feature needs to encode and decode file
> >          * handles, so it requires that all layers support them.
> >          */
> > -       if (ofs->config.index && !ovl_can_decode_fh(path->dentry->d_sb)) {
> > +       if ((ofs->config.index || ofs->config.metacopy) &&
> > +            !ovl_can_decode_fh(path->dentry->d_sb)) {
> > +               if (ofs->config.index)
> > +                       pr_warn("overlayfs: fs on '%s' does not support file handles, falling back to index=off.\n", name);
> > +
> > +               if (ofs->config.metacopy)
> > +                       pr_warn("overlayfs: fs on '%s' does not support file handles, falling back to metacopy=off.\n", name);
> > +
> 
> In my verify_dir patches I used the following more compact warning
> style instead of granular warnings:
> 
>     pr_warn("overlayfs: fs on '%s' does not support file handles,
> falling back to index=off,metacopy=off.\n", name);

Ok, I was not sure about it. I am fine with above style too.

BTW, I have a question. Current code seems to ensure that upper/work
supports file handles.

	/* Check if upper/work fs supports file handles */
	if (ufs->config.index &&
		!ovl_can_decode_fh(ufs->workdir->d_sb)) {
		ufs->config.index = false;
		pr_warn("overlayfs: upper fs does not support file handles, falling back to index=off.\n");
	}

I am wondering why that's the case and do I need it for metacopy feature
also. I thought that file handle support requirement was only on lower
dirs because they are the one who will export the origin file handle. All
upper has to do it that save this file handles in an xattr.

What am I missing?

Vivek
--
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



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux