From 8ea9a3e2c672fdecbeb512f2bc858673b3c35719 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 1 Dec 2023 03:13:48 +0100 Subject: [PATCH] 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 --- common/utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/utils.c b/common/utils.c index 0c2fa8fe..035f2705 100644 --- a/common/utils.c +++ b/common/utils.c @@ -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);