Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH v5.10] btrfs: fix deadlock when cloning inline extents and using qgroups
Date: Tue, 29 Jul 2025 15:49:57 -0400	[thread overview]
Message-ID: <1753812619-d536d06d@stable.kernel.org> (raw)
In-Reply-To: <20250729050753.98449-1-shivani.agarwal@broadcom.com>

[ 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: f9baa501b4fd6962257853d46ddffbc21f27e344

WARNING: Author mismatch between patch and upstream commit:
Backport author: Shivani Agarwal <shivani.agarwal@broadcom.com>
Commit author: Filipe Manana <fdmanana@suse.com>

Status in newer kernel trees:
6.15.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 (exact SHA1)

Note: The patch differs from the upstream commit:
---
1:  f9baa501b4fd ! 1:  0c0156bba7e3 btrfs: fix deadlock when cloning inline extents and using qgroups
    @@ Metadata
      ## Commit message ##
         btrfs: fix deadlock when cloning inline extents and using qgroups
     
    +    commit f9baa501b4fd6962257853d46ddffbc21f27e344 upstream.
    +
         There are a few exceptional cases where cloning an inline extent needs to
         copy the inline extent data into a page of the destination inode.
     
    @@ Commit message
         Signed-off-by: Filipe Manana <fdmanana@suse.com>
         Reviewed-by: David Sterba <dsterba@suse.com>
         Signed-off-by: David Sterba <dsterba@suse.com>
    +    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    +    [Shivani: Modified to apply on 5.10.y, Passed false to
    +    btrfs_start_delalloc_flush() in fs/btrfs/transaction.c file to
    +    maintain the default behaviour]
    +    Signed-off-by: Shivani Agarwal <shivani.agarwal@broadcom.com>
     
      ## fs/btrfs/ctree.h ##
     @@ fs/btrfs/ctree.h: int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
    - 			       struct btrfs_inode *inode, u64 new_size,
    + 			       struct inode *inode, u64 new_size,
      			       u32 min_type);
      
     -int btrfs_start_delalloc_snapshot(struct btrfs_root *root);
     +int btrfs_start_delalloc_snapshot(struct btrfs_root *root, bool in_reclaim_context);
    - int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
    + int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, u64 nr,
      			       bool in_reclaim_context);
      int btrfs_set_extent_delalloc(struct btrfs_inode *inode, u64 start, u64 end,
     
    @@ fs/btrfs/inode.c: int btrfs_start_delalloc_snapshot(struct btrfs_root *root)
     +	return start_delalloc_inodes(root, &wbc, true, in_reclaim_context);
      }
      
    - int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
    + int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, u64 nr,
     
      ## fs/btrfs/ioctl.c ##
     @@ fs/btrfs/ioctl.c: static noinline int btrfs_mksnapshot(const struct path *parent,
    @@ fs/btrfs/send.c: static int flush_delalloc_roots(struct send_ctx *sctx)
      		if (ret)
      			return ret;
      		btrfs_wait_ordered_extents(root, U64_MAX, 0, U64_MAX);
    +
    + ## fs/btrfs/transaction.c ##
    +@@ fs/btrfs/transaction.c: static inline int btrfs_start_delalloc_flush(struct btrfs_trans_handle *trans)
    + 		list_for_each_entry(pending, head, list) {
    + 			int ret;
    + 
    +-			ret = btrfs_start_delalloc_snapshot(pending->root);
    ++			ret = btrfs_start_delalloc_snapshot(pending->root, false);
    + 			if (ret)
    + 				return ret;
    + 		}

---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| origin/linux-5.10.y       | Success     | Success    |

      reply	other threads:[~2025-07-29 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  5:07 [PATCH v5.10] btrfs: fix deadlock when cloning inline extents and using qgroups Shivani Agarwal
2025-07-29 19:49 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1753812619-d536d06d@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox