All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: evgreen@chromium.org, asavery@chromium.org, axboe@kernel.dk,
	bvanassche@acm.org, darrick.wong@oracle.com,
	dianders@chromium.org, gwendal@chromium.org,
	linux-block@vger.kernel.org, martin.petersen@oracle.com,
	ming.lei@redhat.com, kernel@collabora.com
Subject: Re: [PATCH v8 2/2] loop: Better discard support for block devices
Date: Fri, 3 Apr 2020 12:27:26 +0200	[thread overview]
Message-ID: <49a20f42-f082-be3a-52f8-a4179ab886c0@collabora.com> (raw)
In-Reply-To: <20200403063955.GB28875@infradead.org>

Hi Christoph,

W dniu 03.04.2020 o 08:39, Christoph Hellwig pisze:
> On Thu, Apr 02, 2020 at 07:06:03PM +0200, Andrzej Pietrasiewicz wrote:
>> From: Evan Green <evgreen@chromium.org>
>>

<snip>

>> +	struct request_queue *backingq;
>> +
>> +	/*
>> +	 * If the backing device is a block device, mirror its zeroing
>> +	 * capability. Set the discard sectors to the block device's zeroing
>> +	 * capabilities because loop discards result in blkdev_issue_zeroout(),
>> +	 * not blkdev_issue_discard(). This maintains consistent behavior with
>> +	 * file-backed loop devices: discarded regions read back as zero.
>> +	 */
>> +	if (S_ISBLK(inode->i_mode) && !lo->lo_encrypt_key_size) {
>> +		backingq = bdev_get_queue(inode->i_bdev);
> 
> The backingq could move into this local scope.
> 
>> +	} else if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size) {
> 
> No need for the inner braces.
> 
> But the actual functionality looks good to me.
> 

Would you A-b or R-b if I corrected the two small issues which you found?

Andrzej

  reply	other threads:[~2020-04-03 10:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 17:06 [PATCH v8 0/2] Better discard support for block devices Andrzej Pietrasiewicz
2020-04-02 17:06 ` [PATCH v8 1/2] loop: Report EOPNOTSUPP properly Andrzej Pietrasiewicz
2020-04-03  6:38   ` Christoph Hellwig
2020-04-02 17:06 ` [PATCH v8 2/2] loop: Better discard support for block devices Andrzej Pietrasiewicz
2020-04-03  6:39   ` Christoph Hellwig
2020-04-03 10:27     ` Andrzej Pietrasiewicz [this message]
2020-04-03 11:15       ` Christoph Hellwig

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=49a20f42-f082-be3a-52f8-a4179ab886c0@collabora.com \
    --to=andrzej.p@collabora.com \
    --cc=asavery@chromium.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=darrick.wong@oracle.com \
    --cc=dianders@chromium.org \
    --cc=evgreen@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=hch@infradead.org \
    --cc=kernel@collabora.com \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@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 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.