btrfs-progs: print a message when enqueued operation is waiting

The enqueue option should let the user know that the expected operation
hasn't started yet and that it's waiting for another one. Although the
exclusive operations can take long, the two reason should be
distinguished.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-12-01 03:13:48 +01:00
parent c0592c5591
commit 8ea9a3e2c6
1 changed files with 5 additions and 0 deletions

View File

@ -1320,6 +1320,10 @@ int check_running_fs_exclop(int fd, enum exclusive_operation start, bool enqueue
get_fs_exclop_name(exclop));
ret = 1;
goto out;
} else {
pr_verbose(LOG_DEFAULT, "Waiting for another exclusive operation '%s' to finish ...",
get_fs_exclop_name(exclop));
fflush(stdout);
}
while (exclop > 0) {
@ -1348,6 +1352,7 @@ int check_running_fs_exclop(int fd, enum exclusive_operation start, bool enqueue
ret = 0;
}
}
pr_verbose(LOG_DEFAULT, " done\n");
out:
close(sysfs_fd);