[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: a0f0cf8341e34e5d2265bfd3a7ad68342da1e2aa
WARNING: Author mismatch between patch and upstream commit: Backport author: Zhi YangZhi.Yang@eng.windriver.com Commit author: Filipe Mananafdmanana@suse.com
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1) 5.15.y | Present (different SHA1: 850a77c999b8)
Note: The patch differs from the upstream commit: --- 1: a0f0cf8341e34 ! 1: af3df33f85da5 btrfs: get rid of warning on transaction commit when using flushoncommit @@ Metadata ## Commit message ## btrfs: get rid of warning on transaction commit when using flushoncommit
+ commit a0f0cf8341e34e5d2265bfd3a7ad68342da1e2aa upstream. + When using the flushoncommit mount option, during almost every transaction commit we trigger a warning from __writeback_inodes_sb_nr():
@@ Commit message Signed-off-by: Filipe Manana fdmanana@suse.com [ add more link reports ] Signed-off-by: David Sterba dsterba@suse.com + [Minor context change fixed] + Signed-off-by: Zhi Yang Zhi.Yang@windriver.com + Signed-off-by: He Zhe zhe.he@windriver.com
## fs/btrfs/transaction.c ## -@@ fs/btrfs/transaction.c: static void btrfs_cleanup_pending_block_groups(struct btrfs_trans_handle *trans) - static inline int btrfs_start_delalloc_flush(struct btrfs_fs_info *fs_info) - { +@@ fs/btrfs/transaction.c: static inline int btrfs_start_delalloc_flush(struct btrfs_trans_handle *trans) + struct btrfs_fs_info *fs_info = trans->fs_info; + /* - * We use writeback_inodes_sb here because if we used + * We use try_to_writeback_inodes_sb() here because if we used @@ fs/btrfs/transaction.c: static void btrfs_cleanup_pending_block_groups(struct bt + * Note that we don't call writeback_inodes_sb() directly, because it + * will emit a warning if sb->s_umount is not locked. */ - if (btrfs_test_opt(fs_info, FLUSHONCOMMIT)) + if (btrfs_test_opt(fs_info, FLUSHONCOMMIT)) { - writeback_inodes_sb(fs_info->sb, WB_REASON_SYNC); + try_to_writeback_inodes_sb(fs_info->sb, WB_REASON_SYNC); - return 0; - } - + } else { + struct btrfs_pending_snapshot *pending; + struct list_head *head = &trans->transaction->pending_snapshots; ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.10.y | Success | Success |