On Mon, Sep 09, 2013 at 03:57:17PM -0400, Josef Bacik wrote:
> On Mon, Sep 09, 2013 at 02:07:43PM -0500, Eric Sandeen wrote:
> > On 9/9/13 12:13 PM, Josef Bacik wrote:
> > David might have meant "001-bad-file-extent-bytenr.img" though.
> Oh yeah that may be good then.

Yes that's what I meant. I thought the number could be useful as a
shortcut additional to the human-readable part.

> > > Yeah I wasn't sure how I wanted to do this.  At first I thought about 
> > > making the
> > > fsck tester just make a loop device, but I didn't want to override 
> > > something if
> > > people were already using a loop device.  But maybe I'll just default to 
> > > using
> > > loop5 or something big like that and then if the user wants to change it 
> > > they
> > > can go into the script and change it themselves.  How does that sound?  
> > > Thanks,
> > 
> > Dumb question, can you just point btrfsck at the image itself w/o setting up
> > loopback?  i.e. do something like: 
> > 
> > # btrfs-image -r 001-bad-file-extent-bytenr.img test.img
> > # btrfsck --repair test.img
> 
> Huh, I'm not sure...yes it looks like it, well that solves that problem.
> Thanks,

If you need a blockdevice, you can use

$ losetup -f /the/file
(get a free loopdev)

$ losetup -j /the/file
/dev/loop2: ...

and parse the loop name from the output.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to