On 07/12/2016 05:40 PM, Goffredo Baroncelli wrote:
Hi All,
the enclosed patch adds a new btrfs sub command: "btrfs inspect physical-find".
The aim of this new command is to show the physical placement on the disk of a file.
Currently it handles all the profiles (single, dup, raid1/10/5/6).
I develop this command in order to show some bug in btrfs RAID5 profile (see
next email).
I've done this manually from time to time, and love the idea of having a
helper for it. Can I talk you into adding a way to save the contents of
the block without having to use dd? btrfs-map-logical does this now,
but not via the search ioctl and not by filename.
say:
btrfs inspect physical-find -c <copy number> -o <output file> <filename>
offset
Looks like you've open coded btrfs_map_logical() below, getting output
from the search ioctl. Dave might want that in a more centralized place.
Also, please turn:
for(;;)
if (foo) {
statements
}
Into
for(;;) {
if (foo) {
statements
}
}
I find that much less error prone.
-chris
--
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