[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]