Date: Sat, 8 Nov 2008 14:37:56 +0100 From: Nicolas Rachinsky <fbsd-stable-0@ml.turing-complete.org> To: stable@freebsd.org Subject: Re: Block device Message-ID: <20081108133756.GA26413@mid.pc5.i.0x5.de> In-Reply-To: <49107933.7070907@samsco.org> References: <d3ea75b30811040612g3ba10a8fuf5551b730176acc2@mail.gmail.com> <004901c93e8a$1b556500$639049d9@EC1a> <20081104145144.GB14539@hugo10.ka.punkt.de> <49107933.7070907@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Scott Long <scottl@samsco.org> [2008-11-04 09:32 -0700]: > 1. disk access in the driver layer still happens on a block basis. It's > true that to the application layer, the device has character dev > semantics, meaning that arbitrary numbers of bytes can be accessed > randomly without any restrictions. But deep down inside the kernel, > it's still doing block-by-block access. Isn't it the other way round? It has character device semantics, thus you cannot do reads and writes of arbitrary size on arbitrary positions? # dd if=/dev/ad4 bs=1 count=1 dd: /dev/ad4: Invalid argument root@pc5 ~# dd if=/dev/ad4 bs=512 count=1 >/dev/null 1+0 records in 1+0 records out 512 bytes transferred in 0.000173 secs (2957966 bytes/sec) Nicolas -- http://www.rachinsky.de/nicolas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081108133756.GA26413>