From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH 4/4] block: Generically handle report zones buffer
Date: Thu, 24 Oct 2019 00:13:37 -0700 [thread overview]
Message-ID: <20191024071337.GC19572@infradead.org> (raw)
In-Reply-To: <20191024065006.8684-5-damien.lemoal@wdc.com>
On Thu, Oct 24, 2019 at 03:50:06PM +0900, Damien Le Moal wrote:
> Instead of relying on a zoned block device driver to allocate a buffer
> for every execution of a report zones command execution, rely on the
> block layer use of the device zone report queue limits to allocate a
> buffer and keep it around when the device report_zones method is
> executed in a loop, e.g. as in blk_revalidate_disk_zones().
>
> This simplifies the code in the scsi sd_zbc driver as well as simplify
> the addition of zone supports for upcoming new zoned device drivers.
I wonder if we could just do away with the separate buffer entirely.
As the SCSI zone size (and also ATA even if we don't directly talk
to that) are intentionally the same size as the blk_zone (and the
same true is for the only upcoming standard I know of) we can just
rewrite each entry in-place(-ish) by reusing the same allocation.
Depending on the detailed formate we have to copy a field our two
onto the stack first, but it both avoids the extra allocation, and
the whole queue limits infrastructure in the previous patch and
should simply the code a lot.
prev parent reply other threads:[~2019-10-24 7:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 6:50 [PATCH 0/4] zoned block device report zones enhancements Damien Le Moal
2019-10-24 6:50 ` [PATCH 1/4] block: Enhance blk_revalidate_disk_zones() Damien Le Moal
2019-10-24 7:08 ` Christoph Hellwig
2019-10-25 5:15 ` Damien Le Moal
2019-10-24 7:20 ` Keith Busch
2019-10-24 6:50 ` [PATCH 2/4] block: Simplify report zones execution Damien Le Moal
2019-10-24 7:10 ` Christoph Hellwig
2019-10-25 5:17 ` Javier González
2019-10-24 6:50 ` [PATCH 3/4] block: Introduce report zones queue limits Damien Le Moal
2019-10-24 6:50 ` [PATCH 4/4] block: Generically handle report zones buffer Damien Le Moal
2019-10-24 7:13 ` Christoph Hellwig [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=20191024071337.GC19572@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=dm-devel@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=snitzer@redhat.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;
as well as URLs for NNTP newsgroup(s).