From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Chengguang Xu <cgxu519@mykernel.net>,
Miklos Szeredi <miklos@szeredi.hu>,
overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v2] ovl: improving copy-up efficiency for big sparse file
Date: Thu, 31 Oct 2019 09:20:17 -0400 [thread overview]
Message-ID: <20191031132017.GA7308@redhat.com> (raw)
In-Reply-To: <CAOQ4uxhdSXAvFQfhzZpBC=Xmmo9y+3AOU1o-tOWsLtr2ntU6Ag@mail.gmail.com>
On Thu, Oct 31, 2019 at 08:53:15AM +0200, Amir Goldstein wrote:
[..]
> > > > +
> > > > + if (!error && set_size) {
> > > > + inode_lock(new->dentry->d_inode);
> > > > + error = ovl_set_size(new->dentry, stat);
> > > > + inode_unlock(new->dentry->d_inode);
> > > > + }
> > >
> > > I see no reason to repeat this code here.
> > > Two options:
> > > 1. always set_size at the end of ovl_copy_up_inode()
> > > what's the harm in that?
> >
> > I think at least it's not suitable for directory.
> >
> >
> > > 2. set boolean c->set_size here and check it at the end
> > > of ovl_copy_up_inode() instead of checking c->metacopy
> > >
> >
> > I don't understand why 'c->set_size' can replace 'c->metacopy',
> >
>
> I did not explain myself well.
>
> This should be enough IMO:
>
> @@ -483,7 +483,7 @@ static int ovl_copy_up_inode(struct
> ovl_copy_up_ctx *c, struct dentry *temp)
> }
>
> inode_lock(temp->d_inode);
> - if (c->metacopy)
> + if (S_ISREG(c->stat.mode))
> err = ovl_set_size(temp, &c->stat);
Hi Amir,
Why do we need this change. c->metacopy is set only for regular files.
ovl_need_meta_copy_up() {
if (!S_ISREG(mode))
return false;
}
Even if there is a reason, this change should be part of a separate patch.
What connection does it have to skip holes while copying up.
Thanks
Vivek
next prev parent reply other threads:[~2019-10-31 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 12:44 [PATCH v2] ovl: improving copy-up efficiency for big sparse file Chengguang Xu
2019-10-30 15:50 ` Amir Goldstein
2019-10-31 5:33 ` Chengguang Xu
2019-10-31 6:53 ` Amir Goldstein
2019-10-31 8:25 ` Chengguang Xu
2019-10-31 9:06 ` Amir Goldstein
2019-10-31 9:19 ` Chengguang Xu
2019-10-31 9:41 ` Amir Goldstein
2019-10-31 13:20 ` Vivek Goyal [this message]
2019-10-31 13:44 ` Miklos Szeredi
2019-11-03 12:43 ` Chengguang Xu
2019-11-03 14:46 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191031132017.GA7308@redhat.com \
--to=vgoyal@redhat.com \
--cc=amir73il@gmail.com \
--cc=cgxu519@mykernel.net \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox