[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKFNMokGOma3pvHdEsnsjuKgW+jpYX9zx8fWwJWyeKuCpKz-YQ@mail.gmail.com>
Date: Thu, 7 Apr 2022 02:28:15 +0900
From: Ryusuke Konishi <konishi.ryusuke@...il.com>
To: Christoph Hellwig <hch@....de>
Cc: Andreas Gruenbacher <agruenba@...hat.com>,
Jens Axboe <axboe@...nel.dk>,
device-mapper development <dm-devel@...hat.com>,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-um@...ts.infradead.org, linux-block@...r.kernel.org,
drbd-dev@...ts.linbit.com, nbd@...er.debian.org,
ceph-devel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
xen-devel@...ts.xenproject.org, linux-bcache@...r.kernel.org,
linux-raid@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-nvme@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-scsi@...r.kernel.org,
target-devel@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
cluster-devel@...hat.com, jfs-discussion@...ts.sourceforge.net,
linux-nilfs <linux-nilfs@...r.kernel.org>, ntfs3@...ts.linux.dev,
ocfs2-devel@....oracle.com, Linux MM <linux-mm@...ck.org>
Subject: Re: [PATCH 23/27] block: add a bdev_max_discard_sectors helper
On Wed, Apr 6, 2022 at 11:05 PM Christoph Hellwig <hch@....de> wrote:
>
> Add a helper to query the number of sectors support per each discard bio
> based on the block device and use this helper to stop various places from
> poking into the request_queue to see if discard is supported and if so how
> much. This mirrors what is done e.g. for write zeroes as well.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
...
> diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
> index 16e775bcf4a7c..7d510e4231713 100644
> --- a/drivers/target/target_core_device.c
> +++ b/drivers/target/target_core_device.c
> @@ -829,9 +829,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
> }
>
> /*
> - * Check if the underlying struct block_device request_queue supports
> - * the QUEUE_FLAG_DISCARD bit for UNMAP/WRITE_SAME in SCSI + TRIM
> - * in ATA and we need to set TPE=1
> + * Check if the underlying struct block_device request_queue supports disard.
> */
Here was a typo:
s/disard/discard/
On Thu, Apr 7, 2022 at 12:19 AM Andreas Gruenbacher <agruenba@...hat.com> wrote:
> If I'm misreading things, could you please document that
> bdev_max_discard_sectors() != 0 implies that discard is supported?
I got the same impression. Checking the discard support with
bdev_max_discard_sectors() != 0 seems a bit unclear than before.
Thanks,
Ryusuke Konishi
Powered by blists - more mailing lists