From owner-freebsd-fs Thu Sep 21 11: 3:53 2000 Delivered-To: freebsd-fs@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id 1FC5B37B43E; Thu, 21 Sep 2000 11:03:49 -0700 (PDT) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id UAA37597; Thu, 21 Sep 2000 20:07:56 +0200 (CEST) (envelope-from sos) From: Soren Schmidt Message-Id: <200009211807.UAA37597@freebsd.dk> Subject: Re: disable write caching with softupdates? In-Reply-To: <200009211702.KAA13662@bubba.whistle.com> from Archie Cobbs at "Sep 21, 2000 10:02:16 am" To: archie@whistle.com (Archie Cobbs) Date: Thu, 21 Sep 2000 20:07:55 +0200 (CEST) Cc: mbendiks@eunet.no (Marius Bendiksen), sos@freebsd.org, fs@freebsd.org, terry@lambert.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It seems Archie Cobbs wrote: > Marius Bendiksen writes: > > > > The ATA drives Whistle is using, which is what I'm assuming > > > > Archie is on about, do _not_ support this facility. As far > > > > as I can tell, there wre some SCSI drives manufactured by > > > > IBM at one time which could do this, and some lab drives at > > > > Quantum (also SCSI). > > > Hmm, well, lets disable this then, there is no need to complicate > > > things :) > > > > Please make this conditional, as people with non-crippled hardware might > > want to employ the write cache. A sysctl or build option would be best. > > Yep, that was what I was originally suggesting. > > Soren do you want me to try to come up with a patch? > I don't claim to understand IDE technology.. can you > just send the disable command at any time or is it > more complicated than that? This will do it, or rather leave it as the disk default which should be disabled... cvs diff: Diffing . Index: ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.77 diff -u -r1.77 ata-disk.c --- ata-disk.c 2000/09/20 07:00:24 1.77 +++ ata-disk.c 2000/09/21 18:00:15 @@ -131,11 +131,11 @@ if (ata_command(adp->controller, adp->unit, ATA_C_SETFEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_RCACHE, ATA_WAIT_INTR)) printf("ad%d: enabling readahead cache failed\n", adp->lun); - +#if NOTYET if (ata_command(adp->controller, adp->unit, ATA_C_SETFEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_WCACHE, ATA_WAIT_INTR)) printf("ad%d: enabling write cache failed\n", adp->lun); - +#endif /* use DMA if drive & controller supports it */ ata_dmainit(adp->controller, adp->unit, ata_pmode(AD_PARAM), ata_wmode(AD_PARAM), ata_umode(AD_PARAM)); -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message