From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@lst.de>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] zloop: explicitly mention full zone when writing to it
Date: Mon, 12 Oct 2026 15:31:27 +0200 [thread overview]
Message-ID: <ab8aa336-94ce-4c97-98b6-7d7049621f87@kernel.org> (raw)
In-Reply-To: <20261012132556.1307034-1-hch@lst.de>
On 2026/10/12 15:25, Christoph Hellwig wrote:
> Don't print the impossibly large write pointer, but directly mention
> the full zone when a write to one is received.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/block/zloop.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/zloop.c b/drivers/block/zloop.c
> index 394dc2408ed7..f8988f9b5d04 100644
> --- a/drivers/block/zloop.c
> +++ b/drivers/block/zloop.c
> @@ -603,8 +603,12 @@ static int zloop_seq_write_prep(struct zloop_cmd *cmd)
> }
> } else {
> if (cmd->sector != zone->wp) {
> - pr_err("Zone %u: unaligned write: sect %llu, wp %llu\n",
> - zone_no, cmd->sector, zone->wp);
> + if (zone->wp == ULLONG_MAX)
ULLONG_MAX is used also for reporting the write pointer of read-only and offline
zones. So maybe we should mention the condition here using blk_zone_cond_str()
instead of hard coding "full" in the message.
> + pr_err("Zone %u: write to full zone: sect %llu\n",
> + zone_no, cmd->sector);
pr_err("Zone %u: write to %s zone: sect %llu\n",
zone_no, blk_zone_cond_str(zone->cond),
cmd->sector);
> + else
> + pr_err("Zone %u: unaligned write: sect %llu, wp %llu\n",
> + zone_no, cmd->sector, zone->wp);
> ret = -EIO;
> goto out_unlock;
> }
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2026-10-12 13:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 13:25 [PATCH] zloop: explicitly mention full zone when writing to it Christoph Hellwig
2026-10-12 13:31 ` Damien Le Moal [this message]
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=ab8aa336-94ce-4c97-98b6-7d7049621f87@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox