All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: "plabat@micron.com" <plabat@micron.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: [PATCH] Allow sequential read to start anywhere in a zone (option offset), and have a span smaller than a zone (option size).
Date: Mon, 18 May 2020 00:15:53 +0000	[thread overview]
Message-ID: <BY5PR04MB69004B760F239479906D3367E7B80@BY5PR04MB6900.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200515162213.1035-1-plabat@micron.com

On 2020/05/16 1:22, plabat@micron.com wrote:
> From: Pierre Labat <plabat@micron.com>
> 
> Allow sequential read to start anywhere in a zone (option
> offset), and have a span smaller than a zone (option size).>
> A use case is a Key Value Store reading a set of keys or values
> starting somewhere in a zone.
> 
> Signed-off-by: Pierre Labat <plabat@micron.com>

This looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

> ---
>  zbd.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/zbd.c b/zbd.c
> index 8dc3c39..f1f7c5c 100644
> --- a/zbd.c
> +++ b/zbd.c
> @@ -262,7 +262,8 @@ static bool zbd_verify_sizes(void)
>  
>  			zone_idx = zbd_zone_idx(f, f->file_offset);
>  			z = &f->zbd_info->zone_info[zone_idx];
> -			if (f->file_offset != z->start) {
> +			if ((f->file_offset != z->start) &&
> +			    (td->o.td_ddir != TD_DDIR_READ)) {
>  				new_offset = (z+1)->start;
>  				if (new_offset >= f->file_offset + f->io_size) {
>  					log_info("%s: io_size must be at least one zone\n",
> @@ -278,7 +279,8 @@ static bool zbd_verify_sizes(void)
>  			zone_idx = zbd_zone_idx(f, f->file_offset + f->io_size);
>  			z = &f->zbd_info->zone_info[zone_idx];
>  			new_end = z->start;
> -			if (f->file_offset + f->io_size != new_end) {
> +			if ((td->o.td_ddir != TD_DDIR_READ) &&
> +			    (f->file_offset + f->io_size != new_end)) {
>  				if (new_end <= f->file_offset) {
>  					log_info("%s: io_size must be at least one zone\n",
>  						 f->file_name);
> 


-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2020-05-18  0:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 16:22 [PATCH] Allow sequential read to start anywhere in a zone (option offset), and have a span smaller than a zone (option size) plabat
2020-05-18  0:15 ` Damien Le Moal [this message]
2020-05-18 22:56 ` 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=BY5PR04MB69004B760F239479906D3367E7B80@BY5PR04MB6900.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=plabat@micron.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.