[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it
- To: Christoph Hellwig <hch@xxxxxx>, Jens Axboe <axboe@xxxxxxxxx>
- From: Anand Jain <anand.jain@xxxxxxxxxx>
- Date: Tue, 19 Apr 2022 20:02:18 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QL9zAEXce69OmwiuUcwiOZYD9isqw84nxmQFM4fYLsk=; b=V4yvdLxS4bHsn+VnzBvk17dhwQFMpw8uq9sDZdhQxTzS3weq7/TpTgRtp17CwGyHDPQDj6+7sBfJ2MrTF/BQRWUvNTg/pgtISX8qYwOphQCOUbTtE+BSWzX14NSuO9DiyQB7GujpXQOsEVOmLPGhwRczsGcDTB8rm7fSwvRXuARlf9hHXMsD0oe6b4TLxpm0M8pgyBVoRtLiRT1Y9jLMkraLXCoN3U0S83gegEcmeaqJyMxeUyXwKvZ83oV8yXKUZ9beTtyjP4zwXkKI+7dL2Dz32oHsCP0yyfIrOHI6a5qReoqDH68X29PRP5mEKDFaHKtI/tXfymUDCaxj2TVw4A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LQLrh726Iz0npUEBkcLLPHrC0r90OcTtzhkiSTw0ZRoC3P+ZvAQc+056vgrKNhHI00L6HNcAkC3e/sDNmGPvmcJGfYaHfapLG38021TnnYvsR+iDFkkyj6JndvFPGi7hdD6cUenYhbXsJdYl4AvW8yDYLToKNo/o3xVZ7tRCLWcyZzlYF4HWErjqE/JNXJlBmapL2BCAKd2O9g55Y3W/vHOF5T2UyE9LjbdTg2wsdq7g7x5YCfsRhxjucHiJ1ItLiMsQomT7Q4nYOBpiVV5hs/WGh0dk0RajlrP6w6CL/2KrSxTqS8sMB6VyyXZDTyDKiqwrSo9i9HzWs8NGjhiOVA==
- Cc: dm-devel@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ntfs3@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, Johannes Thumshirn <johannes.thumshirn@xxxxxxx>, David Sterba <dsterba@xxxxxxxx>
- Delivery-date: Tue, 19 Apr 2022 12:05:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 4/15/22 12:52, Christoph Hellwig wrote:
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
Acked-by: David Sterba <dsterba@xxxxxxxx>
LGTM.
Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
fs/btrfs/zoned.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 1b1b310c3c510..f72cad7391a11 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -350,7 +350,6 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device,
bool populate_cache)
struct btrfs_fs_info *fs_info = device->fs_info;
struct btrfs_zoned_device_info *zone_info = NULL;
struct block_device *bdev = device->bdev;
- struct request_queue *queue = bdev_get_queue(bdev);
unsigned int max_active_zones;
unsigned int nactive;
sector_t nr_sectors;
@@ -410,7 +409,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device,
bool populate_cache)
if (!IS_ALIGNED(nr_sectors, zone_sectors))
zone_info->nr_zones++;
- max_active_zones = queue_max_active_zones(queue);
+ max_active_zones = bdev_max_active_zones(bdev);
if (max_active_zones && max_active_zones < BTRFS_MIN_ACTIVE_ZONES) {
btrfs_err_in_rcu(fs_info,
"zoned: %s: max active zones %u is too small, need at least %u active zones",
|