History

Merge tag 'for-5.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs updates from David Sterba: "This continues with work on code refactoring, sanity checks and space handling. There are some less user visible changes, nothing that would particularly stand out. User visible changes: - tree checker, more sanity checks of: - ROOT_ITEM (key, size, generation, level, alignment, flags) - EXTENT_ITEM and METADATA_ITEM checks (key, size, offset, alignment, refs) - tree block reference items - EXTENT_DATA_REF (key, hash, offset) - deprecate flag BTRFS_SUBVOL_CREATE_ASYNC for subvolume creation ioctl, scheduled removal in 5.7 - delete stale and unused UAPI definitions BTRFS_DEV_REPLACE_ITEM_STATE_* - improved export of debugging information available via existing sysfs directory structure - try harder to delete relations between qgroups and allow to delete orphan entries - remove unreliable space checks before relocation starts Core: - space handling: - improved ticket reservations and other high level logic in order to remove special cases - factor flushing infrastructure and use it for different contexts, allows to remove some special case handling - reduce metadata reservation when only updating inodes - reduce global block reserve minimum size (affects small filesystems) - improved overcommit logic wrt global block reserve - tests: - fix memory leaks in extent IO tree - catch all TRIM range Fixes: - fix ENOSPC errors, leading to transaction aborts, when cloning extents - several fixes for inode number cache (mount option inode_cache) - fix potential soft lockups during send when traversing large trees - fix unaligned access to space cache pages with SLUB debug on (PowerPC) Other: - refactoring public/private functions, moving to new or more appropriate files - defines converted to enums - error handling improvements - more assertions and comments - old code deletion" * tag 'for-5.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (138 commits) btrfs: Relinquish CPUs in btrfs_compare_trees btrfs: Don't assign retval of btrfs_try_tree_write_lock/btrfs_tree_read_lock_atomic btrfs: create structure to encode checksum type and length btrfs: turn checksum type define into an enum btrfs: add enospc debug messages for ticket failure btrfs: do not account global reserve in can_overcommit btrfs: use btrfs_try_granting_tickets in update_global_rsv btrfs: always reserve our entire size for the global reserve btrfs: change the minimum global reserve size btrfs: rename btrfs_space_info_add_old_bytes btrfs: remove orig_bytes from reserve_ticket btrfs: fix may_commit_transaction to deal with no partial filling btrfs: rework wake_all_tickets btrfs: refactor the ticket wakeup code btrfs: stop partially refilling tickets when releasing space btrfs: add space reservation tracepoint for reserved bytes btrfs: roll tracepoint into btrfs_space_info_update helper btrfs: do not allow reservations if we have pending tickets btrfs: stop clearing EXTENT_DIRTY in inode I/O tree btrfs: treat RWF_{,D}SYNC writes as sync for CRCs ...

Linus Torvalds committed 7 years ago

Commit 7d14df22 parents 0bb73e4 6af112b65 files · +10557 −9990Browse files

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

Unified · Split

2 files
  1. include/uapi/linux/btrfs.h +8 −5
  2. include/uapi/linux/btrfs_tree.h +3 −6
include/uapi/linux/btrfs.h+8−5
@@ -665,7 +665,12 @@ struct btrfs_ioctl_get_dev_stats { · 664 unmodified lines
665665 /* out values: */
666666 __u64 values[BTRFS_DEV_STAT_VALUES_MAX];
667667
668− __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */
668+ /*
669+ * This pads the struct to 1032 bytes. It was originally meant to pad to
670+ * 1024 bytes, but when adding the flags field, the padding calculation
671+ * was not adjusted.
672+ */
673+ __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX];
669674 };
670675
671676 #define BTRFS_QUOTA_CTL_ENABLE 1
@@ -917,10 +922,8 @@ enum btrfs_err_code { · 245 unmodified lines
917922 #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
918923 struct btrfs_ioctl_quota_rescan_args)
919924 #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
920−#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \
921− char[BTRFS_LABEL_SIZE])
922−#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \
923− char[BTRFS_LABEL_SIZE])
925+#define BTRFS_IOC_GET_FSLABEL FS_IOC_GETFSLABEL
926+#define BTRFS_IOC_SET_FSLABEL FS_IOC_SETFSLABEL
924927 #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \
925928 struct btrfs_ioctl_get_dev_stats)
926929 #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \
include/uapi/linux/btrfs_tree.h+3−6
@@ -300,7 +300,9 @@ · 299 unmodified lines
300300 #define BTRFS_CSUM_SIZE 32
301301
302302 /* csum types */
303−#define BTRFS_CSUM_TYPE_CRC32 0
303+enum btrfs_csum_type {
304+ BTRFS_CSUM_TYPE_CRC32 = 0,
305+};
304306
305307 /*
306308 * flags definitions for directory entry item type
@@ -806,11 +808,6 @@ struct btrfs_dev_stats_item { · 499 unmodified lines
806808
807809 #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0
808810 #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID 1
809−#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED 0
810−#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED 1
811−#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED 2
812−#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED 3
813−#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED 4
814811
815812 struct btrfs_dev_replace_item {
816813 /*