Date: Wed, 24 Jun 1998 21:27:36 +1000 From: Bruce Evans <bde@zeta.org.au> To: chuckr@glue.umd.edu, phk@critter.freebsd.dk Cc: freebsd-current@FreeBSD.ORG Subject: Re: Heads up: block devices to disappear! Message-ID: <199806241127.VAA08509@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>It's really simple, blockdevices are now only used for mounting, the
>kernel can easily figure this out, so there is no need to have special
>device nodes for this.
Block devices are also used for buffering. Examples:
a) Linux fsck.ext2 does partial sector i/o's, so it does not work
on character disk devices. It works OK on block disk devices
despite lack of support for some special ioctls.
b) The simple binary editor that I use reads/writes precisely the
bytes bytes inspected/changed. This is normally the correct thing
for a binary editor to do, but it does not work on character disk
devices.
c) Caching of (small) slow media, e.g.,:
sleep 1000 </dev/fd0 # prevent last close
tar tvvf /dev/fd0 # inspect floppy contents
tar xvvf /dev/fd0 ... # read floppy contents from buffer cache.
The last close prevention may be unnecessary under Linux (Linux at
least used to not invalidate the cache until disk change), and doesn't
actually work under FreeBSD (a comment in spec_close() says that
"... on last close ... we must invalidate any in core blocks", but
spec_close() actually always invalidates the cache). FreeBSD also
has problems caching the whole 720 blocks that must be cached to
completely cache a 1440K floppy, since VMIO buffers aren't used for
the sub-page block size used for block devices.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806241127.VAA08509>
