From owner-freebsd-hackers Thu Mar 13 00:51:34 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA14866 for hackers-outgoing; Thu, 13 Mar 1997 00:51:34 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id AAA14854 for ; Thu, 13 Mar 1997 00:51:30 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id JAA22964; Thu, 13 Mar 1997 09:51:17 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id JAA03179; Thu, 13 Mar 1997 09:48:29 +0100 (MET) Message-ID: <19970313094829.GV57056@uriah.heep.sax.de> Date: Thu, 13 Mar 1997 09:48:29 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: nao@sbl.cl.nec.co.jp (Naoki Hamada) Cc: hackers@FreeBSD.ORG Subject: Re: [2.2-GAMMA] partial write to raw mode disk References: <199703130505.OAA26681@sirius.sbl.cl.nec.co.jp> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199703130505.OAA26681@sirius.sbl.cl.nec.co.jp>; from Naoki Hamada on Mar 13, 1997 14:05:18 +0900 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Naoki Hamada wrote: > Writing an incomplete data to a raw mode disk device seems to fail. Is > this an intended behavior? Of course! The raw device is always restricted to be handled in multiples of its physical block size. That's why it is `raw'. > On the other hand, writing the same data to > the corresponding block device always succeeds. But you never have any guarantee when the data will actually arrive on the disk, and you will have poor error reporting due to decoupling the process. The only guarantee to get the data onto the drive is to shutdown the system. :-] (Yes, i have seen systems where this was true!) The only other data is to umount the corresponding filesystem, but since you aren't using one, you cannot do this. (There's another bad effect when using block devices: you blow the buffer cache.) Ergo: do only use block devices in order to mount filesystems over them. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)