Thread (9 messages) 9 messages, 4 authors, 2021-07-01

Re: [PATCH v2] btrfs: zoned: remove fs_info->max_zone_append_size

From: Anand Jain <hidden>
Date: 2021-06-29 09:18:48


On 29/06/2021 02:36, Johannes Thumshirn wrote:
Remove fs_info->max_zone_append_size, it doesn't serve any purpose.

Signed-off-by: Johannes Thumshirn <redacted>

  I hope the reason to remove max_zone_append_size shall go into the 
commit log.
  With that,

  Reviewed-by: Anand Jain [off-list ref]

Thanks, Anand

quoted hunk ↗ jump to hunk
---
Changes to v1:
- also remove the local max_zone_append_size variable in
   btrfs_check_zoned_mode() (Anand)
---
  fs/btrfs/ctree.h     |  2 --
  fs/btrfs/extent_io.c |  1 -
  fs/btrfs/zoned.c     | 10 ----------
  3 files changed, 13 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index d7ef4d7d2c1a..7a9cf4d12157 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1014,8 +1014,6 @@ struct btrfs_fs_info {
  		u64 zoned;
  	};
  
-	/* Max size to emit ZONE_APPEND write command */
-	u64 max_zone_append_size;
  	struct mutex zoned_meta_io_lock;
  	spinlock_t treelog_bg_lock;
  	u64 treelog_bg;
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 9e81d25dea70..1f947e24091a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3266,7 +3266,6 @@ static int calc_bio_boundaries(struct btrfs_bio_ctrl *bio_ctrl,
  		return 0;
  	}
  
-	ASSERT(fs_info->max_zone_append_size > 0);
  	/* Ordered extent not yet created, so we're good */
  	ordered = btrfs_lookup_ordered_extent(inode, logical);
  	if (!ordered) {
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 297c0b1c0634..76754e441e20 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -529,7 +529,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
  	u64 zoned_devices = 0;
  	u64 nr_devices = 0;
  	u64 zone_size = 0;
-	u64 max_zone_append_size = 0;
  	const bool incompat_zoned = btrfs_fs_incompat(fs_info, ZONED);
  	int ret = 0;
  
@@ -565,11 +564,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
  				ret = -EINVAL;
  				goto out;
  			}
-			if (!max_zone_append_size ||
-			    (zone_info->max_zone_append_size &&
-			     zone_info->max_zone_append_size < max_zone_append_size))
-				max_zone_append_size =
-					zone_info->max_zone_append_size;
  		}
  		nr_devices++;
  	}
@@ -619,7 +613,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
  	}
  
  	fs_info->zone_size = zone_size;
-	fs_info->max_zone_append_size = max_zone_append_size;
  	fs_info->fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_ZONED;
  
  	/*
@@ -1318,9 +1311,6 @@ bool btrfs_use_zone_append(struct btrfs_inode *inode, u64 start)
  	if (!btrfs_is_zoned(fs_info))
  		return false;
  
-	if (!fs_info->max_zone_append_size)
-		return false;
-
  	if (!is_data_inode(&inode->vfs_inode))
  		return false;
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help