linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Backref walking utilities
@ 2011-05-23  9:53 liubo
  2011-05-23 10:02 ` Arne Jansen
  0 siblings, 1 reply; 5+ messages in thread
From: liubo @ 2011-05-23  9:53 UTC (permalink / raw)
  To: Chris Mason; +Cc: Linux Btrfs

Hi,

As one of my plans, I'm going to take this project over unless someone has been working on it.

>From wiki, quote:
    Backref walking utilities

    Given a block number on a disk, the Btrfs metadata can find all the files and directories
    that use or care about that block.  Some utilities to walk these back refs and print the
    results would help debug corruptions.

    Given an inode, the Btrfs metadata can find all the directories that point to the inode.
    We should have utils to walk these back refs as well. 
end quote.

And I have some thoughts to share with you:

    - Clearly, this is going to be another command.  Just like the command "btrfs-debug-tree",
      btrfs-walk-backref also needs to be able to track btrfs's metadata in
          a) the offline situation (at a umount state), or
          b) the corrupted situation.

    - For block number, the main goal is to find relative extent backrefs.  When it comes to
      those shared blocks, maybe things will be more complex.

    - For inode, the main goal is to find relative inode refs.  And we should be cautious about
      a) an inode with hard links, b) snapshot.

Did I miss or misunderstand something?  Any comments are welcomed. :)

thanks,
liubo

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

end of thread, other threads:[~2011-05-26  1:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23  9:53 Backref walking utilities liubo
2011-05-23 10:02 ` Arne Jansen
2011-05-23 10:15   ` Hugo Mills
2011-05-25 15:08   ` Jan Schmidt
2011-05-26  1:51     ` liubo

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).