All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Chengguang Xu <cgxu519@mykernel.net>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs <linux-unionfs@vger.kernel.org>,
	Ritesh Harjani <riteshh@linux.ibm.com>
Subject: Re: a question about opening file
Date: Thu, 5 Nov 2020 16:05:26 +0200	[thread overview]
Message-ID: <CAOQ4uxiGy5iGqMczJqX70UGCP3CNyuqh3KiQWOG9TKj5Hqms-Q@mail.gmail.com> (raw)
In-Reply-To: <1759833fcec.11bebc5a09074.619089384538905286@mykernel.net>

On Thu, Nov 5, 2020 at 1:39 PM Chengguang Xu <cgxu519@mykernel.net> wrote:
>
>  ---- 在 星期四, 2020-11-05 17:57:15 Miklos Szeredi <miklos@szeredi.hu> 撰写 ----
>  > On Thu, Nov 5, 2020 at 10:38 AM Chengguang Xu <cgxu519@mykernel.net> wrote:
>  > >
>  > >  ---- 在 星期四, 2020-11-05 16:07:26 Amir Goldstein <amir73il@gmail.com> 撰写 ----
>  > >  > On Thu, Nov 5, 2020 at 6:39 AM Chengguang Xu <cgxu519@mykernel.net> wrote:
>  > >  > >
>  > >  > > Hello,
>  > >  > >
>  > >  > > I have a question about opening file of underlying filesystem in overlayfs,
>  > >  > >
>  > >  > > why we use overlayfs' path(vfsmount/dentry) struct for underlying fs' file
>  > >  > >
>  > >  > > in ovl_open_realfile()?  Is it by design?
>  > >  >
>  > >  > Sure. open_with_fake_path() is only used by overlayfs.
>  > >  >
>  > >  > IIRC, one of the reasons was to display the user expected path in
>  > >  > /proc/<pid>/maps.
>  > >  > There may have been other reasons.
>  > >  >
>  > >
>  > > So if we do the mmap with overlayfs'  own page cache, then we don't have to
>  > > use pseudo path for the reason above, right?
>  > >
>  > > Actually, the background is I'm trying to implement overlayfs' page cache for
>  > > fixing mmap rorw issue. The reason why asking this is I need to open a writeback
>  > > file which is used for syncing dirty data from overlayfs' own page cache to upper inode.
>  > > However, if I use the pseudo path just like current opening behavior, the writeback
>  > > file will hold a reference of vfsmount of overlayfs and it will cause umount fail with -EBUSY.
>  > > So I want to open a writeback file with correct underlying path struct but not sure if
>  > > there is any unexpected side effect. Any suggestion?
>  >
>  > Should be no issue with plain dentry_open() for that purpose.  In fact
>  > it would be really good to get rid of all that d_real*() mess
>  > completely, but that seems some ways off.
>  >
>  > Did you find the prototype we did with Amir a couple of years back?  I
>  > can only find bits and pieces in my mailbox...
>  >
>
> I searched in overlayfs mail list but unfortunately didn't  get useful info.
> Seems Amir has a git tree for aops prototype but I'm not sure if that is the
> prototype you mentioned.
>
> https://github.com/amir73il/linux/commits/ovl-aops-wip
>
> Hi Amir,
>
> Do you know the prototype that Miklos mentioned above? Is that the
> code in your ovl-aops-wip git tree?
>

Yes it is.
The discussion over that branch and remaining TODO is on this thread [1].

CCing Ritesh who also expressed intention to start beating this
branch into shape.

If you go over the code/emails and still feel lost, I think it is best to have
a video call.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-unionfs/CAJfpegsyA4SjmtAEpkMoKsvgmW0CiEwWEAbU7v3yJztLKmC0Eg@mail.gmail.com/

  reply	other threads:[~2020-11-05 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  1:48 a question about opening file Chengguang Xu
2020-11-05  8:07 ` Amir Goldstein
2020-11-05  9:38   ` Chengguang Xu
2020-11-05  9:57     ` Miklos Szeredi
2020-11-05 11:39       ` Chengguang Xu
2020-11-05 14:05         ` Amir Goldstein [this message]
2020-11-09 10:03           ` Chengguang Xu

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=CAOQ4uxiGy5iGqMczJqX70UGCP3CNyuqh3KiQWOG9TKj5Hqms-Q@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=cgxu519@mykernel.net \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=riteshh@linux.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.