btrfs-progs: optionally restore metadata
Subsystems (2)
PATCH v2 1/1 btrfs-progs: optionally restore metadata
As long as the inode is intact, the file metadata can be restored. Directory data is restored at the end of search_dir. Errors are checked and returned, unless ignore_errors is requested.
--- Documentation/btrfs-restore.txt | 3 ++ cmds-restore.c | 114 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 1 deletion(-)
Documentation/btrfs-restore.txt +3 -0
@@ -29,6 +29,9 @@ get snapshots, btrfs restore skips snapshots in default. -x:: get extended attributes. +-m|--metadata:: +set owner, permissions, access time and modify time. + -v:: verbose.
cmds-restore.c +113 -1
177 lines not on this page · raw message
Signature · 1 line
2.1.4
David Sterba
AppliedQuoted 5 lines · Dan Merillat
As long as the inode is intact, the file metadata can be restored. Directory data is restored at the end of
search_dir. Errors are checked and returned, unlessignore_errorsis requested.Signed-off-by Dan Merillat <[email protected]>
Applied, thanks.
In future patches, please stick to the coding style used in progs ([1]), I've fixed spacing around "=", comments and moved declarations before the statements.
[1] https://www.kernel.org/doc/Documentation/CodingStyle
cmds-restore.c int cmd_restore(int argc, char **argv) · line 1279
Quoted 6 lines
cmds-restore.c +2
-0@@ -1168,10 +1275,12 @@ int cmd_restore(int argc, char **argv)static const struct option long_options[] = { {"path-regex" ,1 ,NULL ,256 }, {"dry-run" ,0 ,NULL ,'D' }, + {"metadata" ,0 ,NULL ,'m' }, + {"debug-regex" ,0 ,NULL ,257 },
This was unused and I've removed it.
Quoted 7 lines · David Sterba
Applied, thanks.
In future patches, please stick to the coding style used in progs ([1]), I've fixed spacing around "=", comments and moved declarations before the statements.
I'll try to clean it up more next time around.
Quoted 8 lines
cmds-restore.c int cmd_restore(int argc, char **argv) · line 1279
Quoted 6 lines
cmds-restore.c +2
-0@@ -1168,10 +1275,12 @@ int cmd_restore(int argc, char **argv)static const struct option long_options[] = { {"path-regex" ,1 ,NULL ,256 }, {"dry-run" ,0 ,NULL ,'D' }, + {"metadata" ,0 ,NULL ,'m' }, + {"debug-regex" ,0 ,NULL ,257 },This was unused and I've removed it.
That's cruft and I thought I removed it from the patch, sorry.
Got your symlink code, I'll look at that today.