From: Ming Lei <ming.lei@redhat.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Jan Kara <jack@suse.cz>, Jens Axboe <axboe@kernel.dk>,
syzbot
<syzbot+4684a000d5abdade83fac55b1e7d1f935ef1936e@syzkaller.appspotmail.com>,
syzbot <syzbot+bf89c128e05dd6c62523@syzkaller.appspotmail.com>
Subject: Re: [PATCH v3 (resend)] block/loop: Serialize ioctl operations.
Date: Mon, 24 Sep 2018 06:03:02 +0800 [thread overview]
Message-ID: <20180923220300.GA12589@ming.t460p> (raw)
In-Reply-To: <1af79300-cb04-36e3-a650-168a5942161f@i-love.sakura.ne.jp>
On Sat, Sep 22, 2018 at 09:39:02PM +0900, Tetsuo Handa wrote:
> Hello, Ming Lei.
>
> I'd like to hear your comment on this patch regarding the ordering of
> stopping kernel thread.
>
> > In order to enforce this strategy, this patch inversed
> > loop_reread_partitions() and loop_unprepare_queue() in loop_clr_fd().
> > I don't know whether it breaks something, but I don't have testcases.
>
> Until 3.19, kthread_stop(lo->lo_thread) was called before
> ioctl_by_bdev(bdev, BLKRRPART, 0) is called.
> During 4.0 to 4.3, the loop module was using "kloopd" workqueue.
> But since 4.4, loop_reread_partitions(lo, bdev) is called before
> loop_unprepare_queue(lo) is called. And this patch is trying to change to
> call loop_unprepare_queue() before loop_reread_partitions() is called.
> Is there some reason we need to preserve current ordering?
IMO, both the two orders are fine, and what matters is that 'lo->lo_state'
is updated before loop_reread_partitions(), then any IO from loop_reread_partitions
will be failed, so it shouldn't be a big deal wrt. the order between
loop_reread_partitions() and loop_unprepare_queue().
Thanks,
Ming
next prev parent reply other threads:[~2018-09-23 22:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 10:58 [PATCH v3 (resend)] block/loop: Serialize ioctl operations Tetsuo Handa
2018-09-22 12:39 ` Tetsuo Handa
2018-09-23 22:03 ` Ming Lei [this message]
2018-09-24 10:29 ` [PATCH v4] " Tetsuo Handa
2018-09-24 12:31 ` Jan Kara
2018-09-24 13:05 ` Tetsuo Handa
2018-09-24 16:31 ` Jan Kara
2018-09-24 18:47 ` Jan Kara
2018-09-24 21:06 ` Tetsuo Handa
2018-09-25 8:06 ` Jan Kara
2018-09-25 9:57 ` Tetsuo Handa
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=20180923220300.GA12589@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=syzbot+4684a000d5abdade83fac55b1e7d1f935ef1936e@syzkaller.appspotmail.com \
--cc=syzbot+bf89c128e05dd6c62523@syzkaller.appspotmail.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