static void report_uncovered_rmw(struct btrfs_raid_bio *rbio)
{
struct btrfs_fs_info *fs_info = rbio->bioc->fs_info;
+ struct btrfs_block_group *bg;
+ bool covered = false;
if (!btrfs_test_opt(fs_info, STRIPE_ALLOC))
return;
atomic64_inc(&fs_info->stripe_park_stats.meta_rmw);
audit_uncovered_rmw(rbio);
+ /*
+ * A raid56 metadata group under stripe_meta is covered: its
+ * read-modify-writes are partial writes inside one transaction's
+ * run, counted by the audit as meta_rmw_cur, and the audit warns
+ * by itself should one ever touch a committed block. Only system
+ * chunks and mixed groups are the uncovered case this message is
+ * about.
+ */
+ bg = btrfs_lookup_block_group(fs_info, rbio->bioc->full_stripe_logical);
+ if (bg) {
+ covered = btrfs_is_stripe_meta_bg(bg);
+ btrfs_put_block_group(bg);
+ }
+ if (covered)
+ return;
btrfs_warn_rl(fs_info,
"read-modify-write of full stripe %llu: this block group is not covered by stripe_alloc, the raid56 write hole applies to it",
rbio->bioc->full_stripe_logical);