xfs
[Top] [All Lists]

Re: Device loses barrier support (was: Fixed patch for simple barriers.)

To: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Subject: Re: Device loses barrier support (was: Fixed patch for simple barriers.)
From: Andi Kleen <andi@xxxxxxxxxxxxxx>
Date: Fri, 5 Dec 2008 01:48:49 +0100
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Alasdair G Kergon <agk@xxxxxxxxxx>, Andi Kleen <andi-suse@xxxxxxxxxxxxxx>, Milan Broz <mbroz@xxxxxxxxxx>
In-reply-to: <Pine.LNX.4.64.0812041756550.29638@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20081204100050.GN6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812040836480.6118@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204142015.GQ6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812040913510.6118@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204145810.GR6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041139200.2434@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204174838.GS6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041401210.23079@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204221551.GV6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041756550.29638@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.4.2.1i
> And if barriers fail at random points, the user can't turn on disk cache 
> anyway (he would get data corruption if barrier write failed and hardware 

I think we already established earlier in the thread that there is no disk
corruption

> > > I'm wondering, where in fsync() does Linux wait for hardware disk cache 
> > > to 
> > > be flushed? Isn't there a bug that fsync() will return before the cache 
> > > is 
> > > flushed? I couldn't really find it. The last thing do_fsync calls is 
> > > filemap_fdatawait and it doesn't do cache flush (blkdev_issue_flush).
> > 
> > At least in fsync() on journaling fs the metadata update should push it.
> > 
> > -Andi
> 
> And what about fdatasync()?

I don't know. The surest way to find out is to instrument it and try.

-Andi
-- 
ak@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>