[dm-devel] [PATCH] dm-thinp: fix REQ_FLUSH semantics

Christoph Hellwig hch at infradead.org
Wed Apr 27 12:20:46 UTC 2011


On Wed, Apr 27, 2011 at 11:09:16AM +0100, Joe Thornber wrote:
> On Wed, 2011-04-27 at 06:02 -0400, Christoph Hellwig wrote:
> > REQ_FLUSH means the metadata needs to be flushed before the data payload
> > (if there is one), not after it.  And yes, this means the typical
> > REQ_FUA|REQ_FLUSH requests imply two flushes.
> 
> Not sure what you're getting at here.  The bio wasn't issued until after
> the commit.
> 
> 			if ((bio->bi_rw & (REQ_FUA | REQ_FLUSH))) {
> 				r = commit(tc);
> 				if (r < 0) {
> 					bio_io_error(bio);
> 					continue;
> 				}
> 			}
> 
> 			remap_bio(tc, bio, pool_block);
> 			generic_make_request(bio);

Indeed.  Given that the metadata is on-disk and doesn't change by
doing I/O to the newly mapped block always doing it before the
I/O to the underlying device is fine.  I thus retract this patch.




More information about the dm-devel mailing list