[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070531185836.GC32105@kernel.dk>
Date: Thu, 31 May 2007 20:58:37 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Phillip Susi <psusi@....rr.com>
Cc: device-mapper development <dm-devel@...hat.com>,
David Chinner <dgc@....com>, Tejun Heo <htejun@...il.com>,
linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Andreas Dilger <adilger@...sterfs.com>,
Stefan Bader <Stefan.Bader@...ibm.com>
Subject: Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md.
On Thu, May 31 2007, Phillip Susi wrote:
> Jens Axboe wrote:
> >No Stephan is right, the barrier is both an ordering and integrity
> >constraint. If a driver completes a barrier request before that request
> >and previously submitted requests are on STABLE storage, then it
> >violates that principle. Look at the code and the various ordering
> >options.
>
> I am saying that is the wrong thing to do. Barrier should be about
> ordering only. So long as the order they hit the media is maintained,
> the order the requests are completed in can change. barrier.txt bears
But you can't guarentee ordering without flushing the data out as well.
It all depends on the type of cache on the device, of course. If you
look at the ordinary sata/ide drive with write back caching, you can't
just issue the requests in order and pray that the drive cache will make
it to platter.
If you don't have write back caching, or if the cache is battery backed
and thus guarenteed to never be lost, maintaining order is naturally
enough.
Or if the drive can do ordered queued commands, you can relax the
flushing (again depending on the cache type, you may need to take
different paths).
> "Requests in ordered sequence are issued in order, but not required to
> finish in order. Barrier implementation can handle out-of-order
> completion of ordered sequence. IOW, the requests MUST be processed in
> order but the hardware/software completion paths are allowed to reorder
> completion notifications - eg. current SCSI midlayer doesn't preserve
> completion order during error handling."
If you carefully re-read that paragraph, then it just tells you that the
software implementation can deal with reordered completions. It doesn't
relax the rconstraints on ordering and integrity AT ALL.
--
Jens Axboe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists