Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Joe Salmeri <jmscdba@gmail.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: Btrfs progs release 6.6.1
Date: Thu, 9 Nov 2023 15:38:30 +0100	[thread overview]
Message-ID: <20231109143830.GT11264@twin.jikos.cz> (raw)
In-Reply-To: <be0c51ba-86bd-44e7-884a-6cfccfa76184@gmail.com>

On Sun, Nov 05, 2023 at 06:40:45PM -0500, Joe Salmeri wrote:
> Is there a way for btrfs to remove that directory entry which points to 
> the inode that does not exist ?
> 
> After I removed all the @home snapshots, that got rid of all of them 
> items that btrfs check reports EXCEPT for the one in the @home subvolume 
> so deleting a subvolume can remove the items, but I really don't want to 
> have to delete and restore the @home subvolume to fix it.
> 
> And since then btrfs has created new timeline snapshots for @home so 
> those obviously have the same issue as the ones I deleted but that 
> problem would go away if I can find a way to remove the offending item 
> in the @home subvolume.
> 
> Is there some way to remove that item ?
> 
> Running "ls -al /home/denise/.config/skypeforlinux/blob_storage/" also 
> shows that offending item:
> 
>      drwx------ 1 denise joe-denise   72 Nov  1 22:49 .
>      drwxr-xr-x 1 denise joe-denise 3.7K Nov  1 20:07 ..
>      d????????? ? ?      ?             ?            ? 02179466-b671-4313-8fa5-0eb87d716f92
> 
> I tried removing /home/denise/.config/skypeforlinux/blob_storage/ since 
> that is the folder that contains the 
> i02179466-b671-4313-8fa5-0eb87d716f92 directory item but that fails
> 
>      rm -rf /home/denise/.config/skypeforlinux/blob_storage/
> /usr/bin/rm: cannot remove 
> '/home/denise/.config/skypeforlinux/blob_storage/': Directory not empty

On a mounted filesystem this is not possible, also I'm not sure what
exactly is the problem there. It looks like the directory entry is valid
(thus it shows the file name) but the pointer to the inode is either
damaged (cosmic rays) or the inode is gone for some reason.

The 'btrfs check' should be able to guess what's the extent of the
dirent/inode desynchronization and remove the entry eventually, but as
always 'check + repair' should be used with care and when absolutely
sure that it's not making the things worse. Some cross checks could be
possible, e.g. look up the relevant data in the tree dump.

  reply	other threads:[~2023-11-09 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05 22:20 Btrfs progs release 6.6.1 David Sterba
     [not found] ` <aa605999-708c-4b8c-a05c-78fd2cc6b5b2@gmail.com>
2023-11-05 23:40   ` Joe Salmeri
2023-11-09 14:38     ` David Sterba [this message]
2023-11-10 15:46       ` Joe Salmeri

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=20231109143830.GT11264@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=jmscdba@gmail.com \
    --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