Skip to content

Switch defines to enums

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9btrfs: switch BTRFS_FS_STATE_* to enumsfs/btrfs/ctree.h+19 -64 replies
2/9btrfs: switch BTRFS_BLOCK_RSV_* to enumsfs/btrfs/ctree.h+12 -73 replies
3/9btrfs: switch BTRFS_FS_* to enumsfs/btrfs/ctree.h+31 -322 replies
4/9btrfs: switch BTRFS_ROOT_* to enumsfs/btrfs/ctree.h+17 -163 replies
5/9btrfs: swtich EXTENT_BUFFER_* to enumsfs/btrfs/extent_io.h+16 -123 replies
6/9btrfs: switch EXTENT_FLAG_* to enumsfs/btrfs/extent_map.h+14 -73 replies
7/9btrfs: switch BTRFS_*_LOCK to enumsfs/btrfs/locking.h+6 -43 replies
8/9btrfs: switch BTRFS_ORDERED_* to enumsfs/btrfs/ordered-data.h+25 -203 replies
9/9btrfs: drop extra enum initialization where using defaultsfs/btrfs/btrfs_inode.h fs/btrfs/ctree.h fs/btrfs/disk-io.h +3 more+29 -293 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchOmar SandovalQu WenruoJohannes Thumshirn
1/9R-b R-b R-b
2/9R-b R-b R-b
3/9R-b R-b
4/9R-b R-b R-b
5/9R-b R-b R-b
6/9R-b R-b R-b
7/9R-b
8/9R-b R-b R-b
9/9R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] Switch defines to enums

This is motivated by a merging mistake that happened a few releases ago. Two patches updated BTRFS_FS_* flags independently to the same value, git did not see any direct merge conflict. The two values got mixed at runtime and caused crash.

Update all #define sequential values, the above merging problem would not happen as there would be a conflict and the enum value auto-increment would prevent duplicated values anyway.

David Sterba (9):
btrfs: switch BTRFS_FS_STATE_* to enums
btrfs: switch BTRFS_BLOCK_RSV_* to enums
btrfs: switch BTRFS_FS_* to enums
btrfs: switch BTRFS_ROOT_* to enums
btrfs: swtich EXTENT_BUFFER_* to enums
btrfs: switch EXTENT_FLAG_* to enums
btrfs: switch BTRFS_*_LOCK to enums
btrfs: switch BTRFS_ORDERED_* to enums
btrfs: drop extra enum initialization where using defaults

 fs/btrfs/btrfs_inode.h  |   2 +-
 fs/btrfs/ctree.h        | 168 ++++++++++++++++++++++------------------
 fs/btrfs/disk-io.h      |  10 +--
 fs/btrfs/extent_io.h    |  28 ++++---
 fs/btrfs/extent_map.h   |  21 +++--
 fs/btrfs/locking.h      |  10 ++-
 fs/btrfs/ordered-data.h |  45 ++++++-----
 fs/btrfs/qgroup.h       |   2 +-
 fs/btrfs/sysfs.h        |   2 +-
 fs/btrfs/transaction.h  |  14 ++--
 10 files changed, 169 insertions(+), 133 deletions(-)
Signature · 1 line
2.19.1