mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
Merge tag 'for-7.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba:
"The most noticeable change is to enable large folios by default, it's
been in testing for a few releases. Related to that is huge folio
support (still under experimental config). Otherwise a few ioctl
updates, performance improvements and usual fixes and core changes.
User visible changes:
- enable large folios by default, added in 6.17 (under experimental
build), no feature limitations, a big change internally
- new ioctl to return raw checksums to userspace (a bit tricky given
compression and tail extents), can be used for mkfs and
deduplication optimizations
- provide stable UUID for e.g. overlayfs and temp_fsid, also
reflected in statvfs() field f_fsid, internal dev_t is hashed in to
allow cloning
- add 32bit compat version of GET_SUBVOL_INFO ioctl
- in experimental build, support huge folios (up to 2M)
Performance related improvements/changes:
- limit bio size to the estimated optimum derived from the queue,
this prevents build up of too much data for writeback, which could
cause latency spikes (reported improvement 15% on sequential
writes)
- don't force direct IO to be serialized, forgotten change during
mount API port, brings back +60% of throughput
- lockless calculation of number of shrinkable extent maps, improve
performance with many memcg allocated objects
Notable fixes:
- in zoned mode, fix a deadlock due to zone reclaim and relocation
when space needs to be flushed
- don't trim device which is internally not tracked as writeable
(e.g. when missing device is being rescanned)
- fix deadlock when cloning inline extent and mounted with
flushoncommit
- fix false IO failures after direct IO falls back to buffered write
in some cases
Core:
- remove COW fixup mechanism completely; detect and fix changes to
pages outside of filesystem tracking, guaranteed since 5.8, grace
period is over
- remove 2K block size support, experimental to test subpage code on
x86_64 but now it would block folio changes
- tree-checker improvements of:
- free-space cache and tree items
- root reference and backref items
- extent state exceptions in reloc tree
- subpage mode updates:
- code optimizations, simplify tracking bitmaps
- re-enable readahead of compressed extent
- extend bitmap size to cover huge folios
- add tracepoints related to sync, tree-log and transactions
- device stats item tracking unification, remove item if there are no
stats recorded, also don't leave stale stats on replaced device
- allow extent buffer pages to be allocated as movable, to help page
migration
- added checks for proper extent buffer release
- btrfs.ko code size reduction due to transaction abort call
simplifications
- several struct size reductions
- more auto free conversions
- more verbose assertions"
* tag 'for-7.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (130 commits)
btrfs: fix use-after-free after relocation failure with concurrent COW
btrfs: move WARN_ON on unexpected error in __add_tree_block()
btrfs: move locking into btrfs_get_reloc_bg_bytenr()
btrfs: lzo: reject compressed segment that overflows the compressed input
btrfs: retry faulting in the pages after a zero sized short direct write
btrfs: fix incorrect buffered IO fallback for append direct writes
btrfs: fix false IO failure after falling back to buffered write
btrfs: use verbose assertions in backref.c
btrfs: print a message when a missing device re-appears
btrfs: do not trim a device which is not writeable
btrfs: return real error after lookup failure in btrfs_ioctl_default_subvol()
btrfs: use mapping shared locking for reading super block
btrfs: use lockless read in nr_cached_objects shrinker callback
btrfs: switch local indicator variables to bools
btrfs: send: pass bool for pending_move and refs_processed parameters
btrfs: use shifts for sectorsize and nodesize
btrfs: fix deadlock cloning inline extent when using flushoncommit
btrfs: allocate eb-attached btree pages as movable
btrfs: add 32-bit compat ioctl for BTRFS_IOC_GET_SUBVOL_INFO
btrfs: derive f_fsid from on-disk fsid and dev_t
...
This commit is contained in:
@@ -1100,6 +1100,38 @@ enum btrfs_err_code {
|
||||
BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
|
||||
};
|
||||
|
||||
/* Flags for struct btrfs_ioctl_get_csums_entry::type. */
|
||||
#define BTRFS_GET_CSUMS_HAS_CSUMS (1U << 0)
|
||||
#define BTRFS_GET_CSUMS_ZEROED (1U << 1)
|
||||
#define BTRFS_GET_CSUMS_NODATASUM (1U << 2)
|
||||
#define BTRFS_GET_CSUMS_COMPRESSED (1U << 3)
|
||||
#define BTRFS_GET_CSUMS_ENCRYPTED (1U << 4)
|
||||
#define BTRFS_GET_CSUMS_INLINE (1U << 5)
|
||||
|
||||
struct btrfs_ioctl_get_csums_entry {
|
||||
/* File offset of this range. */
|
||||
__u64 offset;
|
||||
/* Length in bytes. */
|
||||
__u64 length;
|
||||
/* One of BTRFS_GET_CSUMS_* types. */
|
||||
__u32 type;
|
||||
/* Padding, must be 0. */
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
struct btrfs_ioctl_get_csums_args {
|
||||
/* In/out: file offset in bytes. */
|
||||
__u64 offset;
|
||||
/* In/out: range length in bytes. */
|
||||
__u64 length;
|
||||
/* In/out: buffer capacity / bytes written. */
|
||||
__u64 buf_size;
|
||||
/* In: flags, must be 0 for now. */
|
||||
__u64 flags;
|
||||
/* Out: entries of type btrfs_ioctl_get_csums_entry + csum data */
|
||||
__u8 buf[];
|
||||
};
|
||||
|
||||
/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
|
||||
#define BTRFS_SHUTDOWN_FLAGS_DEFAULT 0x0
|
||||
#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH 0x1
|
||||
@@ -1226,6 +1258,8 @@ enum btrfs_err_code {
|
||||
struct btrfs_ioctl_encoded_io_args)
|
||||
#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
|
||||
struct btrfs_ioctl_subvol_wait)
|
||||
#define BTRFS_IOC_GET_CSUMS _IOWR(BTRFS_IOCTL_MAGIC, 66, \
|
||||
struct btrfs_ioctl_get_csums_args)
|
||||
|
||||
/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
|
||||
#define BTRFS_IOC_SHUTDOWN _IOR('X', 125, __u32)
|
||||
|
||||
Reference in New Issue
Block a user