From: "Georg Müller" <georgmueller@gmx.net>
To: Miklos Szeredi <miklos@szeredi.hu>, Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: overlayfs: supporting O_TMPFILE
Date: Fri, 29 Oct 2021 15:47:31 +0200 [thread overview]
Message-ID: <9ebbe5cc-becf-c491-1bf2-4d627fde15c8@gmx.net> (raw)
In-Reply-To: <YXvvAMJxj/DlyUqC@miu.piliscsaba.redhat.com>
Am 29.10.21 um 14:54 schrieb Miklos Szeredi:
> On Fri, Oct 29, 2021 at 01:37:49AM +0300, Amir Goldstein wrote:
>> 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.
> Here's something I prepared earlier;)
>
> Don't know why it got stuck, quite possibly I realized some fatal flaw that I
> can't remember anymore...
>
> Seems to work though, so getting this out for review and testing.
Thank you for the patch. I will give it a try in my local setup here and will come back with the results.
Best regards,
Georg
next prev parent reply other threads:[~2021-10-29 13:47 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
2021-10-29 12:54 ` Miklos Szeredi
2021-10-29 13:47 ` Georg Müller [this message]
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=9ebbe5cc-becf-c491-1bf2-4d627fde15c8@gmx.net \
--to=georgmueller@gmx.net \
--cc=amir73il@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).