[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1o8vg2bl2.fsf@oracle.com>
Date: Mon, 06 Jan 2020 22:24:09 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>, axboe@...nel.dk,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-ext4@...r.kernel.org, tytso@....edu,
adilger.kernel@...ger.ca, ming.lei@...hat.com, osandov@...com,
jthumshirn@...e.de, minwoo.im.dev@...il.com, damien.lemoal@....com,
andrea.parri@...rulasolutions.com, hare@...e.com, tj@...nel.org,
ajay.joshi@....com, sagi@...mberg.me, dsterba@...e.com,
chaitanya.kulkarni@....com, bvanassche@....org,
dhowells@...hat.com, asml.silence@...il.com
Subject: Re: [PATCH RFC 1/3] block: Add support for REQ_OP_ASSIGN_RANGE operation
Kirill,
Sorry, the holiday break got in the way.
> But I also worry about NOFALLBACK case. There are possible block
> devices, which support write zeroes, but they can't allocate blocks
> (block allocation are just not appliable for them, say, these are all
> ordinary hdd).
Correct. We shouldn't go down this path unless a device is thinly
provisioned (i.e. max_discard_sectors > 0).
> But won't it be a good thing to return EOPNOTSUPP right from
> __blkdev_issue_write_zeroes() in case of block device can't allocate
> blocks (q->limits.write_zeroes_can_allocate in the patch below)? Here
> is just a way to underline block devices, which support write zeroes,
> but allocation of blocks is meant nothing for them (wasting of time).
I don't like "write_zeroes_can_allocate" because that makes assumptions
about WRITE ZEROES being the command of choice. I suggest we call it
"max_allocate_sectors" to mirror "max_discard_sectors". I.e. put
emphasis on the semantic operation and not the plumbing.
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists