Linux block layer
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@gmail.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Dmitry Monakhov <dmonakhov@openvz.org>,
	Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] block: remove bio_rewind_iter()
Date: Tue, 4 Sep 2018 23:52:33 -0400	[thread overview]
Message-ID: <20180905035232.GA2501@kmo-pixel> (raw)
In-Reply-To: <20180905033335.12666-1-ming.lei@redhat.com>

Thanks for doing this, Ming

On Wed, Sep 05, 2018 at 11:33:35AM +0800, Ming Lei wrote:
> It is pointed that bio_rewind_iter() is one very bad API[1]:
> 
> 1) bio size may not be restored after rewinding
> 
> 2) it causes some bogus change, such as 5151842b9d8732 (block: reset
> bi_iter.bi_done after splitting bio)
> 
> 3) rewinding really makes things complicated wrt. bio splitting
> 
> 4) unnecessary updating of .bi_done in fast path
> 
> [1] https://marc.info/?t=153549924200005&r=1&w=2
> 
> So this patch takes Kent's suggestion to restore one bio into its original
> state via saving bio iterator(struct bvec_iter) in bio_integrity_prep(),
> given now bio_rewind_iter() is only used by bio integrity code.
> 
> Suggested-by: Kent Overstreet <kent.overstreet@gmail.com>
> Cc: Kent Overstreet <kent.overstreet@gmail.com>
> Cc: Dmitry Monakhov <dmonakhov@openvz.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

Acked-by: Kent Overstreet <kent.overstreet@gmail.com>

  reply	other threads:[~2018-09-05  3:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05  3:33 [PATCH] block: remove bio_rewind_iter() Ming Lei
2018-09-05  3:52 ` Kent Overstreet [this message]
2018-09-05 13:19 ` Christoph Hellwig
2018-09-05 21:46 ` Jens Axboe
2018-09-15  7:03 ` Christoph Hellwig
2018-09-15 14:41   ` Jens Axboe

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=20180905035232.GA2501@kmo-pixel \
    --to=kent.overstreet@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dmonakhov@openvz.org \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --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