From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH v2 0/4] Stash overlay real upper file in backing_file
Date: Mon, 7 Oct 2024 13:15:54 +0200 [thread overview]
Message-ID: <CAJfpegtdL0R9BgbdMP7YzEVD0ZdWV=71cWSZtkCFhhOjXWOzrg@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxi0LKDi0VaYzDq0ja-Qn0D=Zg_wxraqnVomat29Z1QVuw@mail.gmail.com>
On Mon, 7 Oct 2024 at 13:02, Amir Goldstein <amir73il@gmail.com> wrote:
> What I see after my patch is that ->private_data points to a singly
> linked list of length 1 to 2 of backing files.
Well, yeah.
Still, it's adding (arguably minimal) data and code to backing_file,
that is overlay specific. If you show how this is relevant to fuse's
use of backing files, then that's a much stronger argument in favor.
> Well, this is not any worth that current ->private_data, but I could
> also make it, if you like it better:
>
> struct backing_file {
> struct file file;
> struct path user_path;
> + struct file *next;
> };
>
> +struct file **backing_file_private_ptr(struct file *f)
> +{
> + return &backing_file(f)->next;
> +}
> +EXPORT_SYMBOL_GPL(backing_file_next_ptr);
Yeah, that would solve type safety, but would make the infrastructure
less generic.
> Again, I am not terribly opposed to allocating struct ovl_file as we do
> with directory - it is certainly more straight forward to read, so that
> is a good enough argument in itself, and "personal dislike" is also a fair
> argument, just arguing for the sake of argument so you understand my POV.
I think readability is more important here than savings on memory or CPU.
Thanks,
Miklos
next prev parent reply other threads:[~2024-10-07 11:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 8:23 [PATCH v2 0/4] Stash overlay real upper file in backing_file Amir Goldstein
2024-10-06 8:23 ` [PATCH v2 1/4] ovl: do not open non-data lower file for fsync Amir Goldstein
2024-10-06 8:23 ` [PATCH v2 2/4] ovl: stash upper real file in backing_file struct Amir Goldstein
2024-10-06 21:04 ` Al Viro
2024-10-07 3:03 ` Al Viro
2024-10-07 3:42 ` Al Viro
2024-10-07 6:34 ` Amir Goldstein
2024-10-06 8:23 ` [PATCH v2 3/4] ovl: convert ovl_real_fdget_path() callers to ovl_real_file_path() Amir Goldstein
2024-10-07 3:12 ` Al Viro
2024-10-07 6:36 ` Amir Goldstein
2024-10-06 8:23 ` [PATCH v2 4/4] ovl: convert ovl_real_fdget() callers to ovl_real_file() Amir Goldstein
2024-10-07 9:35 ` [PATCH v2 0/4] Stash overlay real upper file in backing_file Miklos Szeredi
2024-10-07 10:22 ` Amir Goldstein
2024-10-07 10:37 ` Miklos Szeredi
2024-10-07 11:01 ` Amir Goldstein
2024-10-07 11:15 ` Miklos Szeredi [this message]
2024-10-07 12:42 ` Amir Goldstein
2024-10-07 14:11 ` Christian Brauner
2024-10-07 14: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='CAJfpegtdL0R9BgbdMP7YzEVD0ZdWV=71cWSZtkCFhhOjXWOzrg@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).