[PATCH 0/3] Add invalidate_gendisk() helper for drivers to invalidate the gendisk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series comes from Christoph Hellwig's suggestion [1]. Some block
device drivers such as loop driver and nbd driver need to invalidate
the gendisk when the backend is detached so that the gendisk can be
reused by the new backend. Now the invalidation is done in device
driver with their own ways. To avoid code duplication and hide
some internals of the implementation, this series adds a block layer
helper and makes both loop driver and nbd driver use it.

[1] https://lore.kernel.org/all/YTmqJHd7YWAQ2lZ7@xxxxxxxxxxxxx/

Xie Yongji (3):
  block: Add invalidate_gendisk() helper to invalidate the gendisk
  loop: Use invalidate_gendisk() helper to invalidate gendisk
  nbd: Use invalidate_gendisk() helper on disconnect

 block/genhd.c         | 21 +++++++++++++++++++++
 drivers/block/loop.c  |  6 +-----
 drivers/block/nbd.c   | 12 +++---------
 include/linux/genhd.h |  1 +
 4 files changed, 26 insertions(+), 14 deletions(-)

-- 
2.11.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux