From: David Howells <dhowells@redhat.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: dhowells@redhat.com, viro@ZenIV.linux.org.uk,
linux-fsdevel@vger.kernel.org, mszeredi@redhat.com,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/14] VFS: Add a sample program for fsopen/fsmount [ver #6]
Date: Thu, 26 Oct 2017 23:40:24 +0100 [thread overview]
Message-ID: <7973.1509057624@warthog.procyon.org.uk> (raw)
In-Reply-To: <1509038513.29077.31.camel@redhat.com>
Jeff Layton <jlayton@redhat.com> wrote:
> So to make sure I understand....
>
> Suppose I want to do a bind mount with the new API. Would I do something
> like this?
>
> mfd = fsopen("???");
> write(mfd, "s /path/to/old/mount");
You would have to use something other than "s" as that indicates the medium
source, but there are plenty of other options. Alternatively, something like:
mfd = mntopen("/path/to/old/mount", ...);
You would need some way to retrieve the fs type, though. Maybe the first
read() you do will return it:
char fstype[256];
read(mfd, fstype, 256);
ends up with:
"fs <type>"
in the buffer, though I think I'd prefer it to be manually elicited.
> write(mfd, "o bind");
This is unnecessary as you can just do:
> fsmount(mfd, ...);
at this point to achieve the effect.
> That seems a bit klunkier than before as I now need to pay attention to
> the fstype. I guess I'd have to scrape /proc/mounts for that info?
I haven't worked out this interface yet. I'm not sure it's actually necessary
at this point, though it'd be nice to have.
David
next prev parent reply other threads:[~2017-10-26 22:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 15:49 [PATCH 00/14] VFS: Introduce filesystem context " David Howells
2017-10-06 15:49 ` [PATCH 01/14] VFS: Introduce the structs and doc for a " David Howells
2017-10-06 15:49 ` [PATCH 02/14] VFS: Add LSM hooks for " David Howells
2017-10-06 20:37 ` Randy Dunlap
2017-10-06 15:49 ` [PATCH 03/14] VFS: Implement a filesystem superblock creation/configuration " David Howells
2017-10-06 20:34 ` Randy Dunlap
2017-10-06 23:13 ` David Howells
2017-10-07 0:08 ` Randy Dunlap
2017-10-10 7:49 ` Miklos Szeredi
2017-10-10 15:24 ` David Howells
2017-10-26 16:24 ` David Howells
2017-10-27 9:24 ` Miklos Szeredi
2017-10-27 14:35 ` David Howells
2017-10-27 15:33 ` Miklos Szeredi
2017-10-27 16:03 ` David Howells
2017-10-30 8:44 ` Miklos Szeredi
2017-10-06 15:49 ` [PATCH 04/14] VFS: Remove unused code after filesystem context changes " David Howells
2017-10-06 15:49 ` [PATCH 05/14] VFS: Implement fsopen() to prepare for a mount " David Howells
2017-10-26 17:11 ` Jeff Layton
2017-10-26 19:01 ` Jeff Layton
2017-10-06 15:49 ` [PATCH 06/14] VFS: Implement fsmount() to effect a pre-configured " David Howells
2017-10-10 8:00 ` Miklos Szeredi
2017-10-10 9:51 ` Karel Zak
2017-10-10 13:38 ` Miklos Szeredi
2017-10-11 8:54 ` Karel Zak
2017-10-06 15:50 ` [PATCH 07/14] VFS: Add a sample program for fsopen/fsmount " David Howells
2017-10-26 17:21 ` Jeff Layton
2017-10-26 22:40 ` David Howells [this message]
2017-10-06 15:50 ` [PATCH 08/14] procfs: Move proc_fill_super() to fs/proc/root.c " David Howells
2017-10-06 15:50 ` [PATCH 09/14] proc: Add fs_context support to procfs " David Howells
2017-10-06 15:50 ` [PATCH 10/14] ipc: Convert mqueue fs to fs_context " David Howells
2017-10-06 15:50 ` [PATCH 11/14] cpuset: Use " David Howells
2017-10-06 15:50 ` [PATCH 12/14] kernfs, sysfs, cgroup, intel_rdt: Support " David Howells
2017-10-06 15:50 ` [PATCH 13/14] hugetlbfs: Convert to " David Howells
2017-10-06 15:50 ` [PATCH 14/14] VFS: Remove kern_mount_data() " David Howells
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=7973.1509057624@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mszeredi@redhat.com \
--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
Powered by JetHome