From: Rodrigo Campos <rodrigo@sdfg.com.ar>
To: Christian Brauner <brauner@kernel.org>
Cc: fstests@vger.kernel.org, Giuseppe Scrivano <gscrivan@redhat.com>
Subject: Re: [PATCH v2 9/9] vfs: Add tmpfs tests for idmap mounts
Date: Mon, 13 Mar 2023 17:21:29 +0100 [thread overview]
Message-ID: <a78d5516-e191-db6f-ecb5-2793c230b584@sdfg.com.ar> (raw)
In-Reply-To: <20230313105018.n4nxsemdnp2mvbwk@wittgenstein>
On 3/13/23 11:50, Christian Brauner wrote:
> On Wed, Mar 08, 2023 at 12:13:43PM +0100, Rodrigo Campos wrote:
>> + /* create separate mount namespace */
>> + if (unshare(CLONE_NEWNS)) {
>> + log_stderr("failure: create new mount namespace");
>> + goto out_no_rm;
>> + }
>
> I think you might want to turn off mount propagation here so that the
> tmpfs mount doesn't propagate into the parent mount namespace:
>
> mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0)
Right, great catch!
>> + // Create a new info to use for test we will call.
>> + struct vfstest_info nested_test_info = *info;
>
> nit: We usually don't mix declarations and code in C code so I would
> move that struct vfstest_info to the top of the function.
Heh, I prefer C99 declarations, but sorry I forgot we are not using that
style in these files. I'll fix it :)
>
>> + nested_test_info.t_mountpoint = strdup(path);
>> + if (nested_test_info.t_mountpoint == NULL) {
>
> nit: more idiomatic
> if (!nested_test_info.t_mountpoint)
Thanks!
>> + if(rm_r(info->t_mnt_fd, DIR0)) >
> nit: missing space between "if" and "("
Ouch, probably my scripts for the spacing patch mixed this up... Fixed!
prev parent reply other threads:[~2023-03-13 16:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 11:13 [PATCH v2 0/9] Tests for idmapped tmpfs Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 1/9] vfs: Don't open-code safe_close() Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 2/9] vfs: Fix documentation typo Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 3/9] vfs: Use tabs to indent, not spaces Rodrigo Campos
2023-03-13 10:39 ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 4/9] vfs: Fix race condition on get_userns_fd() Rodrigo Campos
2023-03-13 10:39 ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 5/9] vfs: Make switch_userns set PR_SET_DUMPABLE Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 6/9] vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns Rodrigo Campos
2023-03-13 10:40 ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 7/9] vfs: Make idmapped core tests public Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 8/9] vfs: Export test_setup() and test_cleanup() Rodrigo Campos
2023-03-13 10:41 ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 9/9] vfs: Add tmpfs tests for idmap mounts Rodrigo Campos
2023-03-13 10:50 ` Christian Brauner
2023-03-13 14:26 ` Zorro Lang
2023-03-13 16:21 ` Rodrigo Campos [this message]
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=a78d5516-e191-db6f-ecb5-2793c230b584@sdfg.com.ar \
--to=rodrigo@sdfg.com.ar \
--cc=brauner@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=gscrivan@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox