summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 15:53:24 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 15:53:24 -1000
commit1b8fc3d89ee0522f535d3714abb300455ed53a4e (patch)
tree1c5e26f9d42424c5a72c6eb1bedaaf4d1780f3c5 /include/uapi
parent9e73b189c88fcba63af4775d637d395de0af4fdb (diff)
parent58e844c3ba387ceb0f527a6ba82aa50c81c4d7b7 (diff)
Merge tag 'for-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba: "User visible changes: - remove tweakable sysfs way to enable features, used only for extent-irefs which has been default since 3.12; the sysfs interface makes it complicated due to locking and context, unlike ioctl - change which backup superblock does mount option 'rescue=usebackuproot' choose, skip the last one due to rotation, for more fine grained control add options selecting a specific backup superblock by index (usebackuproot_N) Notable fixes: - syslog message fixup of error state description, duplicate 'E' renamed to 'H' (emergency shutdown), added 'I 'when delayed iputs are blocked - use kvmalloc for b-tree buffer allocations, as we're using more contig ranges because of large folios, the allocations started to warn on fragmented memory - handle unknown commands for the /dev/btrfs-control ioctls - tune timing of transaction commit when the space is getting low - in raid56, skip verifications if data checksums are not available Performance improvements: - reflink speedup, reorder locking and flushing to optimize for more common cases where the reflinked ranges are accessed, avoid unnecessary contention - minor speedup in zstd decompression (+8MB/s) - reduced contention of inode extent map lock, improves e.g. when shrinker processes inodes without extent maps, measured time reduction 10-20% Core changes: - move allocation errors out of some contexts (new inode/dentry/rename) to avoid transaction aborts - allocate system new chunks earlier, e.g. when consumed by fallocate, and tune deleting unused block groups if the system space is low - tree checker: reject extents for special files - many qgroup fixes regarding enabling/disabling, other state changes and qgroup relation updates - error handling fixes - refactoring, cleanups: - page to folio cleanups - transaction state macros/enums simplification - parameter simplifications" * tag 'for-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (92 commits) btrfs: fix use-after-free on quota enable allocation failure btrfs: prevent use-after-free in btrfs_transaction::switch_commits btrfs: return -ENOTTY for unknown ioctls on the control device btrfs: defrag: fix check to see if next extent can be defragged too btrfs: defrag: fix key comparison with max defrag key in btrfs_defrag_leaves() btrfs: use READ_ONCE() to read the chunk size from the data space_info btrfs: qgroup: make btrfs_record_squota_delta() return void btrfs: fix lost error return value in btrfs_alloc_logged_file_extent() btrfs: qgroup: fix off-by-one max level check in qgroup_trace_new_subtree_blocks() btrfs: abort transaction on qgroup failures in create_pending_snapshot() btrfs: qgroup: merge error labels in btrfs_quota_enable() btrfs: qgroup: fix leak of qgroups in rb tree after failure to enable quotas btrfs: qgroup: abort transaction on failure to add qgroup relation btrfs: qgroup: fix swapped blocks existence check when tracing after COW btrfs: introduce more accurate usebackuproot options btrfs: always use the second newest slot for rescue=usebackuproot btrfs: raid56: do not verify the content if there is no data checksum btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup() btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting() btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup ...
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/btrfs_tree.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index cc3b9f7dccaf..47ee52859b45 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -230,7 +230,7 @@
*
* Stored as an inline ref rather to avoid wasting space on a separate item on
* top of the existing extent item. However, unlike the other inline refs,
- * there is one one owner ref per extent rather than one per extent.
+ * there is one owner ref per extent rather than one per extent.
*
* Because of this, it goes at the front of the list of inline refs, and thus
* must have a lower type value than any other inline ref type (to satisfy the
@@ -243,7 +243,7 @@
#define BTRFS_EXTENT_DATA_REF_KEY 178
/*
- * Obsolete key. Defintion removed in 6.6, value may be reused in the future.
+ * Obsolete key. Definition removed in 6.6, value may be reused in the future.
*
* #define BTRFS_EXTENT_REF_V0_KEY 180
*/
@@ -1255,13 +1255,16 @@ static inline __u16 btrfs_qgroup_level(__u64 qgroupid)
}
/*
- * is subvolume quota turned on?
- */
-#define BTRFS_QGROUP_STATUS_FLAG_ON (1ULL << 0)
-/*
- * RESCAN is set during the initialization phase
+ * The following BTRFS_QGROUP_STATUS_BIT_* are for * btrfs_qgroup_status_item::flags.
+ *
+ * Is subvolume quota turned on?
*/
-#define BTRFS_QGROUP_STATUS_FLAG_RESCAN (1ULL << 1)
+#define BTRFS_QGROUP_STATUS_BIT_ON (0)
+#define BTRFS_QGROUP_STATUS_FLAG_ON (1UL << BTRFS_QGROUP_STATUS_BIT_ON)
+
+/* RESCAN is set during the initialization phase */
+#define BTRFS_QGROUP_STATUS_BIT_RESCAN (1)
+#define BTRFS_QGROUP_STATUS_FLAG_RESCAN (1UL << BTRFS_QGROUP_STATUS_BIT_RESCAN)
/*
* Some qgroup entries are known to be out of date,
* either because the configuration has changed in a way that
@@ -1269,14 +1272,16 @@ static inline __u16 btrfs_qgroup_level(__u64 qgroupid)
* with a non-qgroup-aware version.
* Turning qouta off and on again makes it inconsistent, too.
*/
-#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT (1ULL << 2)
+#define BTRFS_QGROUP_STATUS_BIT_INCONSISTENT (2)
+#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT (1UL << BTRFS_QGROUP_STATUS_BIT_INCONSISTENT)
/*
* Whether or not this filesystem is using simple quotas. Not exactly the
* incompat bit, because we support using simple quotas, disabling it, then
* going back to full qgroup quotas.
*/
-#define BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE (1ULL << 3)
+#define BTRFS_QGROUP_STATUS_BIT_SIMPLE_MODE (3)
+#define BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE (1UL << BTRFS_QGROUP_STATUS_BIT_SIMPLE_MODE)
#define BTRFS_QGROUP_STATUS_FLAGS_MASK (BTRFS_QGROUP_STATUS_FLAG_ON | \
BTRFS_QGROUP_STATUS_FLAG_RESCAN | \