From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/2] block: integrity: enable multi-page bvec for bio integrity
Date: Wed, 24 Apr 2019 07:40:18 +0200 [thread overview]
Message-ID: <20190424054018.GD12136@lst.de> (raw)
In-Reply-To: <20190423071550.20806-2-ming.lei@redhat.com>
On Tue, Apr 23, 2019 at 03:15:49PM +0800, Ming Lei wrote:
> + if (bip->bip_vcnt) {
> + iv = bip->bip_vec + bip->bip_vcnt - 1;
>
> + if (bvec_gap_to_prev(bio->bi_disk->queue, iv, offset))
> + return 0;
>
> + if (page_is_mergeable(iv, page, len, offset, false)) {
> + iv->bv_len += len;
> + goto done;
> + }
> + }
> +
> + iv = bip->bip_vec + bip->bip_vcnt;
> iv->bv_page = page;
> iv->bv_len = len;
> iv->bv_offset = offset;
> bip->bip_vcnt++;
> -
> + done:
> return len;
Just do an early return instead of the goto..
Otherwise this looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2019-04-24 5:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 7:15 [PATCH 0/2] block: enable multi-page bvec for bio integrity Ming Lei
2019-04-23 7:15 ` [PATCH 1/2] block: integrity: " Ming Lei
2019-04-24 5:40 ` Christoph Hellwig [this message]
2019-04-24 13:14 ` Martin K. Petersen
2019-04-24 13:18 ` Ming Lei
2019-04-23 7:15 ` [PATCH 2/2] block: integrity: simplify bio_integrity_prep Ming Lei
2019-04-24 5:42 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190424054018.GD12136@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).