From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Niklas Cassel <Niklas.Cassel@wdc.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
"fio@vger.kernel.org" <fio@vger.kernel.org>,
Damien Le Moal <Damien.LeMoal@wdc.com>,
"adobriyan@gmail.com" <adobriyan@gmail.com>
Subject: Re: [PATCH 3/3] zbd: ensure that global max open zones limit is respected
Date: Fri, 25 Jun 2021 07:48:37 +0000 [thread overview]
Message-ID: <20210625074836.h5lbloofvfkap3yu@shindev> (raw)
In-Reply-To: <20210624172256.37177-4-Niklas.Cassel@wdc.com>
On Jun 24, 2021 / 17:23, Niklas Cassel wrote:
> From: Niklas Cassel <niklas.cassel@wdc.com>
>
> Commit 219c662d3b12 ("zbd: introduce per job maximum open zones limit")
> Introduced a global max open zones limit stored in zbd_info->max_open_zones.
>
> This commit also changed checks against td->o.max_open_zones in zbd_open_zone()
> with checks against zbd_info->max_open_zones.
>
> It is obvious that zbd_info->max_open_zones was intended to replace
> td->o.max_open_zones in all code that is executed after zbd_setup_files().
>
> The commit itself was needed since zbd_info is shared over different jobs,
> so it is important that the global limit of max open zones is the same,
> for different jobs targeting the same device.
>
> The problem with this commit is that in zbd_convert_to_open_zone(),
> instead of replacing td->o.max_open_zones with zbd_info->max_open_zones,
> it incorrectly just removed the references to td->o.max_open_zones.
>
> This caused commit 00ca8df5468e ("zbd: Fix max_open_zones checks")
> (written by another author) to incorrectly re-add the removed
> td->o.max_open_zones checks in zbd_convert_to_open_zone().
> The proper fix here should have been to add checks against
> zbd_info->max_open_zones instead of td->o.max_open_zones,
> just like the original author did for zbd_open_zone().
>
> Replace all td->o.max_open_zones uses past zbd_setup_files() with
> zbd_info->max_open_zones, and force set td->o.max_open_zones to
> zbd_info->max_open_zones in zbd_setup_files(), so that even if checks are
> introduced against the wrong limit, fio will still respect the global limit.
>
> Fixes: 00ca8df5468e ("zbd: Fix max_open_zones checks")
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> Cc: Alexey Dobriyan <adobriyan@gmail.com>
> Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thank you for the fix. Looks good to me.
Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
--
Best Regards,
Shin'ichiro Kawasaki
next prev parent reply other threads:[~2021-06-25 7:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 17:23 [PATCH 0/3] fix max open zones handling when using multiple jobs Niklas Cassel
2021-06-24 17:23 ` [PATCH 2/3] zbd: allow an unlimited global max open zones limit Niklas Cassel
2021-06-25 7:09 ` Damien Le Moal
2021-06-24 17:23 ` [PATCH 1/3] zbd: create a local zbdi variable for f->zbd_info Niklas Cassel
2021-06-24 20:09 ` Alexey Dobriyan
2021-06-28 10:42 ` Niklas Cassel
2021-06-25 7:07 ` Damien Le Moal
2021-06-24 17:23 ` [PATCH 3/3] zbd: ensure that global max open zones limit is respected Niklas Cassel
2021-06-25 7:11 ` Damien Le Moal
2021-06-25 7:48 ` Shinichiro Kawasaki [this message]
2021-06-29 13:44 ` [PATCH 0/3] fix max open zones handling when using multiple jobs Jens Axboe
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=20210625074836.h5lbloofvfkap3yu@shindev \
--to=shinichiro.kawasaki@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=Niklas.Cassel@wdc.com \
--cc=adobriyan@gmail.com \
--cc=axboe@kernel.dk \
--cc=fio@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