[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: e2fsprogs thinks everything is already mounted



On Thu, Jun 21, 2001 at 12:51:17AM +0200, Robert Bihlmeyer wrote:
> Neal H Walfield <neal@cs.uml.edu> writes:
> 
> > I think that this will be difficult.  The ext2fs server, and any other
> > Hurd server for that matter, uses stores when dealing with large
> > unformatted data blocks.  A store is expressed using lengths and runs.
> > Therefore, you will not get, e.g. /dev/hd0s2, when you are expressing
> > file stores, memory stores, layered stores or interleaved stores.
> 
> But the store has some identifier which can go into mtab, even if it
> is not a simple filename.

Here are two examples: tmp is backed by a file, `foo,' 1MB in size, and
src is back by a partition, `hd2s7', on a device, 1GB in size.  Both tmp
and src are translated by /hurd/ext2fs.

	neal@desdemona:~ (0)$ storeinfo -lcnt tmp
	file: -: 21504+1024
	neal@desdemona:~ (0)$ storeinfo -lcnt src
	device: hd2s7: 3848+8

Take a look at hurd/libstore/{de,en}code.c to get an idea of how this
works.
	
> Actually having all the
> mount points/translated nodes handy is much more useful. If you know
> them, the other parameters are just a showtrans (or equivalent C call)
> away.

I think it would be better to build logic into the mount command that
would register translators it starts and settrans would remain a more
lowlevel utility.  Or the other option is to leave this up to the
translator, e.g. /hurd/ext2fs, to register itself.  I think I perfer the
latter.

> That I'm still not able to get, though: is it possible for a
> translator to inquire which node it has been attached to?

Translators are given a send right to their underlying node, however,
they do not necessarilty hold their right.  Additionally, there is
nothing stopping the parent filesystem from renaming the file assiciated
with that port.  So the question is, given a port, is it possible to get
the file and the answer is mostly no.  Consider hard links -- if I give
you an inode number can you find the file?

Attachment: pgp9GrSdBCgIQ.pgp
Description: PGP signature


Reply to: