From: Andries.Brouwer@cwi.nl
To: alessandro.suardi@oracle.com, andries.brouwer@cwi.nl,
jgarzik@mandrakesoft.com, torvalds@transmeta.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: 2.5.2-pre7 still missing bits of kdev_t
Date: Fri, 4 Jan 2002 13:21:27 GMT [thread overview]
Message-ID: <UTC200201041321.NAA210580.aeb@cwi.nl> (raw)
Jeff Garzik wrote [on reiserfs]:
> granted you can stick a kdev_to_nr in there but it's still an FS policy
> decision at that point, IMHO...
Yes, for today we stick a kdev_t_to_nr in there and preserve
old behaviour, that is, nothing changes and no policy decisions
have been made. It should have been there from the start.
For next week, when larger-than-16-bit device numbers are
introduced, the proper code everywhere (on all interfaces
with the outside world: stat, mknod with user space and
special device nodes on disk and network filesystems)
would unpack the kdev_t into major and minor, and pack
again to the dev_t required by this interface (and vice versa).
That is, in principle, there is no global, unique, kdev_t_to_nr.
This is done already in most places, but reiserfs is one
of the exceptions, and they'll need a policy decision
on how to pack. In fact ext2 needs precisely the same
policy decision.
The details are rather unimportant - device numbers are
nonportable, so if we transport an ext2 disk to some
other OS and it sees different major,minor pairs, there
is no big catastrophe. Still, I have heard many a complaint
from sysadmins who needed to do _mknod foo x ma mi_
on some NFS mounted filesystem and had to make some
computations to decide on the right ma' mi' to use.
Installation scripts fail over NFS.
That is, even though a device number must be regarded
as a cookie, the fact that the mknod command separates
that cookie into two parts means that the way the
on-disk dev_t is separated belongs to the definition
of the on-disk filesystem format.
Now that 8+24, 12+20, 14+18, 32+32 all occur, the easy
way to solve all problems for a filesystem is to use 32+32.
That is what NFSv3 does, and isofs, etc.
If it is possible, the right policy no doubt is to store 32+32.
If there is no room for that then one just has to live with
the fact that the filesystem image is somewhat less portable.
Andries
next reply other threads:[~2002-01-04 13:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-04 13:21 Andries.Brouwer [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-01-04 19:32 2.5.2-pre7 still missing bits of kdev_t Andries.Brouwer
2002-01-04 19:24 Andries.Brouwer
2002-01-04 21:10 ` Alexander Viro
2002-01-04 21:14 ` Linus Torvalds
2002-01-05 0:10 ` Alan Cox
2002-01-04 1:47 Andries.Brouwer
2002-01-04 0:05 Alessandro Suardi
2002-01-04 0:13 ` Jeff Garzik
2002-01-04 2:32 ` Linus Torvalds
2002-01-04 6:52 ` Jeff Garzik
2002-01-04 16:45 ` Linus Torvalds
2002-01-04 17:34 ` Nikita Danilov
2002-01-04 17:51 ` Jeff Garzik
2002-01-04 17:53 ` Linus Torvalds
2002-01-04 18:11 ` Alexander Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=UTC200201041321.NAA210580.aeb@cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=alessandro.suardi@oracle.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox