Understanding the rationale behind dropping of "block devices"
Allan Jude
allanjude at freebsd.org
Mon Jan 16 02:55:33 UTC 2017
On 2017-01-15 21:40, Aijaz Baig wrote:
> I am a relative noob to the storage world in general and FreeBSD in
> particular. OF what I have been learning of late, I have become somewhat
> familiar with such concepts like disk queuing, IOPs, latencies and the likes
> I am also reading the classic 'The design and implementation of the FreeBSD
> operating system'. However of what I am reading, FreeBSD has "done away"
> with "block devices" altogether
>
> Of what I have been reading in that book and elsewhere it appears that the
> "block" devices have been dropped out of the architecture. So what I, with
> my (still) very limited knowledge of storage, understand this as there are
> no drivers in FreeBSD that would deal with blocks of data.
>
> But when I check the disk nodes under /dev I get this
> [CODE]ls -l /dev/*disk0
> brw-r----- 1 root operator 14, 0 Jan 2 09:39 /dev/disk0
> crw-r----- 1 root operator 14, 0 Jan 2 09:39 /dev/rdisk0[/CODE]
>
> where 'b' means block interface and 'c' means char or raw interface. So how
> do I reconcile this with what I read about "block devices being gone"
> before. What does 'block' mean here?
>
> Of what I know, the block device would be served through the "page cache"
> (a place where file system caches it's data and meta data) where as the raw
> device would be served via the "buffer cache" where "disk blocks" are
> cached by the OS. Thus a block device would be served via the file system
> where as the raw device won't. Is this correct?? If yes, then what does
> 'block' above signify? Or rephrasing the question, what was there earlier
> in FreeBSD before 'block device support' was dropped?
>
> I am sure seasoned storage veterans would have a lot more to add. I would
> be highly obliged if some one could please elaborate and add more context
> to it.
>
What version of FreeBSD are you using?
All modern versions of FreeBSD have no 'block' devices, and use
different device names than you included in your pasted message.
crw-r----- 1 root operator 0x92 Jul 27 04:44 /dev/ada0
crw-r----- 1 root operator 0xa2 Jul 27 04:44 /dev/ada1
crw-r----- 1 root operator 0xad Jul 27 04:44 /dev/da0
crw-r----- 1 root operator 0xae Jul 27 04:44 /dev/da1
(SATA disks are /dev/ada* and SAS/SCSI/USB/etc are /dev/da*)
--
Allan Jude
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20170115/38c691d8/attachment.sig>
More information about the freebsd-hackers
mailing list