[lkml]   [2015]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/7] block: reread partitions improvements
For loop, the root cause is one ABBA and one AA lock dependency
issue, and the two are fixed by patch 2 and patch 3 each.

Another reason is from the trylock in blkdev_reread_part(), which
may cause partition scanning failure too sometimes when another task
is holding the bd_mutex. In the discussion[1], both Tejun and Christoph
suggests to replace the trylock with mutex_lock in blkdev_reread_part(),
also Christoph suggests to export blkdev_reread_part.

Following the discussion, this patchset exports blkdev_reread_part(), and
introduces lockless __blkdev_reread_part() for fixing loop's AA lock issue.
Then ioctl_by_bdev(BLKRRPART) in loop, nbd and dasd is replaced with
blkdev_reread_part(). In the last patch, trylock in blkdev_reread_part()
is replaced with mutex_lock, and some analysis is provided about the

This is a slightly reworked set from what Ming sent a few days ago,
based on Christoph's feedback. I've tested this out quite succesfully
in the scenario that prompted my first patch as well.


Jarod Wilson (3):
block: export blkdev_reread_part() and __blkdev_reread_part()
block: loop: fix another reread part failure
s390/block/dasd: remove obsolete while -EBUSY loop

Ming Lei (4):
block: loop: don't hold lo_ctl_mutex in lo_open
block: nbd: convert to blkdev_reread_part()
block: dasd_genhd: convert to blkdev_reread_part
block: replace trylock with mutex_lock in blkdev_reread_part()

block/ioctl.c | 34 +++++++++++++++++++----
drivers/block/loop.c | 60 ++++++++++++++++++++++++++++++++++-------
drivers/block/loop.h | 1 +
drivers/block/nbd.c | 2 +-
drivers/s390/block/dasd_genhd.c | 22 +++++----------
include/linux/fs.h | 3 +++
6 files changed, 90 insertions(+), 32 deletions(-)

CC: Christoph Hellwig <>
CC: Jens Axboe <>
CC: Tejun Heo <>
CC: Alexander Viro <>
CC: Markus Pargmann <>
CC: Stefan Weinhuber <>
CC: Stefan Haberland <>
CC: Sebastian Ott <>
CC: Fabian Frederick <>
CC: Ming Lei <>
CC: David Herrmann <>
CC: Mike Galbraith <>
CC: Andrew Morton <>
CC: Peter Zijlstra <>


 \ /
  Last update: 2015-04-08 09:01    [W:1.691 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site