public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: fix problem with balance recovery and snap delete
@ 2022-02-16 19:06 Josef Bacik
  2022-02-16 19:06 ` [PATCH 1/3] btrfs: clean deleted snapshots on mount Josef Bacik
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Josef Bacik @ 2022-02-16 19:06 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

Hello,

I found a problem where we'll try to add refs to blocks that no longer have
references because we started a relocation while we had a half deleted snapshot
in the file system.  This only occurs on a clean mount with a pending snapshot
delete in place.  I saw this in production but lost the file system before I
could test my patch.  However I reproduced it locally with some error injection.
Without my patch we'd fail to run delayed refs with the warning in the commit
message in the first patch, with my patch we mount and can use the file system.

The other two patches are just cleanups that i noticed while messing with this
code.  Thanks,

Josef

Josef Bacik (3):
  btrfs: clean deleted snapshots on mount
  btrfs: use btrfs_fs_info for deleting snapshots and cleaner
  btrfs: pass btrfs_fs_info to btrfs_recover_relocation

 fs/btrfs/ctree.h       |  2 +-
 fs/btrfs/disk-io.c     | 22 +++++++++++++++++-----
 fs/btrfs/relocation.c  |  5 ++---
 fs/btrfs/transaction.c |  4 ++--
 fs/btrfs/transaction.h |  2 +-
 5 files changed, 23 insertions(+), 12 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-17 11:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-16 19:06 [PATCH 0/3] btrfs: fix problem with balance recovery and snap delete Josef Bacik
2022-02-16 19:06 ` [PATCH 1/3] btrfs: clean deleted snapshots on mount Josef Bacik
2022-02-17 11:53   ` Filipe Manana
2022-02-16 19:06 ` [PATCH 2/3] btrfs: use btrfs_fs_info for deleting snapshots and cleaner Josef Bacik
2022-02-16 19:06 ` [PATCH 3/3] btrfs: pass btrfs_fs_info to btrfs_recover_relocation Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox