From owner-freebsd-stable@FreeBSD.ORG Sat Nov 8 13:55:38 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 112831065679 for ; Sat, 8 Nov 2008 13:55:38 +0000 (UTC) (envelope-from nicolas@i.0x5.de) Received: from n.0x5.de (n.0x5.de [217.197.85.144]) by mx1.freebsd.org (Postfix) with ESMTP id AEFC18FC1A for ; Sat, 8 Nov 2008 13:55:37 +0000 (UTC) (envelope-from nicolas@i.0x5.de) Received: by pc5.i.0x5.de (Postfix, from userid 1003) id 10F305C81; Sat, 8 Nov 2008 14:37:56 +0100 (CET) Date: Sat, 8 Nov 2008 14:37:56 +0100 From: Nicolas Rachinsky To: stable@freebsd.org Message-ID: <20081108133756.GA26413@mid.pc5.i.0x5.de> Mail-Followup-To: stable@freebsd.org References: <004901c93e8a$1b556500$639049d9@EC1a> <20081104145144.GB14539@hugo10.ka.punkt.de> <49107933.7070907@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49107933.7070907@samsco.org> X-Powered-by: FreeBSD X-Homepage: http://www.rachinsky.de X-PGP-Keyid: 887BAE72 X-PGP-Fingerprint: 039E 9433 115F BC5F F88D 4524 5092 45C4 887B AE72 X-PGP-Keys: http://www.rachinsky.de/nicolas/gpg/nicolas_rachinsky.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Re: Block device X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2008 13:55:38 -0000 * Scott Long [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