Thread (66 messages) 66 messages, 11 authors, 2010-09-18

Re: [PATCH 42/41] dm: convey that all flushes are processed as empty

From: Christoph Hellwig <hch@lst.de>
Date: 2010-09-08 00:00:01
Also in: dm-devel, linux-fsdevel, linux-raid, linux-scsi, lkml

On Tue, Sep 07, 2010 at 07:49:18PM -0400, Mike Snitzer wrote:
 		if (!(bio->bi_rw & REQ_FLUSH) || !bio->bi_size) {
+			/* done with normal IO or empty flush */
 			trace_block_bio_complete(md->queue, bio);
 			bio_endio(bio, io_error);
 		} else {
To clarify this further I'd reorder the checks:

		if ((bio->bi_rw & REQ_FLUSH) && bio->bi_size) {
			/*
			 * Preflush done, ...
			 */
		} else {
		}
quoted hunk ↗ jump to hunk
@@ -1302,20 +1302,17 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio)
 	ci.sector = bio->bi_sector;
 	ci.idx = bio->bi_idx;
 
+	start_io_acct(ci.io);
 	if (!is_flush) {
no need for the is_flush anymore now that it's only used once.  Again,
I think avoiding negatives without a reason in if statement usually
makes the code a bit more clear.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help