[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e3081f5-9462-c6e8-2ab9-524dc3d0304c@virtuozzo.com>
Date: Thu, 13 Feb 2020 23:07:13 +0300
From: Kirill Tkhai <ktkhai@...tuozzo.com>
To: "Darrick J. Wong" <darrick.wong@...cle.com>
Cc: martin.petersen@...cle.com, bob.liu@...cle.com, axboe@...nel.dk,
agk@...hat.com, snitzer@...hat.com, dm-devel@...hat.com,
song@...nel.org, tytso@....edu, adilger.kernel@...ger.ca,
Chaitanya.Kulkarni@....com, 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,
bvanassche@....org, dhowells@...hat.com, asml.silence@...il.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 6/6] loop: Add support for REQ_ALLOCATE
On 13.02.2020 21:11, Darrick J. Wong wrote:
> On Thu, Feb 13, 2020 at 10:39:35AM +0300, Kirill Tkhai wrote:
>> Support for new modifier of REQ_OP_WRITE_ZEROES command.
>> This results in allocation extents in backing file instead
>> of actual blocks zeroing.
>>
>> Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
>> Reviewed-by: Bob Liu <bob.liu@...cle.com>
>> Reviewed-by: Darrick J. Wong <darrick.wong@...cle.com>
>> ---
>> drivers/block/loop.c | 20 +++++++++++++-------
>> 1 file changed, 13 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
>> index 739b372a5112..0704167a5aaa 100644
>> --- a/drivers/block/loop.c
>> +++ b/drivers/block/loop.c
>> @@ -581,6 +581,16 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
>> return 0;
>> }
>>
>
> Urgh, I meant "copy the comment directly to here", e.g.
>
> /*
> * Convert REQ_OP_WRITE_ZEROES modifiers into fallocate mode
> *
> * If the caller requires allocation, select that mode. If the caller
> * doesn't want deallocation, call zeroout to write zeroes the range.
> * Otherwise, punch out the blocks.
> */
>
> The goal here is to reinforce the notion that FL_ZERO_RANGE is how we
> achieve nounmap zeroing...
The function is pretty small, and its meaning is easily seen from the name
and description.
I don't think we have to retell every function code line in a separate
sentence, since this distract the attention from really difficult places,
which are really need it.
Kirill
Powered by blists - more mailing lists