linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Switch defines to enums
@ 2018-11-27 19:53 David Sterba
  2018-11-27 19:53 ` [PATCH 1/9] btrfs: switch BTRFS_FS_STATE_* " David Sterba
                   ` (9 more replies)
  0 siblings, 10 replies; 40+ messages in thread
From: David Sterba @ 2018-11-27 19:53 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

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(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2018-11-28 15:22 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 19:53 [PATCH 0/9] Switch defines to enums David Sterba
2018-11-27 19:53 ` [PATCH 1/9] btrfs: switch BTRFS_FS_STATE_* " David Sterba
2018-11-28  0:24   ` Omar Sandoval
2018-11-28 15:22     ` David Sterba
2018-11-28  1:18   ` Qu Wenruo
2018-11-28 12:49   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 2/9] btrfs: switch BTRFS_BLOCK_RSV_* " David Sterba
2018-11-28  0:25   ` Omar Sandoval
2018-11-28  1:19   ` Qu Wenruo
2018-11-28 12:50   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 3/9] btrfs: switch BTRFS_FS_* " David Sterba
2018-11-28  0:28   ` Omar Sandoval
2018-11-28  1:21   ` Qu Wenruo
2018-11-27 19:53 ` [PATCH 4/9] btrfs: switch BTRFS_ROOT_* " David Sterba
2018-11-28  0:30   ` Omar Sandoval
2018-11-28  1:22   ` Qu Wenruo
2018-11-28 13:17   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 5/9] btrfs: swtich EXTENT_BUFFER_* " David Sterba
2018-11-28  0:31   ` Omar Sandoval
2018-11-28  1:24   ` Qu Wenruo
2018-11-28 13:19   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 6/9] btrfs: switch EXTENT_FLAG_* " David Sterba
2018-11-28  0:32   ` Omar Sandoval
2018-11-28  1:25   ` Qu Wenruo
2018-11-28 13:26   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 7/9] btrfs: switch BTRFS_*_LOCK " David Sterba
2018-11-28  0:37   ` Omar Sandoval
2018-11-28 13:22     ` David Sterba
2018-11-28  1:26   ` Qu Wenruo
2018-11-27 19:53 ` [PATCH 8/9] btrfs: switch BTRFS_ORDERED_* " David Sterba
2018-11-28  0:37   ` Omar Sandoval
2018-11-28  1:32   ` Qu Wenruo
2018-11-28 13:28   ` Johannes Thumshirn
2018-11-27 19:53 ` [PATCH 9/9] btrfs: drop extra enum initialization where using defaults David Sterba
2018-11-28  0:38   ` Omar Sandoval
2018-11-28  1:35   ` Qu Wenruo
2018-11-28 13:29   ` Johannes Thumshirn
2018-11-28  1:33 ` [PATCH 0/9] Switch defines to enums Qu Wenruo
2018-11-28 13:25   ` David Sterba
2018-11-28 13:50     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).