public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Who uses the 'nodev' flag in /proc/filesystems ???
@ 2006-03-19  5:27 Neil Brown
  2006-03-19  9:27 ` Jan Engelhardt
  2006-03-20 21:14 ` Andreas Schwab
  0 siblings, 2 replies; 12+ messages in thread
From: Neil Brown @ 2006-03-19  5:27 UTC (permalink / raw)
  To: linux-kernel



Hi, 
 I just noticed that the FS_REQUIRES_DEV flag is used for just two
 things in the kernel.

  1/ to place the text 'nodev' at the start of the line in
       /proc/filesystems
  2/ to tell nfsd that it is reasonably OK to use the s_dev field 
     in the superblock as a stable, unique identifier for the
     filesystem.

I have a filesystem I am playing with for which I am quite happy to
lose the second aspect of FS_REQUIRES_DEV (it does use a device, but
there could well be multiple devices, and the fs can migrate from one
device to another so s_dev is even less stable than normal).  However
I would like to understand the implications of losing the first aspect
of FS_REQUIRES_DEV before deciding whether to provide the flag or not.

Hence the question in the subject:

  Who uses the 'nodev' flag in /proc/filesystems?

Are there any known users of this flag?

Thanks,
NeilBrown


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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-19  5:27 Who uses the 'nodev' flag in /proc/filesystems ??? Neil Brown
@ 2006-03-19  9:27 ` Jan Engelhardt
  2006-03-20  4:46   ` Neil Brown
  2006-03-20 21:14 ` Andreas Schwab
  1 sibling, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2006-03-19  9:27 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

>
>Hence the question in the subject:
>
>  Who uses the 'nodev' flag in /proc/filesystems?
>
>Are there any known users of this flag?
>

pam_mount. If a specific filesystem is nodev, --bind or --move, fsck is 
skipped. If you want to change /proc/filesystems, you can do so as long as 
you provide an alternative ;) Does not need to be stable, as 
/proc/filesystems is only used when a volume is initially mounted in 
pam_mount.


Jan Engelhardt
-- 
| Software Engineer and Linux/Unix Network Administrator

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-19  9:27 ` Jan Engelhardt
@ 2006-03-20  4:46   ` Neil Brown
  2006-03-20 16:06     ` Jan Engelhardt
  0 siblings, 1 reply; 12+ messages in thread
From: Neil Brown @ 2006-03-20  4:46 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

On Sunday March 19, jengelh@linux01.gwdg.de wrote:
> >
> >Hence the question in the subject:
> >
> >  Who uses the 'nodev' flag in /proc/filesystems?
> >
> >Are there any known users of this flag?
> >
> 
> pam_mount. If a specific filesystem is nodev, --bind or --move, fsck is 
> skipped. If you want to change /proc/filesystems, you can do so as long as 
> you provide an alternative ;) Does not need to be stable, as 
> /proc/filesystems is only used when a volume is initially mounted in 
> pam_mount.

Pam_mount .. (google...) you learn something new every day, don't you!

That sounds like a reasonable usage of 'nodev', though testing for
/sbin/fsck.$FSTYPE might do as well...

I guess in my case I could live without the auto-fsck, and as there
isn't necessarily just one device to take part in the fsck, it might
be awkward anyway.

Thanks.

I wonder if there are any others....

NeilBrown

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20  4:46   ` Neil Brown
@ 2006-03-20 16:06     ` Jan Engelhardt
  2006-03-20 16:17       ` Matheus Izvekov
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2006-03-20 16:06 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

>Pam_mount .. (google...) you learn something new every day, don't you!
>
>That sounds like a reasonable usage of 'nodev', though testing for
>/sbin/fsck.$FSTYPE might do as well...
>

Quite good idea, and it would make pam_mount more portable. I'll add that 
to my todo list. :)

I wonder if there is a filesystem that is nodev, but has fsck.


Jan Engelhardt
-- 

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 16:06     ` Jan Engelhardt
@ 2006-03-20 16:17       ` Matheus Izvekov
  2006-03-20 17:56         ` Jeff Dike
  0 siblings, 1 reply; 12+ messages in thread
From: Matheus Izvekov @ 2006-03-20 16:17 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Neil Brown, linux-kernel

On 3/20/06, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
> I wonder if there is a filesystem that is nodev, but has fsck.
>
>
> Jan Engelhardt
> --

If a filesystem is nodev, then what would you fsck? Am i missing something?

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 16:17       ` Matheus Izvekov
@ 2006-03-20 17:56         ` Jeff Dike
  2006-03-20 19:22           ` Matheus Izvekov
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Dike @ 2006-03-20 17:56 UTC (permalink / raw)
  To: Matheus Izvekov; +Cc: Jan Engelhardt, Neil Brown, linux-kernel

On Mon, Mar 20, 2006 at 01:17:59PM -0300, Matheus Izvekov wrote:
> If a filesystem is nodev, then what would you fsck? Am i missing something?

There's a UML filesystem for which the nodev-implies-no-fsck behavior
is inconvenient.  It stores its files as files on the host, where the
file metadata is stored separately from the file data.  If the two
fall out of sync after a crash, we need to fsck it.  In this case,
fsck would do a hostfs mount of the data and metadata (where the files
are available as they exist on the host) and fix things up.

So, in this case, the thing being fscked is a directory hierarchy on
the host.

				Jeff

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 17:56         ` Jeff Dike
@ 2006-03-20 19:22           ` Matheus Izvekov
  2006-03-20 19:48             ` Jeff Dike
  0 siblings, 1 reply; 12+ messages in thread
From: Matheus Izvekov @ 2006-03-20 19:22 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Jan Engelhardt, Neil Brown, linux-kernel

On 3/20/06, Jeff Dike <jdike@addtoit.com> wrote:
> On Mon, Mar 20, 2006 at 01:17:59PM -0300, Matheus Izvekov wrote:
> > If a filesystem is nodev, then what would you fsck? Am i missing something?
>
> There's a UML filesystem for which the nodev-implies-no-fsck behavior
> is inconvenient.  It stores its files as files on the host, where the
> file metadata is stored separately from the file data.  If the two
> fall out of sync after a crash, we need to fsck it.  In this case,
> fsck would do a hostfs mount of the data and metadata (where the files
> are available as they exist on the host) and fix things up.
>
> So, in this case, the thing being fscked is a directory hierarchy on
> the host.
>
>                                 Jeff
>

I see, i didnt know about this. But then pam_mount would need to do
special treatment for this. I imagine it has been only coded to work
in the case where there is a device to pass to fsck as a parameter.

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 19:22           ` Matheus Izvekov
@ 2006-03-20 19:48             ` Jeff Dike
  2006-03-20 19:58               ` Jan Engelhardt
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Dike @ 2006-03-20 19:48 UTC (permalink / raw)
  To: Matheus Izvekov; +Cc: Jan Engelhardt, Neil Brown, linux-kernel

On Mon, Mar 20, 2006 at 04:22:51PM -0300, Matheus Izvekov wrote:
> I see, i didnt know about this. But then pam_mount would need to do
> special treatment for this. I imagine it has been only coded to work
> in the case where there is a device to pass to fsck as a parameter.

Yeah, I don't doubt it.  I was just commenting on the nodev aspect of this.

				Jeff

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 19:48             ` Jeff Dike
@ 2006-03-20 19:58               ` Jan Engelhardt
  2006-03-21  0:32                 ` Jeff Dike
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2006-03-20 19:58 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Matheus Izvekov, Neil Brown, linux-kernel

>> I see, i didnt know about this. But then pam_mount would need to do
>> special treatment for this. I imagine it has been only coded to work
>> in the case where there is a device to pass to fsck as a parameter.
>
>Yeah, I don't doubt it.  I was just commenting on the nodev aspect of this.
>

But hey, when hostfs is nodev-but-fsckable, then looking for /sbin/fsck.XYZ 
is even better than reading /proc/filesystems...


Jan Engelhardt
-- 
| Software Engineer and Linux/Unix Network Administrator

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-19  5:27 Who uses the 'nodev' flag in /proc/filesystems ??? Neil Brown
  2006-03-19  9:27 ` Jan Engelhardt
@ 2006-03-20 21:14 ` Andreas Schwab
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2006-03-20 21:14 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

Neil Brown <neilb@suse.de> writes:

> Hence the question in the subject:
>
>   Who uses the 'nodev' flag in /proc/filesystems?
>
> Are there any known users of this flag?

mount is using it, when no explicit type is specified.  When iterating
over /proc/filesystems it ignores lines with the nodev flag.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-20 19:58               ` Jan Engelhardt
@ 2006-03-21  0:32                 ` Jeff Dike
  2006-03-21 17:31                   ` Jan Engelhardt
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Dike @ 2006-03-21  0:32 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Matheus Izvekov, Neil Brown, linux-kernel

On Mon, Mar 20, 2006 at 08:58:58PM +0100, Jan Engelhardt wrote:
> But hey, when hostfs is nodev-but-fsckable, then looking for /sbin/fsck.XYZ 
> is even better than reading /proc/filesystems...

It's humfs, BTW (hostfs consistency is maintained by the host), but yes.

				Jeff

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

* Re: Who uses the 'nodev' flag in /proc/filesystems ???
  2006-03-21  0:32                 ` Jeff Dike
@ 2006-03-21 17:31                   ` Jan Engelhardt
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Engelhardt @ 2006-03-21 17:31 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Matheus Izvekov, Neil Brown, linux-kernel

>
>On Mon, Mar 20, 2006 at 08:58:58PM +0100, Jan Engelhardt wrote:
>> But hey, when hostfs is nodev-but-fsckable, then looking for /sbin/fsck.XYZ 
>> is even better than reading /proc/filesystems...
>
>It's humfs, BTW (hostfs consistency is maintained by the host), but yes.
>

humm. Hm! Calls for buzzfs. :)


Jan Engelhardt
-- 

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

end of thread, other threads:[~2006-03-21 17:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-19  5:27 Who uses the 'nodev' flag in /proc/filesystems ??? Neil Brown
2006-03-19  9:27 ` Jan Engelhardt
2006-03-20  4:46   ` Neil Brown
2006-03-20 16:06     ` Jan Engelhardt
2006-03-20 16:17       ` Matheus Izvekov
2006-03-20 17:56         ` Jeff Dike
2006-03-20 19:22           ` Matheus Izvekov
2006-03-20 19:48             ` Jeff Dike
2006-03-20 19:58               ` Jan Engelhardt
2006-03-21  0:32                 ` Jeff Dike
2006-03-21 17:31                   ` Jan Engelhardt
2006-03-20 21:14 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox