mbox series

[0/2] btrfs-progs: fixes for mkfs.btrfs on file with emulated zones

Message ID 20210922075343.1160788-1-naohiro.aota@wdc.com (mailing list archive)
Headers show
Series btrfs-progs: fixes for mkfs.btrfs on file with emulated zones | expand

Message

Naohiro Aota Sept. 22, 2021, 7:53 a.m. UTC
The following two errors occur when mkfs.btrfs is called on a regular file
with emulated zones. These patches address the errors.

ERROR: zoned: failed to read size of /home/naota/tmp/btrfs.img: Inappropriate ioctl for device

ERROR: zoned: failed to reset device '/home/naota/tmp/btrfs.img' zones: Inappropriate ioctl for device

Naohiro Aota (2):
  btrfs-progs: use btrfs_device_size() instead of
    device_get_partition_size_fd()
  btrfs-progs: do not zone reset on emulated zoned mode

 common/device-utils.c | 27 +++++++++++++++------------
 kernel-shared/zoned.c | 15 ++++++++++-----
 kernel-shared/zoned.h |  1 +
 3 files changed, 26 insertions(+), 17 deletions(-)

Comments

David Sterba Sept. 22, 2021, 7:47 p.m. UTC | #1
On Wed, Sep 22, 2021 at 04:53:41PM +0900, Naohiro Aota wrote:
> The following two errors occur when mkfs.btrfs is called on a regular file
> with emulated zones. These patches address the errors.
> 
> ERROR: zoned: failed to read size of /home/naota/tmp/btrfs.img: Inappropriate ioctl for device
> 
> ERROR: zoned: failed to reset device '/home/naota/tmp/btrfs.img' zones: Inappropriate ioctl for device
> 
> Naohiro Aota (2):
>   btrfs-progs: use btrfs_device_size() instead of
>     device_get_partition_size_fd()
>   btrfs-progs: do not zone reset on emulated zoned mode

Added to devel, thanks.