btrfs-progs: replace: BTRFS_DEV_REPLACE_ITEM_STATE_x defines should go
diff mbox series

Message ID 20190808043244.1256-1-anand.jain@oracle.com
State New
Headers show
Series
  • btrfs-progs: replace: BTRFS_DEV_REPLACE_ITEM_STATE_x defines should go
Related show

Commit Message

Anand Jain Aug. 8, 2019, 4:32 a.m. UTC
The BTRFS_DEV_REPLACE_ITEM_STATE_x series defines as shown in [1] are
unused in both kernel and btrfs-progs.

[1]
btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED        2
btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED        3
btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED       4

Further the BTRFS_DEV_REPLACE_ITEM_STATE_x values are different form its
counterpart BTRFS_IOCTL_DEV_REPLACE_STATE_x series as shown in [2].

[2]
btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED   2
btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED    3
btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED    4

So this patch deletes the BTRFS_DEV_REPLACE_ITEM_STATE_x altogether.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 libbtrfsutil/btrfs_tree.h | 5 -----
 1 file changed, 5 deletions(-)

Comments

David Sterba Aug. 19, 2019, 4:50 p.m. UTC | #1
On Thu, Aug 08, 2019 at 12:32:43PM +0800, Anand Jain wrote:
> The BTRFS_DEV_REPLACE_ITEM_STATE_x series defines as shown in [1] are
> unused in both kernel and btrfs-progs.
> 
> [1]
> btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED        2
> btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED        3
> btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED       4
> 
> Further the BTRFS_DEV_REPLACE_ITEM_STATE_x values are different form its
> counterpart BTRFS_IOCTL_DEV_REPLACE_STATE_x series as shown in [2].
> 
> [2]
> btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED   2
> btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED    3
> btrfs_tree.h:#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED    4
> 
> So this patch deletes the BTRFS_DEV_REPLACE_ITEM_STATE_x altogether.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Applied, thanks. Please note that in this case the subject prefix should
be "libbtrfsutil: ", not "btrfs-progs: ".

Patch
diff mbox series

diff --git a/libbtrfsutil/btrfs_tree.h b/libbtrfsutil/btrfs_tree.h
index 2af7205cc645..8ea3e31d9b96 100644
--- a/libbtrfsutil/btrfs_tree.h
+++ b/libbtrfsutil/btrfs_tree.h
@@ -800,11 +800,6 @@  struct btrfs_dev_stats_item {
 
 #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS	0
 #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID	1
-#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED	0
-#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED		1
-#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED		2
-#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED		3
-#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED		4
 
 struct btrfs_dev_replace_item {
 	/*