linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Deprecated mandatory file locking
@ 2019-08-14 17:33 Jan Kara
  2019-08-14 17:46 ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2019-08-14 17:33 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-fsdevel

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
entry (for root filesystem!) using 'mand' mount option stopped working.
Now I understand your rationale in 9e8925b67a "locks: Allow disabling
mandatory locking at compile time" but I guess there's some work to do wrt
documentation. At least mount(8) manpage could mention that mandatory
locking is broken and may be disabled referencing the rationale in fcntl
manpage? Or the kernel could mention something in the log about failing
mount because of 'mand' mount option?  What do you think? Because it took
me some code searching to understand why the mount is actually failing
which we can hardly expect from a normal sysadmin...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-08-14 17:33 Deprecated mandatory file locking Jan Kara
@ 2019-08-14 17:46 ` Jan Kara
  2019-08-15 19:18   ` Jeff Layton
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2019-08-14 17:46 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-fsdevel


Resending to proper Jeff's address...

On Wed 14-08-19 19:33:45, Jan Kara wrote:
> Hello Jeff,
> 
> we've got a report from user
> (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> entry (for root filesystem!) using 'mand' mount option stopped working.
> Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> mandatory locking at compile time" but I guess there's some work to do wrt
> documentation. At least mount(8) manpage could mention that mandatory
> locking is broken and may be disabled referencing the rationale in fcntl
> manpage? Or the kernel could mention something in the log about failing
> mount because of 'mand' mount option?  What do you think? Because it took
> me some code searching to understand why the mount is actually failing
> which we can hardly expect from a normal sysadmin...
> 
> 								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-08-14 17:46 ` Jan Kara
@ 2019-08-15 19:18   ` Jeff Layton
  2019-08-16 15:31     ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Layton @ 2019-08-15 19:18 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-fsdevel

On Wed, 2019-08-14 at 19:46 +0200, Jan Kara wrote:
> Resending to proper Jeff's address...
> 
> On Wed 14-08-19 19:33:45, Jan Kara wrote:
> > Hello Jeff,
> > 
> > we've got a report from user
> > (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> > entry (for root filesystem!) using 'mand' mount option stopped working.
> > Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> > mandatory locking at compile time" but I guess there's some work to do wrt
> > documentation. At least mount(8) manpage could mention that mandatory
> > locking is broken and may be disabled referencing the rationale in fcntl
> > manpage? Or the kernel could mention something in the log about failing
> > mount because of 'mand' mount option?  What do you think? Because it took
> > me some code searching to understand why the mount is actually failing
> > which we can hardly expect from a normal sysadmin...
> > 
> > 								Honza

Wow, I think this is the first actual user fallout we've ever had from
that change! Why was he setting that option? Does he actually use
mandatory locking?

I think a pr_notice() or pr_warn() at mount time when someone tries to
use it sounds like a very reasonable thing to do. Perhaps we can just
stick one in may_mandlock()?

I'll draft up a patch, and also update
Documentation/filesystems/mandatory-locking.txt with the current
situation.

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-08-15 19:18   ` Jeff Layton
@ 2019-08-16 15:31     ` Jan Kara
  2019-11-07 16:15       ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2019-08-16 15:31 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Jan Kara, linux-fsdevel

On Thu 15-08-19 15:18:45, Jeff Layton wrote:
> On Wed, 2019-08-14 at 19:46 +0200, Jan Kara wrote:
> > Resending to proper Jeff's address...
> > 
> > On Wed 14-08-19 19:33:45, Jan Kara wrote:
> > > Hello Jeff,
> > > 
> > > we've got a report from user
> > > (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> > > entry (for root filesystem!) using 'mand' mount option stopped working.
> > > Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> > > mandatory locking at compile time" but I guess there's some work to do wrt
> > > documentation. At least mount(8) manpage could mention that mandatory
> > > locking is broken and may be disabled referencing the rationale in fcntl
> > > manpage? Or the kernel could mention something in the log about failing
> > > mount because of 'mand' mount option?  What do you think? Because it took
> > > me some code searching to understand why the mount is actually failing
> > > which we can hardly expect from a normal sysadmin...
> > > 
> > > 								Honza
> 
> Wow, I think this is the first actual user fallout we've ever had from
> that change! Why was he setting that option? Does he actually use
> mandatory locking?

Yeah, reportedly they had an application that required mandatory locking.
But they don't use it anymore so they just removed the mount option.

> I think a pr_notice() or pr_warn() at mount time when someone tries to
> use it sounds like a very reasonable thing to do. Perhaps we can just
> stick one in may_mandlock()?

Yeah, sounds reasonable to me.

> I'll draft up a patch, and also update
> Documentation/filesystems/mandatory-locking.txt with the current
> situation.

Thanks!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-08-16 15:31     ` Jan Kara
@ 2019-11-07 16:15       ` Jan Kara
  2019-11-07 18:34         ` Jeff Layton
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2019-11-07 16:15 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Jan Kara, linux-fsdevel

Hi Jeff,

On Fri 16-08-19 17:31:49, Jan Kara wrote:
> On Thu 15-08-19 15:18:45, Jeff Layton wrote:
> > On Wed, 2019-08-14 at 19:46 +0200, Jan Kara wrote:
> > > Resending to proper Jeff's address...
> > > 
> > > On Wed 14-08-19 19:33:45, Jan Kara wrote:
> > > > Hello Jeff,
> > > > 
> > > > we've got a report from user
> > > > (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> > > > entry (for root filesystem!) using 'mand' mount option stopped working.
> > > > Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> > > > mandatory locking at compile time" but I guess there's some work to do wrt
> > > > documentation. At least mount(8) manpage could mention that mandatory
> > > > locking is broken and may be disabled referencing the rationale in fcntl
> > > > manpage? Or the kernel could mention something in the log about failing
> > > > mount because of 'mand' mount option?  What do you think? Because it took
> > > > me some code searching to understand why the mount is actually failing
> > > > which we can hardly expect from a normal sysadmin...
> > > > 
> > > > 								Honza
> > 
> > Wow, I think this is the first actual user fallout we've ever had from
> > that change! Why was he setting that option? Does he actually use
> > mandatory locking?
> 
> Yeah, reportedly they had an application that required mandatory locking.
> But they don't use it anymore so they just removed the mount option.
> 
> > I think a pr_notice() or pr_warn() at mount time when someone tries to
> > use it sounds like a very reasonable thing to do. Perhaps we can just
> > stick one in may_mandlock()?
> 
> Yeah, sounds reasonable to me.
> 
> > I'll draft up a patch, and also update
> > Documentation/filesystems/mandatory-locking.txt with the current
> > situation.
> 
> Thanks!

Did you ever get to this?

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-11-07 16:15       ` Jan Kara
@ 2019-11-07 18:34         ` Jeff Layton
  2019-11-08 10:37           ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Layton @ 2019-11-07 18:34 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-fsdevel

On Thu, 2019-11-07 at 17:15 +0100, Jan Kara wrote:
> Hi Jeff,
> 
> On Fri 16-08-19 17:31:49, Jan Kara wrote:
> > On Thu 15-08-19 15:18:45, Jeff Layton wrote:
> > > On Wed, 2019-08-14 at 19:46 +0200, Jan Kara wrote:
> > > > Resending to proper Jeff's address...
> > > > 
> > > > On Wed 14-08-19 19:33:45, Jan Kara wrote:
> > > > > Hello Jeff,
> > > > > 
> > > > > we've got a report from user
> > > > > (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> > > > > entry (for root filesystem!) using 'mand' mount option stopped working.
> > > > > Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> > > > > mandatory locking at compile time" but I guess there's some work to do wrt
> > > > > documentation. At least mount(8) manpage could mention that mandatory
> > > > > locking is broken and may be disabled referencing the rationale in fcntl
> > > > > manpage? Or the kernel could mention something in the log about failing
> > > > > mount because of 'mand' mount option?  What do you think? Because it took
> > > > > me some code searching to understand why the mount is actually failing
> > > > > which we can hardly expect from a normal sysadmin...
> > > > > 
> > > > > 								Honza
> > > 
> > > Wow, I think this is the first actual user fallout we've ever had from
> > > that change! Why was he setting that option? Does he actually use
> > > mandatory locking?
> > 
> > Yeah, reportedly they had an application that required mandatory locking.
> > But they don't use it anymore so they just removed the mount option.
> > 
> > > I think a pr_notice() or pr_warn() at mount time when someone tries to
> > > use it sounds like a very reasonable thing to do. Perhaps we can just
> > > stick one in may_mandlock()?
> > 
> > Yeah, sounds reasonable to me.
> > 
> > > I'll draft up a patch, and also update
> > > Documentation/filesystems/mandatory-locking.txt with the current
> > > situation.
> > 
> > Thanks!
> 
> Did you ever get to this?
> 
> 								Honza

Yes. It went into v5.4-rc1. You even reviewed it! ;)

See:

commit df2474a22c42ce419b67067c52d71da06c385501
Author: Jeff Layton <jlayton@kernel.org>
Date:   Thu Aug 15 15:21:17 2019 -0400

    locks: print a warning when mount fails due to lack of "mand" support

Cheers,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Deprecated mandatory file locking
  2019-11-07 18:34         ` Jeff Layton
@ 2019-11-08 10:37           ` Jan Kara
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kara @ 2019-11-08 10:37 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Jan Kara, linux-fsdevel

On Thu 07-11-19 13:34:21, Jeff Layton wrote:
> On Thu, 2019-11-07 at 17:15 +0100, Jan Kara wrote:
> > Hi Jeff,
> > 
> > On Fri 16-08-19 17:31:49, Jan Kara wrote:
> > > On Thu 15-08-19 15:18:45, Jeff Layton wrote:
> > > > On Wed, 2019-08-14 at 19:46 +0200, Jan Kara wrote:
> > > > > Resending to proper Jeff's address...
> > > > > 
> > > > > On Wed 14-08-19 19:33:45, Jan Kara wrote:
> > > > > > Hello Jeff,
> > > > > > 
> > > > > > we've got a report from user
> > > > > > (https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab
> > > > > > entry (for root filesystem!) using 'mand' mount option stopped working.
> > > > > > Now I understand your rationale in 9e8925b67a "locks: Allow disabling
> > > > > > mandatory locking at compile time" but I guess there's some work to do wrt
> > > > > > documentation. At least mount(8) manpage could mention that mandatory
> > > > > > locking is broken and may be disabled referencing the rationale in fcntl
> > > > > > manpage? Or the kernel could mention something in the log about failing
> > > > > > mount because of 'mand' mount option?  What do you think? Because it took
> > > > > > me some code searching to understand why the mount is actually failing
> > > > > > which we can hardly expect from a normal sysadmin...
> > > > > > 
> > > > > > 								Honza
> > > > 
> > > > Wow, I think this is the first actual user fallout we've ever had from
> > > > that change! Why was he setting that option? Does he actually use
> > > > mandatory locking?
> > > 
> > > Yeah, reportedly they had an application that required mandatory locking.
> > > But they don't use it anymore so they just removed the mount option.
> > > 
> > > > I think a pr_notice() or pr_warn() at mount time when someone tries to
> > > > use it sounds like a very reasonable thing to do. Perhaps we can just
> > > > stick one in may_mandlock()?
> > > 
> > > Yeah, sounds reasonable to me.
> > > 
> > > > I'll draft up a patch, and also update
> > > > Documentation/filesystems/mandatory-locking.txt with the current
> > > > situation.
> > > 
> > > Thanks!
> > 
> > Did you ever get to this?
> > 
> > 								Honza
> 
> Yes. It went into v5.4-rc1. You even reviewed it! ;)

Bah ;) I completely forgot and somehow didn't realize the section 7. in
Documentation/filesystems/mandatory-locking.txt is describing what I
wanted when I looked at it yesterday. Sorry for the noise!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-08 10:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 17:33 Deprecated mandatory file locking Jan Kara
2019-08-14 17:46 ` Jan Kara
2019-08-15 19:18   ` Jeff Layton
2019-08-16 15:31     ` Jan Kara
2019-11-07 16:15       ` Jan Kara
2019-11-07 18:34         ` Jeff Layton
2019-11-08 10:37           ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).