mbox series

[v2,0/2] btrfs: subvolume deletion vs. snapshot fixes

Message ID cover.1704397423.git.osandov@fb.com (mailing list archive)
Headers show
Series btrfs: subvolume deletion vs. snapshot fixes | expand

Message

Omar Sandoval Jan. 4, 2024, 7:48 p.m. UTC
From: Omar Sandoval <osandov@fb.com>

Hi,

This small series fixes a couple of bugs that can happen when trying to
snapshot a deleted subvolume. Patch 1 fixes a filesystem abort that we
hit in production. Patch 2 fixes another issue that Sweet Tea spotted
when reviewing patch 1.

An fstest was sent previously [1].

Thanks!

Changes from v1 [2]:

- Rebased on latest misc-next.
- Added patch 2.

1: https://lore.kernel.org/linux-btrfs/62415ffc97ff2db4fa65cdd6f9db6ddead8105cd.1703010806.git.osandov@osandov.com/
2: https://lore.kernel.org/linux-btrfs/068014bd3e90668525c295660862db2932e25087.1703010314.git.osandov@fb.com/

Omar Sandoval (2):
  btrfs: don't abort filesystem when attempting to snapshot deleted
    subvolume
  btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of
    subvolume being deleted

 fs/btrfs/inode.c | 22 +++++++++++++---------
 fs/btrfs/ioctl.c |  3 +++
 2 files changed, 16 insertions(+), 9 deletions(-)

Comments

Sweet Tea Dorminy Jan. 5, 2024, 8:11 p.m. UTC | #1
On 1/4/24 14:48, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Hi,
> 
> This small series fixes a couple of bugs that can happen when trying to
> snapshot a deleted subvolume. Patch 1 fixes a filesystem abort that we
> hit in production. Patch 2 fixes another issue that Sweet Tea spotted
> when reviewing patch 1.
> 
> An fstest was sent previously [1].
> 
> Thanks!
> 
> Changes from v1 [2]:
> 
> - Rebased on latest misc-next.
> - Added patch 2.
> 
> 1: https://lore.kernel.org/linux-btrfs/62415ffc97ff2db4fa65cdd6f9db6ddead8105cd.1703010806.git.osandov@osandov.com/
> 2: https://lore.kernel.org/linux-btrfs/068014bd3e90668525c295660862db2932e25087.1703010314.git.osandov@fb.com/
> 
> Omar Sandoval (2):
>    btrfs: don't abort filesystem when attempting to snapshot deleted
>      subvolume
>    btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of
>      subvolume being deleted
> 
>   fs/btrfs/inode.c | 22 +++++++++++++---------
>   fs/btrfs/ioctl.c |  3 +++
>   2 files changed, 16 insertions(+), 9 deletions(-)
> 

For the series:
Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Anand Jain Jan. 6, 2024, 12:58 a.m. UTC | #2
On 1/5/24 03:48, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Hi,
> 
> This small series fixes a couple of bugs that can happen when trying to
> snapshot a deleted subvolume. Patch 1 fixes a filesystem abort that we
> hit in production. Patch 2 fixes another issue that Sweet Tea spotted
> when reviewing patch 1.
> 
> An fstest was sent previously [1].
> 
> Thanks!
> 
> Changes from v1 [2]:
> 
> - Rebased on latest misc-next.
> - Added patch 2.
> 
> 1: https://lore.kernel.org/linux-btrfs/62415ffc97ff2db4fa65cdd6f9db6ddead8105cd.1703010806.git.osandov@osandov.com/
> 2: https://lore.kernel.org/linux-btrfs/068014bd3e90668525c295660862db2932e25087.1703010314.git.osandov@fb.com/
> 
> Omar Sandoval (2):
>    btrfs: don't abort filesystem when attempting to snapshot deleted
>      subvolume
>    btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of
>      subvolume being deleted
> 

Looks good.

Reviewed-by: Anand Jain <anand.jain@oracle.com>


Thx, Anand


>   fs/btrfs/inode.c | 22 +++++++++++++---------
>   fs/btrfs/ioctl.c |  3 +++
>   2 files changed, 16 insertions(+), 9 deletions(-)
>
David Sterba Jan. 8, 2024, 7:39 p.m. UTC | #3
On Thu, Jan 04, 2024 at 11:48:45AM -0800, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Hi,
> 
> This small series fixes a couple of bugs that can happen when trying to
> snapshot a deleted subvolume. Patch 1 fixes a filesystem abort that we
> hit in production. Patch 2 fixes another issue that Sweet Tea spotted
> when reviewing patch 1.
> 
> An fstest was sent previously [1].
> 
> Thanks!
> 
> Changes from v1 [2]:
> 
> - Rebased on latest misc-next.
> - Added patch 2.
> 
> 1: https://lore.kernel.org/linux-btrfs/62415ffc97ff2db4fa65cdd6f9db6ddead8105cd.1703010806.git.osandov@osandov.com/
> 2: https://lore.kernel.org/linux-btrfs/068014bd3e90668525c295660862db2932e25087.1703010314.git.osandov@fb.com/
> 
> Omar Sandoval (2):
>   btrfs: don't abort filesystem when attempting to snapshot deleted
>     subvolume
>   btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of
>     subvolume being deleted

Added to misc-next, thanks.