public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* make block layer auto-PI deadlock safe v2
@ 2025-10-30 14:44 Christoph Hellwig
  2025-10-30 14:44 ` [PATCH 1/2] block: blocking mempool_alloc doesn't fail Christoph Hellwig
  2025-10-30 14:44 ` [PATCH 2/2] block: make bio auto-integrity deadlock safe Christoph Hellwig
  0 siblings, 2 replies; 11+ messages in thread
From: Christoph Hellwig @ 2025-10-30 14:44 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Martin K. Petersen, linux-block

Hi all,

currently the automatic block layer PI generation allocates the integrity
buffer using kmalloc, and thus could deadlock, or fail I/O request due
to memory pressure.

Fix this by adding a mempool, and capping the maximum I/O size on PI
capable devices to not exceed the allocation size of the mempool.

This is against the block-6.18 branch as it has a contextual dependency
on the PI fix merged there yesterday.

Chances since v1:
 - keep the gfp flags manipulation local (at least for now)
 - fix the maximum size calculation

Diffstat:
 block/bio-integrity-auto.c    |   26 ++--------------------
 block/bio-integrity.c         |   48 ++++++++++++++++++++++++++++++++++++++++++
 block/blk-settings.c          |   21 ++++++++++++++++++
 include/linux/bio-integrity.h |    6 +++++
 include/linux/blk-integrity.h |    5 ++++
 5 files changed, 83 insertions(+), 23 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* make block layer auto-PI deadlock safe v3
@ 2025-11-03 10:16 Christoph Hellwig
  2025-11-03 10:16 ` [PATCH 2/2] block: make bio auto-integrity deadlock safe Christoph Hellwig
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-03 10:16 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Martin K. Petersen, linux-block

Hi all,

currently the automatic block layer PI generation allocates the integrity
buffer using kmalloc, and thus could deadlock, or fail I/O request due
to memory pressure.

Fix this by adding a mempool, and capping the maximum I/O size on PI
capable devices to not exceed the allocation size of the mempool.

This is against the block-6.18 branch as it has a contextual dependency
on the PI fix merged there yesterday.

Chances since v2:
 - comment typo fixes

Chances since v1:
 - keep the gfp flags manipulation local (at least for now)
 - fix the maximum size calculation

Diffstat:
 block/bio-integrity-auto.c    |   26 ++--------------------
 block/bio-integrity.c         |   48 ++++++++++++++++++++++++++++++++++++++++++
 block/blk-settings.c          |   21 ++++++++++++++++++
 include/linux/bio-integrity.h |    6 +++++
 include/linux/blk-integrity.h |    5 ++++
 5 files changed, 83 insertions(+), 23 deletions(-)

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

end of thread, other threads:[~2025-11-03 13:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 14:44 make block layer auto-PI deadlock safe v2 Christoph Hellwig
2025-10-30 14:44 ` [PATCH 1/2] block: blocking mempool_alloc doesn't fail Christoph Hellwig
2025-10-30 14:44 ` [PATCH 2/2] block: make bio auto-integrity deadlock safe Christoph Hellwig
2025-11-03  3:24   ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2025-11-03 10:16 make block layer auto-PI deadlock safe v3 Christoph Hellwig
2025-11-03 10:16 ` [PATCH 2/2] block: make bio auto-integrity deadlock safe Christoph Hellwig
2025-11-03 11:15   ` Kanchan Joshi
2025-11-03 13:20   ` Anuj gupta
2025-11-03 13:40   ` Johannes Thumshirn
2025-11-03 13:45     ` hch
2025-11-03 13:47       ` Johannes Thumshirn
2025-11-03 13:49         ` hch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox