public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Niklas Cassel <Niklas.Cassel@wdc.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2] scsi: scsi_debug: fix zone transition to full condition
Date: Wed, 8 Jun 2022 19:52:33 +0200	[thread overview]
Message-ID: <01ac6434-3b06-5e9d-3036-660785752741@interlog.com> (raw)
In-Reply-To: <YqAA5ywNC4kdRWXz@x1-carbon>

On 2022-06-08 03:52, Niklas Cassel wrote:
> On Wed, Jun 08, 2022 at 10:13:02AM +0900, Damien Le Moal wrote:
>> When a write command to a sequential write required or sequential write
>> preferred zone result in the zone write pointer reaching the end of the
>> zone, the zone condition must be set to full AND the number of
>> implicitly or explicitly open zones updated to have a correct accounting
>> for zone resources. However, the function zbc_inc_wp() only sets the
>> zone condition to full without updating the open zone counters,
>> resulting in a zone state machine breakage.
>>
>> Introduce the helper function zbc_set_zone_full() and use it in
>> zbc_inc_wp() to correctly transition zones to the full condition.
>>
>> Fixes: 0d1cf9378bd4 ("scsi: scsi_debug: Add ZBC zone commands")
>> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
>> ---
>> Changes from v1:
>> * Simplify the patch to not modify the zbc_finish_zone() function and
>>    not use the CLOSED zone condition as an intermediate state in
>>    zbc_set_zone_full(). Cleanups to remove the use of the closed
>>    condition as an intermediate state will be sent later.
>>
>>   drivers/scsi/scsi_debug.c | 22 ++++++++++++++++++++--
>>   1 file changed, 20 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>

Acked-by: Douglas Gilbert <dgilbert@interlog.com>

  reply	other threads:[~2022-06-08 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08  1:13 [PATCH v2] scsi: scsi_debug: fix zone transition to full condition Damien Le Moal
2022-06-08  1:52 ` Niklas Cassel
2022-06-08 17:52   ` Douglas Gilbert [this message]
2022-06-10 16:51 ` Martin K. Petersen
2022-06-12 22:51   ` Damien Le Moal
2022-06-10 17:44 ` Martin K. Petersen

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=01ac6434-3b06-5e9d-3036-660785752741@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=Niklas.Cassel@wdc.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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