Merge tag 'for-5.7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba: "A number of core changes that make things work better in general, code is simpler and cleaner. Core changes: - per-inode file extent tree, for in memory tracking of contiguous extent ranges to make sure i_size adjustments are accurate - tree root structures are protected by reference counts, replacing SRCU that did not cover some cases - leak detector for tree root structures - per-transaction pinned extent tracking - buffer heads are replaced by bios for super block access - speedup of extent back reference resolution, on an example test scenario the runtime of send went down from a hour to minutes - factor out locking scheme used for subvolume writer and NOCOW exclusion, abstracted as DREW lock, double reader-writer exclusion (allow either readers or writers) - cleanup and abstract extent allocation policies, preparation for zoned device support - make reflink/clone_range work on inline extents - add more cancellation point for relocation, improves long response from 'balance cancel' - add page migration callback for data pages - switch to guid for uuids, with additional cleanups of the interface - make ranged full fsyncs more efficient - removal of obsolete ioctl flag BTRFS_SUBVOL_CREATE_ASYNC - remove b-tree readahead from delayed refs paths, avoiding seek and read unnecessary blocks Features: - v2 of ioctl to delete subvolumes, allowing to delete by id and more future extensions Fixes: - fix qgroup rescan worker that could block umount - fix crash during unmount due to race with delayed inode workers - fix dellaloc flushing logic that could create unnecessary chunks under heavy load - fix missing file extent item for hole after ranged fsync - several fixes in relocation error handling Other: - more documentation of relocation, device replace, space reservations - many random cleanups" * tag 'for-5.7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (210 commits) btrfs: fix missing semaphore unlock in btrfs_sync_file btrfs: use nofs allocations for running delayed items btrfs: sysfs: Use scnprintf() instead of snprintf() btrfs: do not resolve backrefs for roots that are being deleted btrfs: track reloc roots based on their commit root bytenr btrfs: restart relocate_tree_blocks properly btrfs: reloc: reorder reservation before root selection btrfs: do not readahead in build_backref_tree btrfs: do not use readahead for running delayed refs btrfs: Remove async_transid from btrfs_mksubvol/create_subvol/create_snapshot btrfs: Remove transid argument from btrfs_ioctl_snap_create_transid btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support btrfs: kill the subvol_srcu btrfs: make btrfs_cleanup_fs_roots use the radix tree lock btrfs: don't take an extra root ref at allocation time btrfs: hold a ref on the root on the dead roots list btrfs: make inodes hold a ref on their roots btrfs: move the root freeing stuff into btrfs_put_root btrfs: move ino_cache_inode dropping out of btrfs_free_fs_root btrfs: make the extent buffer leak check per fs info ...
This commit is contained in:
@@ -36,17 +36,24 @@ struct btrfs_ioctl_vol_args {
|
||||
#define BTRFS_DEVICE_PATH_NAME_MAX 1024
|
||||
#define BTRFS_SUBVOL_NAME_MAX 4039
|
||||
|
||||
#define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
|
||||
/*
|
||||
* Deprecated since 5.7:
|
||||
*
|
||||
* BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
|
||||
*/
|
||||
|
||||
#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
|
||||
#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
|
||||
|
||||
#define BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3)
|
||||
|
||||
#define BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4)
|
||||
|
||||
#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \
|
||||
(BTRFS_SUBVOL_CREATE_ASYNC | \
|
||||
BTRFS_SUBVOL_RDONLY | \
|
||||
(BTRFS_SUBVOL_RDONLY | \
|
||||
BTRFS_SUBVOL_QGROUP_INHERIT | \
|
||||
BTRFS_DEVICE_SPEC_BY_ID)
|
||||
BTRFS_DEVICE_SPEC_BY_ID | \
|
||||
BTRFS_SUBVOL_SPEC_BY_ID)
|
||||
|
||||
#define BTRFS_FSID_SIZE 16
|
||||
#define BTRFS_UUID_SIZE 16
|
||||
@@ -97,16 +104,29 @@ struct btrfs_ioctl_qgroup_limit_args {
|
||||
};
|
||||
|
||||
/*
|
||||
* flags for subvolumes
|
||||
* Arguments for specification of subvolumes or devices, supporting by-name or
|
||||
* by-id and flags
|
||||
*
|
||||
* Used by:
|
||||
* struct btrfs_ioctl_vol_args_v2.flags
|
||||
* The set of supported flags depends on the ioctl
|
||||
*
|
||||
* BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:
|
||||
* - BTRFS_IOC_SUBVOL_GETFLAGS
|
||||
* - BTRFS_IOC_SUBVOL_SETFLAGS
|
||||
*/
|
||||
|
||||
/* Supported flags for BTRFS_IOC_RM_DEV_V2 */
|
||||
#define BTRFS_DEVICE_REMOVE_ARGS_MASK \
|
||||
(BTRFS_DEVICE_SPEC_BY_ID)
|
||||
|
||||
/* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SUBVOL_CREATE_V2 */
|
||||
#define BTRFS_SUBVOL_CREATE_ARGS_MASK \
|
||||
(BTRFS_SUBVOL_RDONLY | \
|
||||
BTRFS_SUBVOL_QGROUP_INHERIT)
|
||||
|
||||
/* Supported flags for BTRFS_IOC_SNAP_DESTROY_V2 */
|
||||
#define BTRFS_SUBVOL_DELETE_ARGS_MASK \
|
||||
(BTRFS_SUBVOL_SPEC_BY_ID)
|
||||
|
||||
struct btrfs_ioctl_vol_args_v2 {
|
||||
__s64 fd;
|
||||
__u64 transid;
|
||||
@@ -121,6 +141,7 @@ struct btrfs_ioctl_vol_args_v2 {
|
||||
union {
|
||||
char name[BTRFS_SUBVOL_NAME_MAX + 1];
|
||||
__u64 devid;
|
||||
__u64 subvolid;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -949,5 +970,7 @@ enum btrfs_err_code {
|
||||
struct btrfs_ioctl_get_subvol_rootref_args)
|
||||
#define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, \
|
||||
struct btrfs_ioctl_ino_lookup_user_args)
|
||||
#define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, \
|
||||
struct btrfs_ioctl_vol_args_v2)
|
||||
|
||||
#endif /* _UAPI_LINUX_BTRFS_H */
|
||||
|
Reference in New Issue
Block a user