Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645628
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] |
| Date | 2017-05-19 16:10 +0200 |
| Message-ID | <tIQLo-3eE-17@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tHMqu-7gj-7@gated-at.bofh.it> <tHNFT-7VJ-13@gated-at.bofh.it> <tI22e-fo-9@gated-at.bofh.it> <tI5t8-2sV-17@gated-at.bofh.it> <tIoP7-7E3-3@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
Miklos Szeredi <mszeredi@redhat.com> wrote: > Yes. Current behavior seems to just ignore given options (except > MS_RDONLY) in that case, so we need to keep that possibility. Yeah. I wonder if we really should be consistency checking some parameters in some filesystems - or, at least, offering the opportunity. > Also I think it would be good to allow selecting when superblock is created: > > - non-exclusive create: if exists return it, if not create it > - exclusive create: only create if non-existent > - non-create: only return if exists I quite like that idea. Use O_CREAT and O_EXCL? Probably better to define a new flag space for fsopen() rather than trying to share with open(). I'm not sure how likely it would be to be used, though. > So what I propose is: > > 1) call ->parse_option() > > would get indication what we are trying to do (find and/or > create and/or reconfig) > > this step is optional, the the filesystem type could possibly be > enough for the following steps > > 2) call ->get_tree() > > pass sc containing parsed options and flags controlling the > creation of the superblock (create/exclusive) > > this step is optional, not called if we are given an sb to work > with (i.e. only reconfig) No. We have to call this to get the root dentry. Whether or not it creates a superblock - or even if it creates a superblock in someone else's filesystem (the cpuset fs, for example) - is immaterial. Further, we aren't given information as to whether the superblock was created for us or not - though that can be changed. Even further, I think by the time this returns, the superblock should be live. It will be live if we're reusing it, though we can get s_umount to prevent a race. > 3) call ->reconfig() > > pass sc containing parsed options > > this step is optional, we might be instructed just to find or > create the sb Actually, it's arguable that we *shouldn't* be calling this if the superblock already exists - otherwise we may end up changing the parameters someone else has set. For mount(2), for most filesystems, we have to leave the active parameters unaltered for compatibility. For fsopen() I'm willing to add a consistency check - but there probably has to be a flag to waive that as otherwise you can't mount without determining what the other party's parameters were. > I don't get it. We never passed MNT_* options as strings to the > kernel. You're right. I've moved all those flags over to the forbidden list. > Ah, mnt_devname. The device name as just a special type of option and > as such should be stored in the superblock. I'll leave that for now and deal with it later. We have to be careful not to break userspace by changing what's seen in /proc/mounts. David
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC][PATCH 00/21] VFS: Introduce superblock configuration context [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:20 +0200
[PATCH 08/21] Implement fsmount() to effect a pre-configured mount [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:20 +0200
[PATCH 02/21] Clean up whitespace in fs/namespace.c [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:20 +0200
[PATCH 01/21] Provide a function to create a NUL-terminated string from unterminated data [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:20 +0200
[PATCH 05/21] VFS: Provide empty name qstr [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:20 +0200
[PATCH 07/21] Implement fsopen() to prepare for a mount [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 18/21] NFS: Do some tidying of the parsing code [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 17/21] NFS: Add a small buffer in nfs_sb_config to avoid string dup [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 11/21] proc: Add superblock config support to procfs [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 15/21] NFS: Split nfs_parse_mount_options() [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 20/21] Support legacy filesystems [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 13/21] NFS: Constify mount argument match tables [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
[PATCH 16/21] NFS: Deindent nfs_sb_config_parse_option() [ver #3] David Howells <dhowells@redhat.com> - 2017-05-15 17:30 +0200
Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] David Howells <dhowells@redhat.com> - 2017-05-16 18:40 +0200
Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] Miklos Szeredi <mszeredi@redhat.com> - 2017-05-17 10:00 +0200
Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] David Howells <dhowells@redhat.com> - 2017-05-17 13:40 +0200
Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] Miklos Szeredi <mszeredi@redhat.com> - 2017-05-18 10:20 +0200
Re: [PATCH 06/21] VFS: Introduce a superblock configuration context [ver #3] David Howells <dhowells@redhat.com> - 2017-05-19 16:10 +0200
csiph-web