linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/3] btrfs: allow BTRFS_IOC_SNAP_DESTROY_V2 to remove ghost subvolume
Date: Tue, 20 Jul 2021 12:33:47 +0800	[thread overview]
Message-ID: <306e11d5-60c7-3a30-fd9c-deaddc4eb21d@gmx.com> (raw)
In-Reply-To: <20210720040542.GB10170@hungrycats.org>



On 2021/7/20 下午12:05, Zygo Blaxell wrote:
> On Mon, Jun 28, 2021 at 06:16:34PM +0800, Qu Wenruo wrote:
>> Since we're busting ghost subvolumes, the branch is now called
>> ghost_busters:
>> https://github.com/adam900710/linux/tree/ghost_busters
>>
>> The first two patches are just cleanup found during the development.
>>
>> The first is a missing check for subvolid range, the missing check
>> itself won't cause any harm, just returning -ENOENT from dentry lookup,
>> other than the expected -EINVAL.
>>
>> The 2nd is a super old dead comment from the early age of btrfs.
>>
>> The final patch is the real work to allow patched "btrfs subvolume delete -i"
>> to delete ghost subvolume.
>> Tested with the image dump of previous submitted btrfs-progs patchset.
>>
>> Qu Wenruo (3):
>>    btrfs: return -EINVAL if some user wants to remove uuid/data_reloc
>>      tree
>>    btrfs: remove dead comment on btrfs_add_dead_root()
>>    btrfs: allow BTRFS_IOC_SNAP_DESTROY_V2 to remove ghost subvolume
>
> I hit this bug on several machines while they were running 5.11.  The
> ghost subvols seem to occur naturally--I didn't change my usual workloads
> to get them, they just showed up in fairly normal snapshot rotation.

And there is no powerloss involved?

Then it's a much serious problem than I thought.

Thanks,
Qu
>
> They don't seem to occur on 5.10 (up to .46) or on 5.12 and later, but
> once they are created, they don't go away without using this patch to
> remove them.
>
> This patch does get rid of the ghost subvols after the fact, quite nicely.
>
> Some users on IRC have hit the same problem.  One was running Debian's
> backported 5.10, which doesn't fit the pattern of kernel versions I've
> observed, but maybe Debian backported something?
>
>>   fs/btrfs/ioctl.c       | 81 +++++++++++++++++++++++++++++++++++++++++-
>>   fs/btrfs/transaction.c |  7 ++--
>>   2 files changed, 84 insertions(+), 4 deletions(-)
>>
>> --
>> 2.32.0
>>
>

  reply	other threads:[~2021-07-20  4:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 10:16 [PATCH 0/3] btrfs: allow BTRFS_IOC_SNAP_DESTROY_V2 to remove ghost subvolume Qu Wenruo
2021-06-28 10:16 ` [PATCH 1/3] btrfs: return -EINVAL if some user wants to remove uuid/data_reloc tree Qu Wenruo
2021-06-28 10:59   ` Anand Jain
2021-06-28 10:16 ` [PATCH 2/3] btrfs: remove dead comment on btrfs_add_dead_root() Qu Wenruo
2021-06-28 11:01   ` Anand Jain
2021-06-28 10:16 ` [PATCH 3/3] btrfs: allow BTRFS_IOC_SNAP_DESTROY_V2 to remove ghost subvolume Qu Wenruo
2021-06-28 16:22   ` kernel test robot
2021-06-28 16:23   ` kernel test robot
2021-06-29  7:04   ` [kbuild] " Dan Carpenter
2021-06-30 13:16   ` David Sterba
2021-06-30 13:26     ` Qu Wenruo
2021-06-30 13:30       ` David Sterba
2021-06-30 13:35         ` Qu Wenruo
2021-07-20  4:05 ` [PATCH 0/3] " Zygo Blaxell
2021-07-20  4:33   ` Qu Wenruo [this message]
2021-07-20 15:41     ` Zygo Blaxell
2021-07-20 22:40       ` Qu Wenruo
2021-08-20  5:45 ` Qu Wenruo

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=306e11d5-60c7-3a30-fd9c-deaddc4eb21d@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).