From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Niklas Cassel <Niklas.Cassel@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] scsi: sd_zbc: Simplify zone full condition check
Date: Thu, 2 Dec 2021 08:51:54 +0900 [thread overview]
Message-ID: <98db1d5d-2b19-6bd9-01fd-2f5cb462d0d3@opensource.wdc.com> (raw)
In-Reply-To: <20211201142821.64650-1-Niklas.Cassel@wdc.com>
On 2021/12/01 23:28, Niklas Cassel wrote:
> From: Niklas Cassel <niklas.cassel@wdc.com>
>
> According to the ZBC (and ZAC) specification, a zone that has Zone Type set
> to Conventional, must also have its Zone Condition set to
> "Not Write Pointer".
>
> Therefore, a conventional zone will never have Zone Condition set to
> "Full", which means that we can omit the non-conventional prerequisite from
> the zone full condition check.
>
> Suggested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> ---
> Changes since v2:
> - New patch in series, as suggested by Damien.
>
> drivers/scsi/sd_zbc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
> index ed06798983f8..749c5e5a70c7 100644
> --- a/drivers/scsi/sd_zbc.c
> +++ b/drivers/scsi/sd_zbc.c
> @@ -62,8 +62,7 @@ static int sd_zbc_parse_report(struct scsi_disk *sdkp, u8 *buf,
> zone.capacity = zone.len;
> zone.start = logical_to_sectors(sdp, get_unaligned_be64(&buf[16]));
> zone.wp = logical_to_sectors(sdp, get_unaligned_be64(&buf[24]));
> - if (zone.type != ZBC_ZONE_TYPE_CONV &&
> - zone.cond == ZBC_ZONE_COND_FULL)
> + if (zone.cond == ZBC_ZONE_COND_FULL)
> zone.wp = zone.start + zone.len;
>
> ret = cb(&zone, idx, data);
>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2021-12-02 0:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 14:28 [PATCH v3 1/2] scsi: sd_zbc: Simplify zone full condition check Niklas Cassel
2021-12-01 14:28 ` [PATCH v3 2/2] scsi: sd_zbc: Clean up sd_zbc_parse_report() setting of wp Niklas Cassel
2021-12-01 23:51 ` Damien Le Moal [this message]
2021-12-02 7:22 ` [PATCH v3 1/2] scsi: sd_zbc: Simplify zone full condition check Johannes Thumshirn
2021-12-03 2:54 ` Martin K. Petersen
2021-12-07 3:46 ` 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=98db1d5d-2b19-6bd9-01fd-2f5cb462d0d3@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=Niklas.Cassel@wdc.com \
--cc=jejb@linux.ibm.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