From: Damien Le Moal <dlemoal@kernel.org>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Vincent Fu <vincentfu@gmail.com>
Subject: Re: [PATCH v2 4/8] zbd: introduce zbd_move_zone_wp()
Date: Wed, 7 May 2025 16:43:13 +0900 [thread overview]
Message-ID: <1e2607ab-b6af-4dc9-9e77-111de64f98cf@kernel.org> (raw)
In-Reply-To: <20250425052148.126788-5-shinichiro.kawasaki@wdc.com>
On 4/25/25 2:21 PM, Shin'ichiro Kawasaki wrote:
> As a preparation for continue_on_error option support for zonemode=zbd,
> introduce the function zbd_move_zone_wp(). It moves write pointers by
> calling blkzoned_move_zone_wp() or move_zone_wp() callback of IO
> engines.
>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Looks good. One nit below.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> +static int zbd_move_zone_wp(struct thread_data *td, struct fio_file *f,
> + struct zbd_zone *z, uint64_t length,
> + const char *buf)
> +{
> + int ret = 0;
> +
> + switch (f->zbd_info->model) {
> + case ZBD_HOST_AWARE:
> + case ZBD_HOST_MANAGED:
> + if (td->io_ops && td->io_ops->move_zone_wp)
> + ret = td->io_ops->move_zone_wp(td, f, z, length, buf);
> + else
> + ret = blkzoned_move_zone_wp(td, f, z, length, buf);
> + break;
> + default:
> + break;
Nit: You can do "return 0;" here and remove the ret variable initialization on
declaration.
> + }
> +
> + if (ret < 0) {
> + td_verror(td, errno, "move wp failed");
> + log_err("%s: moving wp for %"PRIu64" sectors at sector %"PRIu64" failed (%d).\n",
> + f->file_name, length >> 9, z->wp >> 9, errno);
> + }
> +
> + return ret;
> +}
> +
> /**
> * zbd_get_max_open_zones - Get the maximum number of open zones
> * @td: FIO thread data
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-05-07 7:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 5:21 [PATCH v2 0/8] zbd: support continue_on_error for zonemode=zbd Shin'ichiro Kawasaki
2025-04-25 5:21 ` [PATCH v2 1/8] oslib: blkzoned: add blkzoned_move_zone_wp() helper function Shin'ichiro Kawasaki
2025-05-07 7:35 ` Damien Le Moal
2025-04-25 5:21 ` [PATCH v2 2/8] ioengine: add move_zone_wp() callback Shin'ichiro Kawasaki
2025-05-07 7:36 ` Damien Le Moal
2025-04-25 5:21 ` [PATCH v2 3/8] engines/libzbc: implement move_zone_wp callback Shin'ichiro Kawasaki
2025-05-07 7:41 ` Damien Le Moal
2025-04-25 5:21 ` [PATCH v2 4/8] zbd: introduce zbd_move_zone_wp() Shin'ichiro Kawasaki
2025-05-07 7:43 ` Damien Le Moal [this message]
2025-04-25 5:21 ` [PATCH v2 5/8] zbd: add the recover_zbd_write_error option Shin'ichiro Kawasaki
2025-05-07 7:48 ` Damien Le Moal
2025-04-25 5:21 ` [PATCH v2 6/8] t/zbd: set badblocks related parameters in run-tests-against-nullb Shin'ichiro Kawasaki
2025-04-25 5:21 ` [PATCH v2 7/8] t/zbd: add the test cases to confirm continue_on_error option Shin'ichiro Kawasaki
2025-04-25 5:21 ` [PATCH v2 8/8] t/zbd: add run-tests-against-scsi_debug Shin'ichiro Kawasaki
2025-05-07 11:29 ` [PATCH v2 0/8] zbd: support continue_on_error for zonemode=zbd Jens Axboe
2025-05-07 17:19 ` Vincent Fu
2025-05-07 17:22 ` Jens Axboe
2025-05-08 1:28 ` Shinichiro Kawasaki
2025-05-08 17:18 ` Vincent Fu
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=1e2607ab-b6af-4dc9-9e77-111de64f98cf@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=vincentfu@gmail.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