Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1389721 > unrolled thread

[PATCH v3 0/3] block: avoid to call .bi_end_io() recursively

Started byMing Lei <ming.lei@canonical.com>
First post2016-04-28 03:10 +0200
Last post2016-05-02 17:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively Ming Lei <ming.lei@canonical.com> - 2016-04-28 03:10 +0200
    Re: [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively Christoph Hellwig <hch@infradead.org> - 2016-05-02 17:00 +0200

#1389721 — [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively

FromMing Lei <ming.lei@canonical.com>
Date2016-04-28 03:10 +0200
Subject[PATCH v3 0/3] block: avoid to call .bi_end_io() recursively
Message-ID<rsICT-2JI-29@gated-at.bofh.it>
Hi,

The 1st patch handles bio error in dio_end_io() which is only
used by btrfs.

The 2nd patch uses bio_endio() to call .bi_end_io() in dio_end_io().

The 3rd patch avoids to call .bi_end_io recursively in complete path.

xfstests(-g auto) is run over ext4, xfs and btrfs with this patchset
and no regression is reported.

With this patchset, lots of stack space can be saved in bio complete
path. Even there was stack overflow report in bio complete path, see
details in 3/3 commit log.

V3:
	- no behaviour change
	- reorganize the function of unwind_bio_endio() and make it
	more clean

V2:
	- introduce patch 1 & 2
	- deal with running bio_endio() from process context, and
	makes generic/323 & generic/224 of xfstests happy on btrfs

V1:
	- change to RFC
	- fix when unwind_bio_endio() is called recursively
	- run xfstest again: no regression found on ext4,
	but generic/323 and generic/224 cause kernel oops


Ming Lei (3):
  fs: direct-io: handle error in dio_end_io()
  fs: direct-io: call .bi_end_io via bio_endio()
  bflock: avoid to call .bi_end_io() recursively

 block/bio.c    | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 fs/direct-io.c |  8 +++-----
 2 files changed, 56 insertions(+), 7 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1392260

FromChristoph Hellwig <hch@infradead.org>
Date2016-05-02 17:00 +0200
Message-ID<runui-5gi-7@gated-at.bofh.it>
In reply to#1389721
On Thu, Apr 28, 2016 at 09:09:00AM +0800, Ming Lei wrote:
> The 3rd patch avoids to call .bi_end_io recursively in complete path.

Care to explain what the reason for doing that is?

If we have excessively long bi_end_io chains we should probably look
into fixing them instead.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web