History

btrfs: use enum for extent type defines

Use enum to replace macro definitions of extent types.

Chengguang Xu committed 7 years ago

Commit b9b1a531 parent b2cd2952 files · +8 −6Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/btrfs_tree.h+6−4
@@ -737,10 +737,12 @@ struct btrfs_balance_item { · 736 unmodified lines
737737 __le64 unused[4];
738738 } __attribute__ ((__packed__));
739739
740−#define BTRFS_FILE_EXTENT_INLINE 0
741−#define BTRFS_FILE_EXTENT_REG 1
742−#define BTRFS_FILE_EXTENT_PREALLOC 2
743−#define BTRFS_FILE_EXTENT_TYPES 2
740+enum {
741+ BTRFS_FILE_EXTENT_INLINE = 0,
742+ BTRFS_FILE_EXTENT_REG = 1,
743+ BTRFS_FILE_EXTENT_PREALLOC = 2,
744+ BTRFS_NR_FILE_EXTENT_TYPES = 3,
745+};
744746
745747 struct btrfs_file_extent_item {
746748 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t