Skip to contentSkip to conversation

btrfs-progs: optionally restore metadata

PATCH In review Dan Merillat 2 participants 2 messages Apr 21, 2015 – Apr 22, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

v2 cover btrfs-progs: optionally restore metadata

Changes since v1:

* Documented in the manpage
* Added to usage() for btrfs restore
* Made it an optional flag (-m/--restore-metadata)
* Use endian-safe macros to access the on-disk data.
* Restore the proper mtime instead of atime twice.
* Restore owner and mode
* Restore metadata for directories as well as plain files.
* Since it's now explicitly requested, errors are fatal unless ignore_errors is requested.

I tested this on the array I'm restoring, it looks sane to me.

Thanks to Noah Massey for the patch review, and Duncan for the prompt to add owner/permissions to the patch.

Symlinks and hardlinks are beyond the scope of these changes, I'll look into them if this looks good to everyone.

#1 lore raw
Quoted 2 lines · Dan Merillat

Symlinks and hardlinks are beyond the scope of these changes, I'll look into them if this looks good to everyone.

That would be appreciated. I'll send you a POC code to dump the symlinks, it's missing the actual file creation and commandline interface etc.