From owner-freebsd-hackers Wed Nov 3 9:44:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 46A01150BA for ; Wed, 3 Nov 1999 09:44:43 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA59898; Wed, 3 Nov 1999 09:44:35 -0800 (PST) (envelope-from dillon) Date: Wed, 3 Nov 1999 09:44:35 -0800 (PST) From: Matthew Dillon Message-Id: <199911031744.JAA59898@apollo.backplane.com> To: Zhihui Zhang Cc: Greg Lehey , freebsd-hackers@FreeBSD.ORG Subject: Re: Granularity of disk I/O References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :Thanks for your reply. I know that directory entries are physically :prevented from crossing device block boundaries in order to ensure atomic :update. If I write a directory file with a buffer (using some kind of :multi-sector transfer) and do not know which sector within the buffer :fails, what will the filesystem do? : :-Zhihui All modern SCSI & IDE disks will remap sectors on write failures, so unless the disk is totally hosed you don't have to worry about this situation occuring. If the disk is totally hosed you will have other problems to worry about. Currently if a write fails the filesystem will retry it. The system will remain internally consistent but if you reboot without the buffer getting successfully written to the disk then the disk will wind up with some corruption and have to be recovered with fsck. From the system's point of view, there is no difference in reliability between doing a single sector transfer and a multi-sector transfer except for the size of the retry. Since retries do not occur very often nobody really cares how big the retry is. Since there is a huge performance gain doing multi-sector transfers, that is what the system does. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message