From: Hongbo Li <lihongbo22@huawei.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: <tytso@mit.edu>, <adilger.kernel@dilger.ca>, <brauner@kernel.org>,
<jack@suse.cz>, <linux-ext4@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>, <chris.zjh@huawei.com>
Subject: Re: [PATCH v2] fs: ext4: support relative path for `journal_path` in mount option.
Date: Wed, 25 Sep 2024 10:32:55 +0800 [thread overview]
Message-ID: <39fa2184-e5f4-4709-961c-292917e358e9@huawei.com> (raw)
In-Reply-To: <20240925020913.GH3550746@ZenIV>
On 2024/9/25 10:09, Al Viro wrote:
> On Wed, Sep 25, 2024 at 09:56:24AM +0800, Hongbo Li wrote:
>> @@ -156,6 +156,9 @@ int fs_lookup_param(struct fs_context *fc,
>> f = getname_kernel(param->string);
>> if (IS_ERR(f))
>> return PTR_ERR(f);
>> + /* for relative path */
>> + if (f->name[0] != '/')
>> + param->dirfd = AT_FDCWD;
>
> Will need to dig around for some context, but this bit definitely makes
> no sense - dirfd is completely ignored for absolute pathnames, so making
> that store conditional is pointless.
>
Only do it for relative path. As mentioned in [1], if the "journal_path"
is treated as FSCONFIG_SET_PATH may be better, but mount(8) is passing a
string (which uses FSCONFIG_SET_STRING for "journal_path"). For the
relative path case, the dirfd should be assigned.
[1]
https://lore.kernel.org/all/20240527-mahlen-packung-3fe035ab390d@brauner/
Thanks,
Hongbo
>
next prev parent reply other threads:[~2024-09-25 2:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 1:56 [PATCH v2] fs: ext4: support relative path for `journal_path` in mount option Hongbo Li
2024-09-25 2:09 ` Al Viro
2024-09-25 2:32 ` Hongbo Li [this message]
2024-09-25 7:51 ` Jan Kara
2024-09-25 8:01 ` Hongbo Li
2024-09-25 8:21 ` Christian Brauner
2024-09-25 8:24 ` Christian Brauner
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=39fa2184-e5f4-4709-961c-292917e358e9@huawei.com \
--to=lihongbo22@huawei.com \
--cc=adilger.kernel@dilger.ca \
--cc=brauner@kernel.org \
--cc=chris.zjh@huawei.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--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