* [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively
@ 2016-04-28 1:09 Ming Lei
2016-05-02 14:52 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2016-04-28 1:09 UTC (permalink / raw)
To: Jens Axboe, linux-kernel
Cc: linux-block, Christoph Hellwig, linux-btrfs, Ming Lei,
open list:FILESYSTEMS (VFS and infrastructure)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively
2016-04-28 1:09 [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively Ming Lei
@ 2016-05-02 14:52 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2016-05-02 14:52 UTC (permalink / raw)
To: Ming Lei
Cc: Jens Axboe, linux-kernel, linux-block, Christoph Hellwig,
linux-btrfs, open list:FILESYSTEMS (VFS and infrastructure)
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-02 14:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 1:09 [PATCH v3 0/3] block: avoid to call .bi_end_io() recursively Ming Lei
2016-05-02 14:52 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox