public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* (struct dentry *)->vfsmnt;
@ 2001-03-09 23:20 LA Walsh
  2001-03-10  1:00 ` Alexander Viro
  0 siblings, 1 reply; 26+ messages in thread
From: LA Walsh @ 2001-03-09 23:20 UTC (permalink / raw)
  To: linux-kernel

Could someone enlighten me as to the purpose of this field in the
dentry struct?  There is no elucidating comment in the header for this
particular field and the name/type only indicate it is pointing to
a list of vfsmounts.  Can a dentry belong to more than one vfsmount?

If I have a 'dentry' and simply want to determine what the absolute
path from root is, in the 'd_path' macro, would I use 'rootmnt' of my
current->fs as the 'vfsmount' as well?

Thanks, in advance...
-linda


-- 
L A Walsh                        | Trust Technology, Core Linux, SGI
law@sgi.com                      | Voice: (650) 933-53

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: (struct dentry *)->vfsmnt;
@ 2001-03-15 12:21 bsuparna
  0 siblings, 0 replies; 26+ messages in thread
From: bsuparna @ 2001-03-15 12:21 UTC (permalink / raw)
  To: Andreas Dilger
  Cc: Dave Kleikamp, Andreas Dilger, Alexander Viro,
	Linux kernel development list, Linux FS development list



>Actually, I'm pretty sure you _never_ need to exportvg in order to have
>it work on another system.  That's one of the great things about AIX LVM,
>because it means you can move a VG to another system after a hardware
>problem, and not have any problems importing it (journaled fs also helps).
>AFAIK, the only think exportvg does is remove VG information from the
>ODM and /etc/filesystems.
>

Yes that's correct as far as I know too. The VGDA and LVCB contain all the
information required for import even without an exportvg.

>I suppose it is possible that because AIX is so tied into the ODM and
>SMIT, that it updates the VGDA mountpoint info whenever a filesystem
>mountpoint is changed, but this will _never_ work on Linux because of
>different tools versions, distributions, etc.  Also, it would mean on
>AIX that anyone editing /etc/filesystems might have a broken system at
>vgimport time (wouldn't be the first time that not using ODM/SMIT caused
>such a problem).

Yes, you can think of crfs (or chfs) as a composite command that handles
this (writing to LVCB. These are more like
administrative/setup/configuration commands -- one time, or occasional
system configuration changes.

On the other hand a mount doesn't cause a persistent configuration
information change. You can issue a mount even if an entry doesn't exist in
/etc/filesystems.

>
>> ... I do think that the LVM is a reasonable place to store this kind of
>> information.
>
>Yes, even though it would tie the user into using a specific version of
>mount(), I suppose it is a better solution than storing it inside the
>filesystem.  It will work with non-ext2 filesystems, and it also allows
>you to store more information than simply the mountpoint (e.g. mount
>options, dump + fsck info, etc).  In the end, I will probably just
>save the whole /etc/fstab line into the LV header somewhere, and extract
>it at importvg time (possibly with modifications for vgname and
mountpoint).
>
>Cheers, Andreas

Is mount the right time to do this ? A mount happens on every boot of the
system.
And then, one can issue a mount by explicitly specifying all the parameters
without having an entry in fstab. [Doesn't that also mean that you have a
possibility of inconsistency even here ?]




^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: (struct dentry *)->vfsmnt;
@ 2001-03-15 12:59 bsuparna
  0 siblings, 0 replies; 26+ messages in thread
From: bsuparna @ 2001-03-15 12:59 UTC (permalink / raw)
  To: Andreas Dilger
  Cc: Matthew Wilcox, Andreas Dilger, Alexander Viro,
	Linux kernel development list, Linux FS development list


>Because this is totally filesystem specific - why put extra knowledge
>of filesystem internals into mount?  I personally don't want it writing
>into the ext2 or ext3 superblock.  How can it possibly know what to do,
>without embedding a lot of knowledge there?  Yes, mount(8) can _read_
>the UUID and LABEL for ext2 filesystems, but I would rather not have it
>_write_ into the superblock.  Also, InterMezzo and SnapFS have the same
>on-disk format as ext2, but would mount(8) know that?
>
>There are other filesystems (at least IBM JFS) that could also take
>advantage of this feature, should we make mount(8) have code for each
>and every filesystem?  Yuck.  Sort of ruins the whole modularity thing.
>Yes, I know mount(8) does funny stuff for SMB and NFS, but that is a
>reason to _not_ put more filesystem-specific information into mount(8).
>

Since you've brought up this point.
I have wondered why Linux doesn't seem to yet have the option of a generic
user space filesystem type specific mount helper command. I recall having
seen code in mount(8) implementation to call mount.<fstype>, but its still
under an ifdef isn't it, except for smb or ncp perhaps ? (Hope I'm not
out-of-date on this)
Having something like that lets one stream-line userland filesystem
specific stuff like this, without having the generic part of mount(8) know
about it.

For example, in AIX, the association between type and the program for mount
helpers (and also for filesystem helpers for things like mkfs, fsck etc) is
configured in /etc/vfs, while SUN and HP look for them under particular
directory locations (by fstype name).

Actually, it'd be good to have this in such a way that if a specific helper
doesn't exist, default mount processing continues. This avoids the extra
work of writing such helpers for every new filesystem, unless we need
specialized behaviour there.



 Suparna Bhattacharya
  IBM Software Lab, India
  E-mail : bsuparna@in.ibm.com
  Phone : 91-80-5267117, Extn : 2525



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

end of thread, other threads:[~2001-03-15 13:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-09 23:20 (struct dentry *)->vfsmnt; LA Walsh
2001-03-10  1:00 ` Alexander Viro
2001-03-10  1:56   ` LA Walsh
2001-03-10  2:42     ` Alexander Viro
2001-03-14  1:28       ` Andreas Dilger
2001-03-14  2:32         ` Alexander Viro
2001-03-14  4:27           ` Andreas Dilger
2001-03-14  5:11             ` Alexander Viro
2001-03-14  5:19               ` Andreas Dilger
2001-03-14  5:49                 ` Alexander Viro
2001-03-14  6:05                   ` Andreas Dilger
2001-03-14  6:50                     ` Alexander Viro
2001-03-14 17:26                       ` Andreas Dilger
2001-03-14 17:40                         ` Matthew Wilcox
2001-03-14 18:06                           ` Andreas Dilger
2001-03-14 18:11                         ` Alexander Viro
2001-03-14 19:14                           ` Andreas Dilger
2001-03-14 19:32                             ` Alexander Viro
2001-03-14 20:21                               ` Ragnar Kjørstad
2001-03-14 19:31                         ` Dave Kleikamp
2001-03-14 19:45                           ` Andreas Dilger
2001-03-14 19:51                             ` Alexander Viro
2001-03-14 19:57                             ` Dave Kleikamp
2001-03-14 21:07                               ` Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
2001-03-15 12:21 bsuparna
2001-03-15 12:59 bsuparna

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