Skip to contentSkip to conversation

Use of "device" argument in mount.

DISCUSSION Jerome de Vivie 5 participants 8 messages May 9, 2003 VFS

lore
Share & tools
lore
#0 lore raw

In loopback mount, a pathname could be used for the device argument. As for loopback mount, i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easyly doable ?

regards,

j.

#1 lore raw
Quoted 4 lines · Jerome de Vivie

In loopback mount, a pathname could be used for the device argument. As for loopback mount, i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easyly doable ?

In Linux 2.4 it's not doable, in Linux 2.5 it's easily doable.

#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Jerome de Vivie

In loopback mount, a pathname could be used for the device argument. As for loopback mount, i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easyly doable ?

In Linux 2.4 it's not doable, in Linux 2.5 it's easily doable.

Yes: in 2.5 sb_get is definable so it's very easy. In 2.4, NFS is using this device argument but i still don't understand how it works.

regards,

j.

Signature · 5 lines
Jérôme de Vivie
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

[dropped the fist list Cc, it would be nice if you could not mix up
public and stupid subscriber only lists the next time...]

Quoted 2 lines · Jerome de Vivie

Yes: in 2.5 sb_get is definable so it's very easy. In 2.4, NFS is using this device argument but i still don't understand how it works.

NFS doesn't use the argument in either 2.4 or 2.5 :)

#4 lore raw
In reply to Jerome de Vivie
Quoted 8 lines · Jerome de Vivie

In loopback mount, a pathname could be used for the device argument. As for loopback mount, i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easyly doable ?

regards,

j.

Jerome, I'm not sure what you're trying to do here. Perhaps you can give an example, w/ a sequence of ops.

Anyway, if you want a (fist) stackable f/s to recognize any kinds of new options, you can add the parsing code in main.c:wrapfs_parse_options(). You'll see how we recognize special options such as "debug=N" and "dir=/some/path".

Erez.

#5 lore raw
Quoted 2 lines · Erez Zadok

Jerome, I'm not sure what you're trying to do here. Perhaps you can give an example, w/ a sequence of ops.

Instead of having this line inside /etc/fstab,

none /fsdev/tstfs tstfs noauto,dir=/fsdev/subfs 0 0

I would like this line to work:

/fsdev/subfs /fsdev/tstfs tstfs noauto 0 0

regards,

j.

Signature · 5 lines
Jérôme de Vivie
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw
In reply to Jerome de Vivie
Quoted 3 lines · Jerome de Vivie

In loopback mount, a pathname could be used for the device argument. As for loopback mount, i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easyly doable ?

No, the kernel will not pass that pathname down to the filesystem, at least in 2.4.x. Read the kernel sources (fs/super.c and fs/namespace.c) for details, notice how the dev_name parameter is not used in get_sb_nodev().

Ion

Signature · 2 lines
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
#7 lore raw
In reply to Jerome de Vivie
Quoted 5 lines

In loopback mount, a pathname could be used for the device argument.

You mean an invocation of the 'mount' program. In the mount() system call, you can't use a pathname for the device argument in a loopback mount. In the mount() system call for a loopback mount, the device argument is the device number of a loop device (such as /dev/loop0). The conventional 'mount' program does you the additional service, as a special case, of configuring a loop device for the file you identify, then mounting that device.

Quoted 2 lines

i wish to use the device argument to pass a pathname to a stackable filesystem. Is it easily doable ?

To be analogous to the loopback mount, you'd have to add code to the 'mount' program to convert the device argument to the appropriate arguments to mount() for the filesystem type in question.