* sloppy mount option not handled by some filesystems. @ 2015-01-27 17:09 Miklos Szeredi 2015-01-27 23:36 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Miklos Szeredi @ 2015-01-27 17:09 UTC (permalink / raw) To: autofs; +Cc: Ian Kent, lchiquitto I have two bug reports about filesystems that reject the "-s" option and hence can't be used with autofs compiled with the sloppy option (which apparently needs to be kept for back compatibility). The mount(8) man page says that filesystems do not necessarily support "-s" so I think autofs should honour this. Any ideas? Fs type whitelist? Blacklist? Retrying without the sloppy option if it fails with it? Autofs option to turn off the sloppy option on a per-map or per-mount basis? Thanks, Miklos ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-01-27 17:09 sloppy mount option not handled by some filesystems Miklos Szeredi @ 2015-01-27 23:36 ` Ian Kent 2015-02-11 10:11 ` Miklos Szeredi 0 siblings, 1 reply; 8+ messages in thread From: Ian Kent @ 2015-01-27 23:36 UTC (permalink / raw) To: Miklos Szeredi; +Cc: autofs, lchiquitto On Tue, 2015-01-27 at 18:09 +0100, Miklos Szeredi wrote: > I have two bug reports about filesystems that reject the "-s" option > and hence can't be used with autofs compiled with the sloppy option > (which apparently needs to be kept for back compatibility). I know, I've had only one too. The problem has come up because libmount decided that file systems have had enough time to add support for it and started to pass it on to all file system mounts (without updating the man page). Previously it was passed it on to NFS only. > > The mount(8) man page says that filesystems do not necessarily support > "-s" so I think autofs should honour this. Yeah, I know. > > Any ideas? My initial response was to not add it for file systems other than NFS. But the reporter didn't think that was a good idea. The end result of the bug was ntfs-3g got a patch to ignore the option which the reporter wasn't quite happy with either but at that stage we'd had enough discussion and left it at that. On one hand not using it for file systems other than NFS restores the status quo but OTOH it would be useful for file systems to add it. That really only amounts to file systems initially ignoring it and later adding checks to not fail a mount when invalid options are encountered. Both not a big deal but given how long file systems have had to add it that probably won't happen. > > Fs type whitelist? I could do that. > > Blacklist? Probably not a good idea since so few file systems support it. > > Retrying without the sloppy option if it fails with it? Not a good idea I think since it could slow down interactive mounts. I'm already resisting requests to add mount retries as NFS already does that given the appropriate options and that would be doubling up and slowing things down a lot. > > Autofs option to turn off the sloppy option on a per-map or per-mount basis? As I said, my first thought was to not use it at all any more but there might be some people that have autofs maps for multiple OSes that still use options not supported by Linux NFS mount. Probably not many though because Linux NFS mount allows pretty much all the option variants I'm aware of these days. I could leave it only for NFS, as it supports it anyway, and not pass it for any other mounts. Then any bug requests could be passed on the the file system maintainers. Then I could add it for that file system when done. The only annoyance with that approach is the autofs generic mount module, which is used to mount a number of file systems, would need to check the file system name to decide whether to add the sloppy option. TBH I'm not to fussy about what we do here but we need to make a decision before I do or I'll end up flipping back and forth. So I guess it's up to us to decide, ;) I'll post a message to the autofs list once we decide and see if we get any good arguments to change the approach and we can alter it as needed (if at all). Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-01-27 23:36 ` Ian Kent @ 2015-02-11 10:11 ` Miklos Szeredi 2015-02-11 10:52 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Miklos Szeredi @ 2015-02-11 10:11 UTC (permalink / raw) To: Ian Kent; +Cc: autofs, lchiquitto On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: > I could leave it only for NFS, as it supports it anyway, and not pass it > for any other mounts. Then any bug requests could be passed on the the > file system maintainers. Then I could add it for that file system when > done. > > The only annoyance with that approach is the autofs generic mount > module, which is used to mount a number of file systems, would need to > check the file system name to decide whether to add the sloppy option. > > TBH I'm not to fussy about what we do here but we need to make a > decision before I do or I'll end up flipping back and forth. > > So I guess it's up to us to decide, ;) > > I'll post a message to the autofs list once we decide and see if we get > any good arguments to change the approach and we can alter it as needed > (if at all). Hi Ian, Any news about this? There's more and morecomplaints about the new behavior. I'm inclined to just make it NFS-only, as that will restore the old state of affairs. Thanks, Miklos ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-02-11 10:11 ` Miklos Szeredi @ 2015-02-11 10:52 ` Ian Kent 2015-02-11 10:56 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Ian Kent @ 2015-02-11 10:52 UTC (permalink / raw) To: Miklos Szeredi; +Cc: autofs, lchiquitto On Wed, 2015-02-11 at 11:11 +0100, Miklos Szeredi wrote: > On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: > > > I could leave it only for NFS, as it supports it anyway, and not pass it > > for any other mounts. Then any bug requests could be passed on the the > > file system maintainers. Then I could add it for that file system when > > done. > > > > The only annoyance with that approach is the autofs generic mount > > module, which is used to mount a number of file systems, would need to > > check the file system name to decide whether to add the sloppy option. > > > > TBH I'm not to fussy about what we do here but we need to make a > > decision before I do or I'll end up flipping back and forth. > > > > So I guess it's up to us to decide, ;) > > > > I'll post a message to the autofs list once we decide and see if we get > > any good arguments to change the approach and we can alter it as needed > > (if at all). > > Hi Ian, > > Any news about this? > > There's more and morecomplaints about the new behavior. I'm inclined > to just make it NFS-only, as that will restore the old state of > affairs. Good question, I must admit I had forgotten about it since with the report I had the subsystem changed to ignore the option. I was going to not pass it from autofs and I have a patch for that. We could use that, after I check I've cover the bases, and I'll commit it upstream with the next set of patches (that might be a little while though). Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-02-11 10:52 ` Ian Kent @ 2015-02-11 10:56 ` Ian Kent 2015-02-11 11:03 ` Miklos Szeredi 0 siblings, 1 reply; 8+ messages in thread From: Ian Kent @ 2015-02-11 10:56 UTC (permalink / raw) To: Miklos Szeredi; +Cc: autofs, lchiquitto On Wed, 2015-02-11 at 18:52 +0800, Ian Kent wrote: > On Wed, 2015-02-11 at 11:11 +0100, Miklos Szeredi wrote: > > On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: > > > > > I could leave it only for NFS, as it supports it anyway, and not pass it > > > for any other mounts. Then any bug requests could be passed on the the > > > file system maintainers. Then I could add it for that file system when > > > done. > > > > > > The only annoyance with that approach is the autofs generic mount > > > module, which is used to mount a number of file systems, would need to > > > check the file system name to decide whether to add the sloppy option. > > > > > > TBH I'm not to fussy about what we do here but we need to make a > > > decision before I do or I'll end up flipping back and forth. > > > > > > So I guess it's up to us to decide, ;) > > > > > > I'll post a message to the autofs list once we decide and see if we get > > > any good arguments to change the approach and we can alter it as needed > > > (if at all). > > > > Hi Ian, > > > > Any news about this? > > > > There's more and morecomplaints about the new behavior. I'm inclined > > to just make it NFS-only, as that will restore the old state of > > affairs. > > Good question, I must admit I had forgotten about it since with the > report I had the subsystem changed to ignore the option. > > I was going to not pass it from autofs and I have a patch for that. > We could use that, after I check I've cover the bases, and I'll commit > it upstream with the next set of patches (that might be a little while > though). Leaving it for NFS only, of course. > > Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-02-11 10:56 ` Ian Kent @ 2015-02-11 11:03 ` Miklos Szeredi 2015-02-11 11:15 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Miklos Szeredi @ 2015-02-11 11:03 UTC (permalink / raw) To: Ian Kent; +Cc: autofs, lchiquitto On Wed, Feb 11, 2015 at 11:56 AM, Ian Kent <ikent@redhat.com> wrote: > On Wed, 2015-02-11 at 18:52 +0800, Ian Kent wrote: >> On Wed, 2015-02-11 at 11:11 +0100, Miklos Szeredi wrote: >> > On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: >> > >> > > I could leave it only for NFS, as it supports it anyway, and not pass it >> > > for any other mounts. Then any bug requests could be passed on the the >> > > file system maintainers. Then I could add it for that file system when >> > > done. >> > > >> > > The only annoyance with that approach is the autofs generic mount >> > > module, which is used to mount a number of file systems, would need to >> > > check the file system name to decide whether to add the sloppy option. >> > > >> > > TBH I'm not to fussy about what we do here but we need to make a >> > > decision before I do or I'll end up flipping back and forth. >> > > >> > > So I guess it's up to us to decide, ;) >> > > >> > > I'll post a message to the autofs list once we decide and see if we get >> > > any good arguments to change the approach and we can alter it as needed >> > > (if at all). >> > >> > Hi Ian, >> > >> > Any news about this? >> > >> > There's more and morecomplaints about the new behavior. I'm inclined >> > to just make it NFS-only, as that will restore the old state of >> > affairs. >> >> Good question, I must admit I had forgotten about it since with the >> report I had the subsystem changed to ignore the option. >> >> I was going to not pass it from autofs and I have a patch for that. >> We could use that, after I check I've cover the bases, and I'll commit >> it upstream with the next set of patches (that might be a little while >> though). > > Leaving it for NFS only, of course. Okay. If you have a patch, please let me know and I'll review and test it. Thanks, Miklos ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-02-11 11:03 ` Miklos Szeredi @ 2015-02-11 11:15 ` Ian Kent 2015-02-11 11:17 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Ian Kent @ 2015-02-11 11:15 UTC (permalink / raw) To: Miklos Szeredi; +Cc: autofs, lchiquitto On Wed, 2015-02-11 at 12:03 +0100, Miklos Szeredi wrote: > On Wed, Feb 11, 2015 at 11:56 AM, Ian Kent <ikent@redhat.com> wrote: > > On Wed, 2015-02-11 at 18:52 +0800, Ian Kent wrote: > >> On Wed, 2015-02-11 at 11:11 +0100, Miklos Szeredi wrote: > >> > On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: > >> > > >> > > I could leave it only for NFS, as it supports it anyway, and not pass it > >> > > for any other mounts. Then any bug requests could be passed on the the > >> > > file system maintainers. Then I could add it for that file system when > >> > > done. > >> > > > >> > > The only annoyance with that approach is the autofs generic mount > >> > > module, which is used to mount a number of file systems, would need to > >> > > check the file system name to decide whether to add the sloppy option. > >> > > > >> > > TBH I'm not to fussy about what we do here but we need to make a > >> > > decision before I do or I'll end up flipping back and forth. > >> > > > >> > > So I guess it's up to us to decide, ;) > >> > > > >> > > I'll post a message to the autofs list once we decide and see if we get > >> > > any good arguments to change the approach and we can alter it as needed > >> > > (if at all). > >> > > >> > Hi Ian, > >> > > >> > Any news about this? > >> > > >> > There's more and morecomplaints about the new behavior. I'm inclined > >> > to just make it NFS-only, as that will restore the old state of > >> > affairs. > >> > >> Good question, I must admit I had forgotten about it since with the > >> report I had the subsystem changed to ignore the option. > >> > >> I was going to not pass it from autofs and I have a patch for that. > >> We could use that, after I check I've cover the bases, and I'll commit > >> it upstream with the next set of patches (that might be a little while > >> though). > > > > Leaving it for NFS only, of course. > > Okay. > > If you have a patch, please let me know and I'll review and test it. It's pretty simple but should do the trick. I have it at the top of the queue now so I can push it without having to push the others. Umm, I didn't even compile test this so please forgive any pain, ;) Nevertheless I think this covers the cases. autofs-5.1.0 - dont pass sloppy option for other than nfs mounts From: Ian Kent <ikent@redhat.com> Historically autofs added an option to mounts, called the sloppy option, meant to allow mount(8) to ignore invalid mount options. This was done so that mount map entries for sites that needed to use different mount options for some machines would still work. It was needed for nfs mounts in particular. Recent changes to mount(8) cause the sloppy option to be passed on for all mounts when it is given. Previously mount(8) only passed on the option to nfs mounts so now, for other than nfs mounts, the mount will fail if the file system doesn't understand the sloppy option. Since the option was not passed on to other than nfs mounts before it seems sensible for autofs to not add it for other than nfs mounts now. Signed-off-by: Ian Kent <ikent@redhat.com> --- CHANGELOG | 1 + modules/mount_bind.c | 9 ++++----- modules/mount_changer.c | 6 +++--- modules/mount_ext2.c | 6 +++--- modules/mount_generic.c | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b0dce1e..ff8e1cd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,6 +33,7 @@ - clarify multiple mounts description. - gaurd against incorrect umount return. - update man page autofs(8) for systemd. +- dont pass sloppy option for other than nfs mounts. 04/06/2014 autofs-5.1.0 ======================= diff --git a/modules/mount_bind.c b/modules/mount_bind.c index 465f09c..ac954e3 100644 --- a/modules/mount_bind.c +++ b/modules/mount_bind.c @@ -158,13 +158,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int if (!status) existed = 0; - debug(ap->logopt, - MODPREFIX - "calling mount --bind " SLOPPY " -o %s %s %s", + debug(ap->logopt, MODPREFIX + "calling mount --bind -o %s %s %s", options, what, fullpath); - err = spawn_bind_mount(ap->logopt, - SLOPPYOPT "-o", options, what, fullpath, NULL); + err = spawn_bind_mount(ap->logopt, "-o", + options, what, fullpath, NULL); if (err) { if (ap->type != LKP_INDIRECT) diff --git a/modules/mount_changer.c b/modules/mount_changer.c index d7bfa09..5e2b47c 100644 --- a/modules/mount_changer.c +++ b/modules/mount_changer.c @@ -103,12 +103,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int } if (options && options[0]) { - debug(ap->logopt, - MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", + debug(ap->logopt, MODPREFIX + "calling mount -t %s -o %s %s %s", fstype, options, what, fullpath); err = spawn_mount(ap->logopt, "-t", fstype, - SLOPPYOPT "-o", options, what, fullpath, NULL); + "-o", options, what, fullpath, NULL); } else { debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s", diff --git a/modules/mount_ext2.c b/modules/mount_ext2.c index 1bc429d..3c87512 100644 --- a/modules/mount_ext2.c +++ b/modules/mount_ext2.c @@ -116,11 +116,11 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int } if (options) { - debug(ap->logopt, - MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", + debug(ap->logopt, MODPREFIX + "calling mount -t %s -o %s %s %s", fstype, options, what, fullpath); err = spawn_mount(ap->logopt, "-t", fstype, - SLOPPYOPT "-o", options, what, fullpath, NULL); + "-o", options, what, fullpath, NULL); } else { debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s", diff --git a/modules/mount_generic.c b/modules/mount_generic.c index 79e3d32..2473b80 100644 --- a/modules/mount_generic.c +++ b/modules/mount_generic.c @@ -97,11 +97,11 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int if (options && options[0]) { debug(ap->logopt, - MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", + MODPREFIX "calling mount -t %s -o %s %s %s", fstype, options, loc, fullpath); err = spawn_mount(ap->logopt, "-t", fstype, - SLOPPYOPT "-o", options, loc, fullpath, NULL); + "-o", options, loc, fullpath, NULL); } else { debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s", fstype, loc, fullpath); ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: sloppy mount option not handled by some filesystems. 2015-02-11 11:15 ` Ian Kent @ 2015-02-11 11:17 ` Ian Kent 0 siblings, 0 replies; 8+ messages in thread From: Ian Kent @ 2015-02-11 11:17 UTC (permalink / raw) To: Miklos Szeredi; +Cc: autofs, lchiquitto On Wed, 2015-02-11 at 19:15 +0800, Ian Kent wrote: > On Wed, 2015-02-11 at 12:03 +0100, Miklos Szeredi wrote: > > On Wed, Feb 11, 2015 at 11:56 AM, Ian Kent <ikent@redhat.com> wrote: > > > On Wed, 2015-02-11 at 18:52 +0800, Ian Kent wrote: > > >> On Wed, 2015-02-11 at 11:11 +0100, Miklos Szeredi wrote: > > >> > On Wed, Jan 28, 2015 at 12:36 AM, Ian Kent <ikent@redhat.com> wrote: > > >> > > > >> > > I could leave it only for NFS, as it supports it anyway, and not pass it > > >> > > for any other mounts. Then any bug requests could be passed on the the > > >> > > file system maintainers. Then I could add it for that file system when > > >> > > done. > > >> > > > > >> > > The only annoyance with that approach is the autofs generic mount > > >> > > module, which is used to mount a number of file systems, would need to > > >> > > check the file system name to decide whether to add the sloppy option. > > >> > > > > >> > > TBH I'm not to fussy about what we do here but we need to make a > > >> > > decision before I do or I'll end up flipping back and forth. > > >> > > > > >> > > So I guess it's up to us to decide, ;) > > >> > > > > >> > > I'll post a message to the autofs list once we decide and see if we get > > >> > > any good arguments to change the approach and we can alter it as needed > > >> > > (if at all). > > >> > > > >> > Hi Ian, > > >> > > > >> > Any news about this? > > >> > > > >> > There's more and morecomplaints about the new behavior. I'm inclined > > >> > to just make it NFS-only, as that will restore the old state of > > >> > affairs. > > >> > > >> Good question, I must admit I had forgotten about it since with the > > >> report I had the subsystem changed to ignore the option. > > >> > > >> I was going to not pass it from autofs and I have a patch for that. > > >> We could use that, after I check I've cover the bases, and I'll commit > > >> it upstream with the next set of patches (that might be a little while > > >> though). > > > > > > Leaving it for NFS only, of course. > > > > Okay. > > > > If you have a patch, please let me know and I'll review and test it. > > It's pretty simple but should do the trick. > I have it at the top of the queue now so I can push it without having to > push the others. > > Umm, I didn't even compile test this so please forgive any pain, ;) > Nevertheless I think this covers the cases. Oh, sorry, forgot to mention this is against the current autofs master branch, version 5.1.0 plus patches so, at the very least, you'll probably need to adjust the CHANGELOG hunk in the patch. Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-02-11 11:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-27 17:09 sloppy mount option not handled by some filesystems Miklos Szeredi 2015-01-27 23:36 ` Ian Kent 2015-02-11 10:11 ` Miklos Szeredi 2015-02-11 10:52 ` Ian Kent 2015-02-11 10:56 ` Ian Kent 2015-02-11 11:03 ` Miklos Szeredi 2015-02-11 11:15 ` Ian Kent 2015-02-11 11:17 ` Ian Kent
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.