All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	axboe@kernel.dk, tytso@mit.edu, adilger.kernel@dilger.ca,
	Chaitanya.Kulkarni@wdc.com, darrick.wong@oracle.com,
	ming.lei@redhat.com, osandov@fb.com, jthumshirn@suse.de,
	minwoo.im.dev@gmail.com, damien.lemoal@wdc.com,
	andrea.parri@amarulasolutions.com, hare@suse.com, tj@kernel.org,
	ajay.joshi@wdc.com, sagi@grimberg.me, dsterba@suse.com,
	bvanassche@acm.org, dhowells@redhat.com, asml.silence@gmail.com
Subject: Re: [PATCH block v2 2/3] block: Add support for REQ_NOZERO flag
Date: Tue, 21 Jan 2020 12:47:09 +0300	[thread overview]
Message-ID: <3791a7fa-ea0c-d8ea-4b41-c968454b3787@virtuozzo.com> (raw)
In-Reply-To: <yq14kwpibf6.fsf@oracle.com>

On 21.01.2020 09:14, Martin K. Petersen wrote:
> 
> Kirill,
> 
>> +	if (flags & BLKDEV_ZERO_NOUNMAP)
>> +		req_flags |= REQ_NOUNMAP;
>> +	if (flags & BLKDEV_ZERO_ALLOCATE)
>> +		req_flags |= REQ_NOZERO|REQ_NOUNMAP;
> 
> I find there is some dissonance between using BLKDEV_ZERO_ALLOCATE to
> describe this operation in one case and REQ_NOZERO in the other.
> 
> I understand why not zeroing is important in your case. However, I think
> the allocation aspect is semantically more important. Also, in the case
> of SCSI, the allocated blocks will typically appear zeroed. So from that
> perspective REQ_NOZERO doesn't really make sense. I would really prefer
> to use REQ_ALLOCATE to describe this operation. I agree that "do not
> write every block" is important too. I just don't have a good suggestion
> for how to express that as an additional qualifier to REQ_ALLOCATE_?.

No problem, I'll rename the modifier.

> Also, adding to the confusion: In the context of SCSI, ANCHOR requires
> UNMAP. So my head hurts a bit when I read REQ_NOZERO|REQ_NOUNMAP and
> have to translate that into ANCHOR|UNMAP.
> 
> Longer term, I think we should consider introducing REQ_OP_SINGLE_RANGE
> or something like that as an umbrella operation that can be used to
> describe zeroing, allocating, and other things that operate on a single
> LBA range with no payload. Thus removing both the writiness and the
> zeroness from the existing REQ_OP_WRITE_ZEROES conduit.
> 
> Naming issues aside, your patch looks fine. I'll try to rebase my SCSI
> patches on top of your series to see how things fit.

Ok, thanks.

  reply	other threads:[~2020-01-21  9:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 12:35 [PATCH block v2 0/3] block: Introduce REQ_NOZERO flag for REQ_OP_WRITE_ZEROES operation Kirill Tkhai
2020-01-16 12:35 ` [PATCH block v2 1/3] block: Add @flags argument to bdev_write_zeroes_sectors() Kirill Tkhai
2020-01-19  1:46   ` Bob Liu
2020-01-20 11:11     ` Kirill Tkhai
2020-01-21  5:45   ` Martin K. Petersen
2020-01-16 12:36 ` [PATCH block v2 2/3] block: Add support for REQ_NOZERO flag Kirill Tkhai
2020-01-19  1:50   ` Bob Liu
2020-01-20 10:02     ` Kirill Tkhai
2020-01-21  6:13       ` Bob Liu
2020-01-21  9:45         ` Kirill Tkhai
2020-01-21  6:14   ` Martin K. Petersen
2020-01-21  9:47     ` Kirill Tkhai [this message]
2020-01-31  6:23     ` Christoph Hellwig
2020-01-31  9:15       ` Kirill Tkhai
2020-01-16 12:36 ` [PATCH block v2 3/3] loop: Add support for REQ_NOZERO Kirill Tkhai

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=3791a7fa-ea0c-d8ea-4b41-c968454b3787@virtuozzo.com \
    --to=ktkhai@virtuozzo.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=ajay.joshi@wdc.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@wdc.com \
    --cc=darrick.wong@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=dsterba@suse.com \
    --cc=hare@suse.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=minwoo.im.dev@gmail.com \
    --cc=osandov@fb.com \
    --cc=sagi@grimberg.me \
    --cc=tj@kernel.org \
    --cc=tytso@mit.edu \
    /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.