From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Zolnierkiewicz Subject: Re: simple use wcache from drive (was)Re: [RFC/PATCH 0/7] enable honoring write cache setting of IDE drive Date: Fri, 28 Jan 2005 23:56:41 +0100 Message-ID: <58cb370e05012814566dce888a@mail.gmail.com> References: <200501282254.j0SMsnBu023405@falcon10.austin.ibm.com> Reply-To: Bartlomiej Zolnierkiewicz Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from wproxy.gmail.com ([64.233.184.197]:10690 "EHLO wproxy.gmail.com") by vger.kernel.org with ESMTP id S262814AbVA1W4l (ORCPT ); Fri, 28 Jan 2005 17:56:41 -0500 Received: by wproxy.gmail.com with SMTP id 67so326672wri for ; Fri, 28 Jan 2005 14:56:41 -0800 (PST) In-Reply-To: <200501282254.j0SMsnBu023405@falcon10.austin.ibm.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Doug Maxey Cc: Jens Axboe , Jeff Garzik , Linux IDE Mailing List On Fri, 28 Jan 2005 16:54:49 -0600, Doug Maxey wrote: > > On Fri, 28 Jan 2005 23:32:53 +0100, Bartlomiej Zolnierkiewicz wrote: > >> The datacenters/server folks that would be using these drives would > >> expect them to remain as set. I have to check, but unless something > >> has changed very recently in the kernel, setting with hdparm does not > >> "stick" in the sense that the command succeeds to the disk, but no change > >> is made to the barrier. > > > >It is not a problem for IDE driver (flushes become no-ops) > >and this way you can later enable wcache and still use barries. > > Well that certainly simplfies things. > > How about this? No go until 'drive->wcache' bug is fixed. > ===== drivers/ide/ide-disk.c 1.115 vs edited ===== > --- 1.115/drivers/ide/ide-disk.c 2005-01-04 11:39:25 -06:00 > +++ edited/drivers/ide/ide-disk.c 2005-01-28 16:48:24 -06:00 > @@ -1083,7 +1083,7 @@ static void idedisk_setup (ide_drive_t * > if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) > drive->wcache = 1; > > - write_cache(drive, 1); > + write_cache(drive, drive->wcache); > > /* > * We must avoid issuing commands a drive does not understand >