Pull btrfs updates from David Sterba: "User visible changes: - new block group profiles: RAID1 with 3- and 4- copies - RAID1 in btrfs has always 2 copies, now add support for 3 and 4 - this is an incompat feature (named RAID1C34) - recommended use of RAID1C3 is replacement of RAID6 profile on metadata, this brings a more reliable resiliency against 2 device loss/damage - support for new checksums - per-filesystem, set at mkfs time - fast hash (crc32c successor): xxhash, 64bit digest - strong hashes (both 256bit): sha256 (slower, FIPS), blake2b (faster) - the blake2b module goes via the crypto tree, btrfs.ko has a soft dependency - speed up lseek, don't take inode locks unnecessarily, this can speed up parallel SEEK_CUR/SEEK_SET/SEEK_END by 80% - send: - allow clone operations within the same file - limit maximum number of sent clone references to avoid slow backref walking - error message improvements: device scan prints process name and PID Core changes: - cleanups - remove unique workqueue helpers, used to provide a way to avoid deadlocks in the workqueue code, now done in a simpler way - remove lots of indirect function calls in compression code - extent IO tree code moved out of extent_io.c - cleanup backup superblock handling at mount time - transaction life cycle documentation and cleanups - locking code cleanups, annotations and documentation - add more cold, const, pure function attributes - removal of unused or redundant struct members or variables - new tree-checker sanity tests - try to detect missing INODE_ITEM, cross-reference checks of DIR_ITEM, DIR_INDEX, INODE_REF, and XATTR_* items - remove own bio scheduling code (used to avoid checksum submissions being stuck behind other IO), replaced by cgroup controller-based code to allow better control and avoid priority inversions in cases where the custom and cgroup scheduling disagreed Fixes: - avoid getting stuck during cyclic writebacks - fix trimming of ranges crossing block group boundaries - fix rename exchange on subvolumes, all involved subvolumes need to be recorded in the transaction" * tag 'for-5.5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (137 commits) btrfs: drop bdev argument from submit_extent_page btrfs: remove extent_map::bdev btrfs: drop bio_set_dev where not needed btrfs: get bdev directly from fs_devices in submit_extent_page btrfs: record all roots for rename exchange on a subvol Btrfs: fix block group remaining RO forever after error during device replace btrfs: scrub: Don't check free space before marking a block group RO btrfs: change btrfs_fs_devices::rotating to bool btrfs: change btrfs_fs_devices::seeding to bool btrfs: rename btrfs_block_group_cache btrfs: block-group: Reuse the item key from caller of read_one_block_group() btrfs: block-group: Refactor btrfs_read_block_groups() btrfs: document extent buffer locking btrfs: access eb::blocking_writers according to ACCESS_ONCE policies btrfs: set blocking_writers directly, no increment or decrement btrfs: merge blocking_writers branches in btrfs_tree_read_lock btrfs: drop incompat bit for raid1c34 after last block group is gone btrfs: add incompat for raid1 with 3, 4 copies btrfs: add support for 4-copy replication (raid1c4) btrfs: add support for 3-copy replication (raid1c3) ...
Showing the changes to include/uapi/linux (2 of 66 files). Show all
Unified · Split
| @@ -270,6 +270,7 @@ struct btrfs_ioctl_fs_info_args { · 269 unmodified lines | ||
| 270 | 270 | #define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8) |
| 271 | 271 | #define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9) |
| 272 | 272 | #define BTRFS_FEATURE_INCOMPAT_METADATA_UUID (1ULL << 10) |
| 273 | +#define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11) | |
| 273 | 274 | |
| 274 | 275 | struct btrfs_ioctl_feature_flags { |
| 275 | 276 | __u64 compat_flags; |
| @@ -831,7 +832,9 @@ enum btrfs_err_code { · 555 unmodified lines | ||
| 831 | 832 | BTRFS_ERROR_DEV_TGT_REPLACE, |
| 832 | 833 | BTRFS_ERROR_DEV_MISSING_NOT_FOUND, |
| 833 | 834 | BTRFS_ERROR_DEV_ONLY_WRITABLE, |
| 834 | − BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS | |
| 835 | + BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS, | |
| 836 | + BTRFS_ERROR_DEV_RAID1C3_MIN_NOT_MET, | |
| 837 | + BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET, | |
| 835 | 838 | }; |
| 836 | 839 | |
| 837 | 840 | #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ |
| @@ -302,6 +302,9 @@ · 301 unmodified lines | ||
| 302 | 302 | /* csum types */ |
| 303 | 303 | enum btrfs_csum_type { |
| 304 | 304 | BTRFS_CSUM_TYPE_CRC32 = 0, |
| 305 | + BTRFS_CSUM_TYPE_XXHASH = 1, | |
| 306 | + BTRFS_CSUM_TYPE_SHA256 = 2, | |
| 307 | + BTRFS_CSUM_TYPE_BLAKE2 = 3, | |
| 305 | 308 | }; |
| 306 | 309 | |
| 307 | 310 | /* |
| @@ -737,10 +740,12 @@ struct btrfs_balance_item { · 429 unmodified lines | ||
| 737 | 740 | __le64 unused[4]; |
| 738 | 741 | } __attribute__ ((__packed__)); |
| 739 | 742 | |
| 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 | |
| 743 | +enum { | |
| 744 | + BTRFS_FILE_EXTENT_INLINE = 0, | |
| 745 | + BTRFS_FILE_EXTENT_REG = 1, | |
| 746 | + BTRFS_FILE_EXTENT_PREALLOC = 2, | |
| 747 | + BTRFS_NR_FILE_EXTENT_TYPES = 3, | |
| 748 | +}; | |
| 744 | 749 | |
| 745 | 750 | struct btrfs_file_extent_item { |
| 746 | 751 | /* |
| @@ -836,6 +841,8 @@ struct btrfs_dev_replace_item { · 89 unmodified lines | ||
| 836 | 841 | #define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6) |
| 837 | 842 | #define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7) |
| 838 | 843 | #define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) |
| 844 | +#define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9) | |
| 845 | +#define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10) | |
| 839 | 846 | #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \ |
| 840 | 847 | BTRFS_SPACE_INFO_GLOBAL_RSV) |
| 841 | 848 | |
| @@ -847,6 +854,8 @@ enum btrfs_raid_types { · 5 unmodified lines | ||
| 847 | 854 | BTRFS_RAID_SINGLE, |
| 848 | 855 | BTRFS_RAID_RAID5, |
| 849 | 856 | BTRFS_RAID_RAID6, |
| 857 | + BTRFS_RAID_RAID1C3, | |
| 858 | + BTRFS_RAID_RAID1C4, | |
| 850 | 859 | BTRFS_NR_RAID_TYPES |
| 851 | 860 | }; |
| 852 | 861 | |
| @@ -856,6 +865,8 @@ enum btrfs_raid_types { · 3 unmodified lines | ||
| 856 | 865 | |
| 857 | 866 | #define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \ |
| 858 | 867 | BTRFS_BLOCK_GROUP_RAID1 | \ |
| 868 | + BTRFS_BLOCK_GROUP_RAID1C3 | \ | |
| 869 | + BTRFS_BLOCK_GROUP_RAID1C4 | \ | |
| 859 | 870 | BTRFS_BLOCK_GROUP_RAID5 | \ |
| 860 | 871 | BTRFS_BLOCK_GROUP_RAID6 | \ |
| 861 | 872 | BTRFS_BLOCK_GROUP_DUP | \ |
| @@ -863,7 +874,9 @@ enum btrfs_raid_types { · 1 unmodified line | ||
| 863 | 874 | #define BTRFS_BLOCK_GROUP_RAID56_MASK (BTRFS_BLOCK_GROUP_RAID5 | \ |
| 864 | 875 | BTRFS_BLOCK_GROUP_RAID6) |
| 865 | 876 | |
| 866 | −#define BTRFS_BLOCK_GROUP_RAID1_MASK (BTRFS_BLOCK_GROUP_RAID1) | |
| 877 | +#define BTRFS_BLOCK_GROUP_RAID1_MASK (BTRFS_BLOCK_GROUP_RAID1 | \ | |
| 878 | + BTRFS_BLOCK_GROUP_RAID1C3 | \ | |
| 879 | + BTRFS_BLOCK_GROUP_RAID1C4) | |
| 867 | 880 | |
| 868 | 881 | /* |
| 869 | 882 | * We need a bit for restriper to be able to tell when chunks of type |