lkml.org 
[lkml]   [2018]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 (resend)] block/loop: Serialize ioctl operations.
From
Date
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?

Relevant commits:

commit b5dd2f6047ca108001328aac0e8588edd15f1778
block: loop: improve performance via blk-mq

commit e03a3d7a94e2485b6e2fa3fb630b9b3a30b65718
block: loop: use kthread_work

\
 
 \ /
  Last update: 2018-09-22 14:40    [W:0.162 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site