Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uprestore: "We seem to be looping" can get lost #59
Comments
|
Blocking for user input during a restore is a bad idea anyway IMHO. Files with a lot of churn like logs and databases can easily hit the current loop counter limit. |
|
if the checksums are correct, why report it at all? |
|
A hypothetical software bug could have created a valid circular loop in the filesystem? |
|
unlike the quite common hardware failure? if software bug really is a possibility, provide a switch for a last resort attempt, but if everything works exactly as designed on the software side, there's no point in bothering the user |
|
|
|
is the documentation outdated then? https://btrfs.wiki.kernel.org/index.php/Btrfsck
|
|
This issue still exists in 5.1. *static enum loop_response ask_to_continue(const char file) in https://github.com/kdave/btrfs-progs/blob/master/cmds-restore.c ; probably need to add a static int as a boolean to add a 4th option. |
when
btrfs restoreis run with output redirection (which i'd assume not to be uncommon due to the amount of output), the "We seem to be looping" message can get lost in the buffers. (the operator would be confused by the lack of progress, but not see any indication of a question being asked in the logs of stdout or stderr; i only found the issue because i straced the presumably hanging process).a
fflush(stdout)after theagain:jump mark in cmds-restore.c should do the trick. it might be worth considering to write the messages (the question and the loop question) to stderr instead, which afaik should be unbuffered anyway.