From: Theodore Ts'o <tytso@mit.edu>
To: harshads <harshads@google.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Fix a race in the ext4 shutdown path.
Date: Wed, 10 Jan 2018 00:14:03 -0500 [thread overview]
Message-ID: <20180110051403.GF5809@thunk.org> (raw)
In-Reply-To: <20180109225257.93785-1-harshads@google.com>
On Tue, Jan 09, 2018 at 02:52:57PM -0800, harshads wrote:
> This patch fixes a race between the shutdown path and bio completion
> handling. In the ext4 direct io path with async io, after submitting a
> bio to the block layer, if journal starting fails,
> ext4_direct_IO_write() would bail out pretending that the IO
> failed. The caller would have had no way of knowing whether or not the
> IO was successfully submitted. So instead, we return -EIOCBQUEUED in
> this case. Now, the caller knows that the IO was submitted. The bio
> completion handler takes care of the error.
>
> Tested: Ran the shutdown xfstest test 461 in loop for over 2 hours across
> 4 machines resulting in over 400 runs. Verified that the race didn't
> occur. Usually the race was seen in about 20-30 iterations.
>
> Signed-off-by: Harshad Shirwadkar <harshads@google.com>
Thanks, applied.
- Ted
prev parent reply other threads:[~2018-01-10 5:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 22:52 [PATCH] ext4: Fix a race in the ext4 shutdown path harshads
2018-01-10 5:14 ` Theodore Ts'o [this message]
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=20180110051403.GF5809@thunk.org \
--to=tytso@mit.edu \
--cc=harshads@google.com \
--cc=linux-ext4@vger.kernel.org \
/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