[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100908000001.GA21552@lst.de>
Date: Wed, 8 Sep 2010 02:00:01 +0200
From: Christoph Hellwig <hch@....de>
To: Mike Snitzer <snitzer@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, jack@...e.cz, mst@...hat.com,
linux-ide@...r.kernel.org,
device-mapper development <dm-devel@...hat.com>,
James.Bottomley@...e.de, konishi.ryusuke@....ntt.co.jp, hch@....de,
k-ueda@...jp.nec.com, vst@...b.net, linux-scsi@...r.kernel.org,
rusty@...tcorp.com.au, linux-raid@...r.kernel.org,
mpatocka@...hat.com, swhiteho@...hat.com, chris.mason@...cle.com,
tytso@....edu, jaxboe@...ionio.com, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, rwheeler@...hat.com,
Milan Broz <mbroz@...hat.com>
Subject: Re: [PATCH 42/41] dm: convey that all flushes are processed as empty
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 {
}
> @@ -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.
--
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