From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, viro@math.psu.edu
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
torvalds@transmeta.com
Subject: Re: [RFC] lazy allocation of struct block_device
Date: Sun, 2 Sep 2001 20:05:45 GMT [thread overview]
Message-ID: <200109022005.UAA20596@vlet.cwi.nl> (raw)
>> How many bits should a dev_t have? Well, enough.
> Enough for what? To cover all currently supported devices?
Enough to avoid the hassles that one has when dev_t is too small.
dev_t is a communication channel - you come with a cookie
and get a device in return.
Now NFS uses a 64-bit dev_t. If you choose a smaller one
then you have to invent some mapping between your 16 or 32 bits
and the 64 of NFS. I have not myself used systems that use a
64-bit dev_t (except for my own Linux machine :-) but have seen
systems with 32 bits divided 8+24 or 12+20 or 14+18 or 16+16,
so your mapping may have to depend on what is on the other side.
Not difficult, but annoying. A hassle for the sysadm.
There is no hassle with 64-bit dev_t.
In reality nobody wants a dev_t. We want a string.
A device path that gives the bus and SCSI ID or USB address
or internet URL plus protocol where to find this device.
But such a device path is large and of unknown shape.
Current user space software cannot easily handle such new objects.
Life becomes simpler if a disk on my local ethernet that
requires a password before use can be accessed as /dev/eda
not different from /dev/hda. Some as yet unspecified attach()
system call can turn device paths into numbers (dev_t),
and a following mknod() can attach a Unix filename to the number.
You see that in such a setup the dev_t is a handle, maybe a
pointer, not unlike the filehandles that NFS uses.
If your machine has more than 1 GB of memory, maybe you want
to use more than 32 bits for your handle.
The above is just fiction - I don't know how devices will be handled
in the future. But I find it very easy to conjure up scenarios
where having 64-bit dev_t would be very useful in order to make
sure that our current body of programs keeps working also in new
circumstances.
Andries
next reply other threads:[~2001-09-02 20:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-02 20:05 Andries.Brouwer [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-09-02 17:25 [RFC] lazy allocation of struct block_device Andries.Brouwer
2001-09-02 18:46 ` Alexander Viro
2001-09-02 10:24 Andries.Brouwer
2001-09-02 11:38 ` Alexander Viro
2001-09-02 12:49 ` Alan Cox
2001-09-02 15:38 ` Richard Gooch
2001-09-02 16:07 ` Alexander Viro
2001-09-02 16:16 ` Richard Gooch
2001-09-01 20:42 Andries.Brouwer
2001-09-01 21:26 ` Jamie Lokier
2001-09-01 23:41 ` Anton Altaparmakov
2001-09-01 23:54 ` Alexander Viro
2001-09-01 13:30 Andries.Brouwer
2001-09-01 16:26 ` Alexander Viro
2001-08-31 4:43 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=200109022005.UAA20596@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.