linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH v4 04/11] dm: Fix dm_accept_partial_bio()
Date: Tue, 25 May 2021 09:12:33 +0100	[thread overview]
Message-ID: <YKyxcW3hBFbzMALV@infradead.org> (raw)
In-Reply-To: <20210525022539.119661-5-damien.lemoal@wdc.com>

On Tue, May 25, 2021 at 11:25:32AM +0900, Damien Le Moal wrote:
> Fix dm_accept_partial_bio() to actually check that zone management
> commands are not passed as explained in the function documentation
> comment. Also, since a zone append operation cannot be split, add
> REQ_OP_ZONE_APPEND as a forbidden command.
> 
> White lines are added around the group of BUG_ON() calls to make the
> code more legible.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/md/dm.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index ca2aedd8ee7d..a9211575bfed 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -1237,8 +1237,9 @@ static int dm_dax_zero_page_range(struct dax_device *dax_dev, pgoff_t pgoff,
>  
>  /*
>   * A target may call dm_accept_partial_bio only from the map routine.  It is
> - * allowed for all bio types except REQ_PREFLUSH, REQ_OP_ZONE_RESET,
> - * REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH.
> + * allowed for all bio types except REQ_PREFLUSH, zone management operations
> + * (REQ_OP_ZONE_RESET, REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and
> + * REQ_OP_ZONE_FINISH) and zone append writes.

Maybe shorten the REQ_OP_ZONE_* list to just say REQ_OP_ZONE_* ?


  reply	other threads:[~2021-05-25  8:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  2:25 [PATCH v4 00/11] dm: Improve zoned block device support Damien Le Moal
2021-05-25  2:25 ` [PATCH v4 01/11] block: improve handling of all zones reset operation Damien Le Moal
2021-05-25  6:15   ` Chaitanya Kulkarni
2021-05-25  6:15   ` Chaitanya Kulkarni
2021-05-25  6:35     ` Damien Le Moal
2021-05-25 19:09   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 02/11] block: introduce bio zone helpers Damien Le Moal
2021-05-25  8:08   ` Christoph Hellwig
2021-05-25 19:09   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 03/11] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Damien Le Moal
2021-05-25 19:09   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 04/11] dm: Fix dm_accept_partial_bio() Damien Le Moal
2021-05-25  8:12   ` Christoph Hellwig [this message]
2021-05-25 19:10   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 05/11] dm: cleanup device_area_is_invalid() Damien Le Moal
2021-05-25  8:13   ` Christoph Hellwig
2021-05-25 19:10   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 06/11] dm: move zone related code to dm-zone.c Damien Le Moal
2021-05-25 19:10   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 07/11] dm: Introduce dm_report_zones() Damien Le Moal
2021-05-25 19:11   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 08/11] dm: Forbid requeue of writes to zones Damien Le Moal
2021-05-25 19:13   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 09/11] dm: rearrange core declarations Damien Le Moal
2021-05-25 19:17   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 10/11] dm: introduce zone append emulation Damien Le Moal
2021-05-25 19:40   ` Himanshu Madhani
2021-05-25  2:25 ` [PATCH v4 11/11] dm crypt: Fix zoned block device support Damien Le Moal
2021-05-25 19:44   ` Himanshu Madhani

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=YKyxcW3hBFbzMALV@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=snitzer@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).