mbox series

[0/4] btrfs: fix a deadlock with reclaim during logging/log replay

Message ID cover.1718276261.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: fix a deadlock with reclaim during logging/log replay | expand

Message

Filipe Manana June 13, 2024, 11:05 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

Fix a deadlock when opening an inode during inode logging and log replay
due to a GFP_KERNEL allocation, reported by syzbot. The rest is just some
trivial cleanups. Details in the change logs.

Filipe Manana (4):
  btrfs: use NOFS context when getting inodes during logging and log replay
  btrfs: remove super block argument from btrfs_iget()
  btrfs: remove super block argument from btrfs_iget_path()
  btrfs: remove super block argument from btrfs_iget_locked()

 fs/btrfs/btrfs_inode.h      |  6 +++---
 fs/btrfs/defrag.c           |  2 +-
 fs/btrfs/export.c           |  4 ++--
 fs/btrfs/free-space-cache.c |  3 +--
 fs/btrfs/inode.c            | 24 ++++++++++-----------
 fs/btrfs/ioctl.c            |  3 +--
 fs/btrfs/relocation.c       |  4 ++--
 fs/btrfs/send.c             |  9 ++++----
 fs/btrfs/super.c            |  2 +-
 fs/btrfs/tree-log.c         | 43 ++++++++++++++++++++++++-------------
 10 files changed, 54 insertions(+), 46 deletions(-)

Comments

Johannes Thumshirn June 13, 2024, 2:04 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Josef Bacik June 13, 2024, 2:56 p.m. UTC | #2
On Thu, Jun 13, 2024 at 12:05:24PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Fix a deadlock when opening an inode during inode logging and log replay
> due to a GFP_KERNEL allocation, reported by syzbot. The rest is just some
> trivial cleanups. Details in the change logs.
> 
> Filipe Manana (4):
>   btrfs: use NOFS context when getting inodes during logging and log replay
>   btrfs: remove super block argument from btrfs_iget()
>   btrfs: remove super block argument from btrfs_iget_path()
>   btrfs: remove super block argument from btrfs_iget_locked()
> 

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef
David Sterba June 13, 2024, 9:10 p.m. UTC | #3
On Thu, Jun 13, 2024 at 12:05:24PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Fix a deadlock when opening an inode during inode logging and log replay
> due to a GFP_KERNEL allocation, reported by syzbot. The rest is just some
> trivial cleanups. Details in the change logs.
> 
> Filipe Manana (4):
>   btrfs: use NOFS context when getting inodes during logging and log replay
>   btrfs: remove super block argument from btrfs_iget()
>   btrfs: remove super block argument from btrfs_iget_path()
>   btrfs: remove super block argument from btrfs_iget_locked()

Reviewed-by: David Sterba <dsterba@suse.com>
Qu Wenruo June 13, 2024, 9:37 p.m. UTC | #4
在 2024/6/13 20:35, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> Fix a deadlock when opening an inode during inode logging and log replay
> due to a GFP_KERNEL allocation, reported by syzbot. The rest is just some
> trivial cleanups. Details in the change logs.
>
> Filipe Manana (4):
>    btrfs: use NOFS context when getting inodes during logging and log replay
>    btrfs: remove super block argument from btrfs_iget()
>    btrfs: remove super block argument from btrfs_iget_path()
>    btrfs: remove super block argument from btrfs_iget_locked()

Reviewed-by: Qu Wenruo <wqu@suse.com>

Just one question relied to the first patch.

Thanks,
Qu
>
>   fs/btrfs/btrfs_inode.h      |  6 +++---
>   fs/btrfs/defrag.c           |  2 +-
>   fs/btrfs/export.c           |  4 ++--
>   fs/btrfs/free-space-cache.c |  3 +--
>   fs/btrfs/inode.c            | 24 ++++++++++-----------
>   fs/btrfs/ioctl.c            |  3 +--
>   fs/btrfs/relocation.c       |  4 ++--
>   fs/btrfs/send.c             |  9 ++++----
>   fs/btrfs/super.c            |  2 +-
>   fs/btrfs/tree-log.c         | 43 ++++++++++++++++++++++++-------------
>   10 files changed, 54 insertions(+), 46 deletions(-)
>