All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	dm-devel@lists.linux.dev, Mike Snitzer <snitzer@kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH v2 2/4] dm: Always split write BIOs to zoned device limits
Date: Wed, 25 Jun 2025 15:15:39 +0900	[thread overview]
Message-ID: <0e94af0a-3a85-49ba-a7fa-bbbf9f29ec51@kernel.org> (raw)
In-Reply-To: <aFuT_X8GdNwRU9AF@infradead.org>

On 6/25/25 3:15 PM, Christoph Hellwig wrote:
> On Wed, Jun 25, 2025 at 02:59:06PM +0900, Damien Le Moal wrote:
>> Any zoned DM target that requires zone append emulation will use the
>> block layer zone write plugging. In such case, DM target drivers must
>> not split BIOs using dm_accept_partial_bio() as doing so can potentially
>> lead to deadlocks with queue freeze operations. Regular write operations
>> used to emulate zone append operations also cannot be split by the
>> target driver as that would result in an invalid writen sector value
>> return using the BIO sector.
>>
>> In order for zoned DM target drivers to avoid such incorrect BIO
>> splitting, we must ensure that large BIOs are split before being passed
>> to the map() function of the target, thus guaranteeing that the
>> limits for the mapped device are not exceeded.
>>
>> dm-crypt and dm-flakey are the only target drivers supporting zoned
>> devices and using dm_accept_partial_bio().
> 
> Is there any good way to catch usage dm_accept_partial_bio on zone
> devices so that issues like this don't get reintroduced later?

patch 4 does that. Though with the heavy BUG_ON() hammer. That can be cleaned
up later though.


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2025-06-25  6:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25  5:59 [PATCH v2 0/4] Fix write operation handling for zoned DM devices Damien Le Moal
2025-06-25  5:59 ` [PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging() Damien Le Moal
2025-06-25  6:12   ` Christoph Hellwig
2025-06-25  6:14     ` Damien Le Moal
2025-06-25  6:18       ` Christoph Hellwig
2025-06-25  6:17         ` Damien Le Moal
2025-06-25  5:59 ` [PATCH v2 2/4] dm: Always split write BIOs to zoned device limits Damien Le Moal
2025-06-25  6:15   ` Christoph Hellwig
2025-06-25  6:15     ` Damien Le Moal [this message]
2025-06-25  5:59 ` [PATCH v2 3/4] dm: dm-crypt: Do not split write operations with zoned targets Damien Le Moal
2025-06-25 10:19   ` Mikulas Patocka
2025-06-25 12:54     ` Damien Le Moal
2025-06-25 14:03       ` Mikulas Patocka
2025-06-25 14:43         ` Damien Le Moal
2025-06-25 16:33           ` Mikulas Patocka
2025-06-25  5:59 ` [PATCH v2 4/4] dm: Check for forbidden splitting of zone write operations Damien Le Moal
2025-06-25  6:16   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e94af0a-3a85-49ba-a7fa-bbbf9f29ec51@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.