From a22b09b941db9508c446820c2f1691b911688700 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Sat, 2 Aug 2025 11:23:13 -0600 Subject: [PATCH] kernel-6.15.9-101 * Fri Aug 01 2025 Augusto Caringi [6.15.9-0] - Linux v6.15.9 Resolves: Signed-off-by: Justin M. Forbes --- Patchlist.changelog | 3 ++ kernel.spec | 7 ++-- patch-6.15-redhat.patch | 76 ++++++++++++++++++++++++++++++++++++++++- sources | 4 +-- 4 files changed, 85 insertions(+), 5 deletions(-) diff --git a/Patchlist.changelog b/Patchlist.changelog index 37e7544e1..e17fde484 100644 --- a/Patchlist.changelog +++ b/Patchlist.changelog @@ -1,3 +1,6 @@ +https://gitlab.com/cki-project/kernel-ark/-/commit/e6c71b29fab08fd0ab55d2f83c4539d68d543895 + e6c71b29fab08fd0ab55d2f83c4539d68d543895 btrfs: fix log tree replay failure due to file with 0 links and extents + https://gitlab.com/cki-project/kernel-ark/-/commit/232170214b6517d57aa403732d63425d1073e6ba 232170214b6517d57aa403732d63425d1073e6ba io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well diff --git a/kernel.spec b/kernel.spec index 6196f1bc5..41b66ecb8 100644 --- a/kernel.spec +++ b/kernel.spec @@ -162,13 +162,13 @@ Summary: The Linux kernel %define specrpmversion 6.15.9 %define specversion 6.15.9 %define patchversion 6.15 -%define pkgrelease 100 +%define pkgrelease 101 %define kversion 6 %define tarfile_release 6.15.9 # This is needed to do merge window version magic %define patchlevel 15 # This allows pkg_release to have configurable %%{?dist} tag -%define specrelease 100%{?buildid}%{?dist} +%define specrelease 101%{?buildid}%{?dist} # This defines the kabi tarball version %define kabiversion 6.15.9 @@ -4261,6 +4261,9 @@ fi\ # # %changelog +* Sat Aug 02 2025 Justin M. Forbes [6.15.9-101] +- btrfs: fix log tree replay failure due to file with 0 links and extents (Filipe Manana) + * Fri Aug 01 2025 Augusto Caringi [6.15.9-0] - Linux v6.15.9 diff --git a/patch-6.15-redhat.patch b/patch-6.15-redhat.patch index 6a5a4a0b5..f52f34c1d 100644 --- a/patch-6.15-redhat.patch +++ b/patch-6.15-redhat.patch @@ -47,6 +47,7 @@ .../platform/x86/intel/int3472/discrete_quirks.c | 22 + drivers/scsi/sd.c | 10 + drivers/usb/core/hub.c | 7 + + fs/btrfs/tree-log.c | 45 +- include/linux/efi.h | 22 +- include/linux/lsm_hook_defs.h | 1 + include/linux/rmi.h | 1 + @@ -57,7 +58,7 @@ security/integrity/platform_certs/load_uefi.c | 6 +- security/lockdown/Kconfig | 13 + security/lockdown/lockdown.c | 11 + - 59 files changed, 2745 insertions(+), 344 deletions(-) + 60 files changed, 2774 insertions(+), 360 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index dd844ac8d910..dab2b4892122 100644 @@ -4089,6 +4090,79 @@ index 1e0be266e9b2..d5ff94117e0b 100644 /* Lock the device, then check to see if we were * disconnected while waiting for the lock to succeed. */ usb_lock_device(hdev); +diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c +index e05140ce95be..2fb9e7bfc907 100644 +--- a/fs/btrfs/tree-log.c ++++ b/fs/btrfs/tree-log.c +@@ -321,8 +321,7 @@ struct walk_control { + + /* + * Ignore any items from the inode currently being processed. Needs +- * to be set every time we find a BTRFS_INODE_ITEM_KEY and we are in +- * the LOG_WALK_REPLAY_INODES stage. ++ * to be set every time we find a BTRFS_INODE_ITEM_KEY. + */ + bool ignore_cur_inode; + +@@ -2410,23 +2409,30 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb, + + nritems = btrfs_header_nritems(eb); + for (i = 0; i < nritems; i++) { +- btrfs_item_key_to_cpu(eb, &key, i); ++ struct btrfs_inode_item *inode_item; + +- /* inode keys are done during the first stage */ +- if (key.type == BTRFS_INODE_ITEM_KEY && +- wc->stage == LOG_WALK_REPLAY_INODES) { +- struct btrfs_inode_item *inode_item; +- u32 mode; ++ btrfs_item_key_to_cpu(eb, &key, i); + +- inode_item = btrfs_item_ptr(eb, i, +- struct btrfs_inode_item); ++ if (key.type == BTRFS_INODE_ITEM_KEY) { ++ inode_item = btrfs_item_ptr(eb, i, struct btrfs_inode_item); + /* +- * If we have a tmpfile (O_TMPFILE) that got fsync'ed +- * and never got linked before the fsync, skip it, as +- * replaying it is pointless since it would be deleted +- * later. We skip logging tmpfiles, but it's always +- * possible we are replaying a log created with a kernel +- * that used to log tmpfiles. ++ * An inode with no links is either: ++ * ++ * 1) A tmpfile (O_TMPFILE) that got fsync'ed and never ++ * got linked before the fsync, skip it, as replaying ++ * it is pointless since it would be deleted later. ++ * We skip logging tmpfiles, but it's always possible ++ * we are replaying a log created with a kernel that ++ * used to log tmpfiles; ++ * ++ * 2) A non-tmpfile which got its last link deleted ++ * while holding an open fd on it and later got ++ * fsynced through that fd. We always log the ++ * parent inodes when inode->last_unlink_trans is ++ * set to the current transaction, so ignore all the ++ * inode items for this inode. We will delete the ++ * inode when processing the parent directory with ++ * replay_dir_deletes(). + */ + if (btrfs_inode_nlink(eb, inode_item) == 0) { + wc->ignore_cur_inode = true; +@@ -2434,6 +2440,13 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb, + } else { + wc->ignore_cur_inode = false; + } ++ } ++ ++ /* Inode keys are done during the first stage. */ ++ if (key.type == BTRFS_INODE_ITEM_KEY && ++ wc->stage == LOG_WALK_REPLAY_INODES) { ++ u32 mode; ++ + ret = replay_xattr_deletes(wc->trans, root, log, + path, key.objectid); + if (ret) diff --git a/include/linux/efi.h b/include/linux/efi.h index 7d63d1d75f22..c7481fdedbdd 100644 --- a/include/linux/efi.h diff --git a/sources b/sources index c89414e3a..127b4865f 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (linux-6.15.9.tar.xz) = 3ed949a4c9b057445fe0a4abde8fbc017ef9f88fe746e874b736a6a3c1d289981525dc5a3760795e74ba45d0978c2028c177f24e24d8b43fa6ca894d452a5925 -SHA512 (kernel-abi-stablelists-6.15.9.tar.xz) = 84efdf44e6ebd05ae7adf5183c0b843111559621622e8ab82c26c80f611baa91981e5a87ab64cec55f1babbcb7be4e9fb3d3cbaf94cc0b58b40c68b2d298946f -SHA512 (kernel-kabi-dw-6.15.9.tar.xz) = c0f1278074670da096028504ceb2e06130473124d45579461acab9e7f7df6b75eaeb8a99ab296fd665f7b8d3a788318b065b49fe4cf155bc25e1c1e3b47dc859 +SHA512 (kernel-abi-stablelists-6.15.9.tar.xz) = 0d1b654625bed5f93cee96a55f7e6fa7ff08c1d3aaba1fbe8a11d6a84619b5eef4c7b7cd7baeee818983e41cbc579fc6c0f007ea57d40a97bbd483322024fa7f +SHA512 (kernel-kabi-dw-6.15.9.tar.xz) = 7d8aa56a54367a0f87d442dd05df85548f2422aeeec3902743d0c30ec62fda30a8cf686da1643a6d7a83fb5c7477c1981a1fcd2db32262baf892fd66d9be494b