All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: "Georg Müller" <georgmueller@gmx.net>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: overlayfs: supporting O_TMPFILE
Date: Fri, 29 Oct 2021 01:37:49 +0300	[thread overview]
Message-ID: <CAOQ4uxh_P0fiV9gQOs9CLvB+xJpJT4hWfAFyKBx0A-TyxAma8Q@mail.gmail.com> (raw)
In-Reply-To: <951c68ed-3f0e-8d9b-6c10-690df778ecc2@gmx.net>

On Thu, Oct 28, 2021 at 11:41 PM Georg Müller <georgmueller@gmx.net> wrote:
>
> Hi,
>
> I was trying to implement .tmpfile for overlayfs inode_operations to support O_TMPFILE.
>
> Docker with aufs supports it, but this is deprecated and removed from current docker. I now have a work-around in my code (create tmpfile+unlink), but
> I thought it might be a good idea to have tmpfile support in overlayfs.
>
> I was trying to do it on my own, but I have some headaches to what is necessary to achieve the goal.
>
>  From my understanding, I have to find the dentry for the upper dir (or workdir) and call vfs_tmpdir() for this, but I am running from oops to oops.
>
> Is there some hint what I have to do to achieve the goal?
>

You'd want to use ovl_create_object() and probably pass a tmpfile argument
then pass it on struct ovl_cattr to ovl_create_or_link() after that
it becomes more complicated. You'd need ovl_create_tempfile() like
ovl_create_upper().
You can follow xfs_generic_create() for some clues.
You need parts of ovl_instantiate() but not all of it - it's a mess.

Good luck!
Amir.

  reply	other threads:[~2021-10-28 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 20:41 overlayfs: supporting O_TMPFILE Georg Müller
2021-10-28 22:37 ` Amir Goldstein [this message]
2021-10-29 12:54   ` Miklos Szeredi
2021-10-29 13:47     ` Georg Müller
2021-10-29 15:16     ` Georg Müller
2022-04-19 14:01     ` Georg Müller
2022-04-20  8:21     ` 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=CAOQ4uxh_P0fiV9gQOs9CLvB+xJpJT4hWfAFyKBx0A-TyxAma8Q@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=georgmueller@gmx.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 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.