All of lore.kernel.org
 help / color / mirror / Atom feed
* fix block device size update serialization v2
@ 2020-08-23  9:10 ` Christoph Hellwig
  0 siblings, 0 replies; 22+ messages in thread
From: Christoph Hellwig @ 2020-08-23  9:10 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Justin Sanders, Josef Bacik, Xianting Tian, linux-block,
	dm-devel, Stefan Haberland, Jan Hoeppner, linux-kernel, nbd,
	linux-nvme, linux-s390

Hi Jens,

this series fixes how we update i_size for the block device inodes (and
thus the block device).  Different helpers use two different locks
(bd_mutex and i_rwsem) to protect the update, and it appears device
mapper uses yet another internal lock.  A lot of the drivers do the
update handcrafted in often crufty ways.  And in addition to that mess
it turns out that the "main" lock, bd_mutex is pretty dead lock prone
vs other spots in the block layer that acquire it during revalidation
operations, as reported by Xianting.

Fix all that by adding a dedicated spinlock just for the size updates.

Changes since v1:
 - don't call __invalidate_device under the new spinlock
 - don't call into the file system code from the nvme removal code

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-08-29 16:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-23  9:10 fix block device size update serialization v2 Christoph Hellwig
2020-08-23  9:10 ` Christoph Hellwig
2020-08-23  9:10 ` [PATCH 1/3] block: replace bd_set_size with bd_set_nr_sectors Christoph Hellwig
2020-08-23  9:10   ` Christoph Hellwig
2020-08-24  8:25   ` Sagi Grimberg
2020-08-24  8:25     ` Sagi Grimberg
2020-08-23  9:10 ` [PATCH 2/3] block: fix locking for struct block_device size updates Christoph Hellwig
2020-08-23  9:10   ` Christoph Hellwig
2020-08-24  7:36   ` Hannes Reinecke
2020-08-24  7:36     ` Hannes Reinecke
2020-08-24  8:26   ` Sagi Grimberg
2020-08-24  8:26     ` Sagi Grimberg
2020-08-23  9:10 ` [PATCH 3/3] nvme: don't call revalidate_disk from nvme_set_queue_dying Christoph Hellwig
2020-08-23  9:10   ` Christoph Hellwig
2020-08-24  7:37   ` Hannes Reinecke
2020-08-24  7:37     ` Hannes Reinecke
2020-08-24  8:26   ` Sagi Grimberg
2020-08-24  8:26     ` Sagi Grimberg
2020-08-27  7:47 ` fix block device size update serialization v2 Christoph Hellwig
2020-08-27  7:47   ` Christoph Hellwig
2020-08-29 16:47   ` Jens Axboe
2020-08-29 16:47     ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.