diff mbox series

[v3] btrfs: zoned: revert "btrfs: zoned: fail mount if the device does not support zone append"

Message ID 2069666c4c5f68fafe0cfefdbc880fa6b4969217.1625225912.git.johannes.thumshirn@wdc.com (mailing list archive)
State New, archived
Headers show
Series [v3] btrfs: zoned: revert "btrfs: zoned: fail mount if the device does not support zone append" | expand

Commit Message

Johannes Thumshirn July 2, 2021, 11:38 a.m. UTC
Now that commit f34ee1dce642 ("dm crypt: Fix zoned block device support")
is merged in master, the device-mapper code can fully emulate zone append.
So there's no need for this check anymore.

This reverts commit 1d68128c107a ("btrfs: zoned: fail mount if the device
does not support zone append").

Cc: Naohiro  Aota <naohiro.aota@wdc.com>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/zoned.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Neal Gompa July 2, 2021, 12:50 p.m. UTC | #1
On Fri, Jul 2, 2021 at 7:40 AM Johannes Thumshirn
<johannes.thumshirn@wdc.com> wrote:
>
> Now that commit f34ee1dce642 ("dm crypt: Fix zoned block device support")
> is merged in master, the device-mapper code can fully emulate zone append.
> So there's no need for this check anymore.
>
> This reverts commit 1d68128c107a ("btrfs: zoned: fail mount if the device
> does not support zone append").
>
> Cc: Naohiro  Aota <naohiro.aota@wdc.com>
> Cc: Damien Le Moal <damien.lemoal@wdc.com>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  fs/btrfs/zoned.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index 297c0b1c0634..e4087a2364a2 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -354,13 +354,6 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)
>         if (!IS_ALIGNED(nr_sectors, zone_sectors))
>                 zone_info->nr_zones++;
>
> -       if (bdev_is_zoned(bdev) && zone_info->max_zone_append_size == 0) {
> -               btrfs_err(fs_info, "zoned: device %pg does not support zone append",
> -                         bdev);
> -               ret = -EINVAL;
> -               goto out;
> -       }
> -
>         zone_info->seq_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL);
>         if (!zone_info->seq_zones) {
>                 ret = -ENOMEM;
> --
> 2.31.1
>

Looks good to me.

Reviewed-by: Neal Gompa <ngompa@fedoraproject.org>
David Sterba July 2, 2021, 1:11 p.m. UTC | #2
On Fri, Jul 02, 2021 at 08:38:51PM +0900, Johannes Thumshirn wrote:
> Now that commit f34ee1dce642 ("dm crypt: Fix zoned block device support")
> is merged in master, the device-mapper code can fully emulate zone append.
> So there's no need for this check anymore.
> 
> This reverts commit 1d68128c107a ("btrfs: zoned: fail mount if the device
> does not support zone append").
> 
> Cc: Naohiro  Aota <naohiro.aota@wdc.com>
> Cc: Damien Le Moal <damien.lemoal@wdc.com>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  fs/btrfs/zoned.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index 297c0b1c0634..e4087a2364a2 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -354,13 +354,6 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)
>  	if (!IS_ALIGNED(nr_sectors, zone_sectors))
>  		zone_info->nr_zones++;
>  
> -	if (bdev_is_zoned(bdev) && zone_info->max_zone_append_size == 0) {

As it's using the max_zone_append_size it got removed as part of the
other patch "btrfs: zoned: remove max_zone_append_size logic".

This is a cleanup patch and I was not not considering it for 5.14 at the
moment but if this dm-crypt workaround gets removed I'll probably do
that.
Anand Jain July 2, 2021, 3:33 p.m. UTC | #3
On 2/7/21 7:38 pm, Johannes Thumshirn wrote:
> Now that commit f34ee1dce642 ("dm crypt: Fix zoned block device support")
> is merged in master, the device-mapper code can fully emulate zone append.
> So there's no need for this check anymore.
> 
> This reverts commit 1d68128c107a ("btrfs: zoned: fail mount if the device
> does not support zone append").
> 
> Cc: Naohiro  Aota <naohiro.aota@wdc.com>
> Cc: Damien Le Moal <damien.lemoal@wdc.com>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>


So now zone_info::max_zone_append_size should get removed as part of the 
other patch - [PATCH v2] btrfs: zoned: remove fs_info->max_zone_append_size

Thanks, Anand

> ---
>   fs/btrfs/zoned.c | 7 -------
>   1 file changed, 7 deletions(-)
> 
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index 297c0b1c0634..e4087a2364a2 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -354,13 +354,6 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)
>   	if (!IS_ALIGNED(nr_sectors, zone_sectors))
>   		zone_info->nr_zones++;
>   
> -	if (bdev_is_zoned(bdev) && zone_info->max_zone_append_size == 0) {
> -		btrfs_err(fs_info, "zoned: device %pg does not support zone append",
> -			  bdev);
> -		ret = -EINVAL;
> -		goto out;
> -	}
> -
>   	zone_info->seq_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL);
>   	if (!zone_info->seq_zones) {
>   		ret = -ENOMEM;
>
diff mbox series

Patch

diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 297c0b1c0634..e4087a2364a2 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -354,13 +354,6 @@  int btrfs_get_dev_zone_info(struct btrfs_device *device)
 	if (!IS_ALIGNED(nr_sectors, zone_sectors))
 		zone_info->nr_zones++;
 
-	if (bdev_is_zoned(bdev) && zone_info->max_zone_append_size == 0) {
-		btrfs_err(fs_info, "zoned: device %pg does not support zone append",
-			  bdev);
-		ret = -EINVAL;
-		goto out;
-	}
-
 	zone_info->seq_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL);
 	if (!zone_info->seq_zones) {
 		ret = -ENOMEM;