All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Michal Soltys <nozo@drutsystem.com>
Cc: Carsten Aulbert <carsten.aulbert@aei.mpg.de>, xfs@oss.sgi.com
Subject: Re: Map a disk LBA to filename?
Date: Tue, 28 Oct 2008 10:35:16 +1100	[thread overview]
Message-ID: <20081027233516.GG4985@disturbed> (raw)
In-Reply-To: <4905BC13.3030402@drutsystem.com>

On Mon, Oct 27, 2008 at 02:03:15PM +0100, Michal Soltys wrote:
> Carsten Aulbert wrote:
>>
>> Dave Chinner wrote:
>>> Use xfs_bmap to find the location on disk of the extents in each
>>> file. Recurse over the filesystem until you find the file that owns
>>> the block that went bad.
>>
>> Sounds like a tedious but doable route to take.
>>
>
> Wouldn't something like (under xfs_db) :
>
> getblock -b #block -n
> ncheck -i #inode
>
> where required #inode is reported by getblock
>
> do the thing ?

Blockget - yes it will. It just does the traversal internally to
build the mapping. With large filesystems xfs_db can run out of
memory building the mapping, which is why I've used the
explicit traverse+xfs_bmap method in the past....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2008-10-27 23:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 11:20 Map a disk LBA to filename? Carsten Aulbert
2008-10-27 11:49 ` Dave Chinner
2008-10-27 12:31   ` Carsten Aulbert
2008-10-27 13:03     ` Michal Soltys
2008-10-27 13:54       ` Carsten Aulbert
2008-10-27 15:56         ` Michal Soltys
2008-10-27 23:35       ` Dave Chinner [this message]
2008-10-28  7:11         ` Carsten Aulbert
2008-10-28  7:21           ` Dave Chinner
2008-10-28  7:38             ` Carsten Aulbert
2008-10-28  7:52               ` KELEMEN Peter
2008-10-28  9:14               ` Carsten Aulbert
2008-10-28  9:38                 ` KELEMEN Peter
2008-10-28  9:52                   ` Justin Piszcz
2008-10-30  5:23                   ` Dave Chinner
2008-10-28  9:51                 ` Michal Soltys

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=20081027233516.GG4985@disturbed \
    --to=david@fromorbit.com \
    --cc=carsten.aulbert@aei.mpg.de \
    --cc=nozo@drutsystem.com \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.