[Ocfs2-tools-devel] [PATCH 12/18] tunefs.ocfs2: Progress display for update-cluster-stack.

Joel Becker joel.becker at oracle.com
Mon Jan 5 18:33:48 PST 2009


Display the progress of the update-cluster-stack operation.

Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
 tunefs.ocfs2/op_update_cluster_stack.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tunefs.ocfs2/op_update_cluster_stack.c b/tunefs.ocfs2/op_update_cluster_stack.c
index 3ae1f93..2de7f11 100644
--- a/tunefs.ocfs2/op_update_cluster_stack.c
+++ b/tunefs.ocfs2/op_update_cluster_stack.c
@@ -31,6 +31,7 @@ static errcode_t update_cluster(ocfs2_filesys *fs)
 {
 	errcode_t ret;
 	struct o2cb_cluster_desc desc;
+	struct tools_progress *prog;
 
 	if (!tools_interact_critical(
 		"Updating on-disk cluster information "
@@ -42,6 +43,11 @@ static errcode_t update_cluster(ocfs2_filesys *fs)
 		))
 		return 0;
 
+	prog = tools_progress_start("Updating cluster stack",
+				    "stackinfo", 1);
+	if (!prog)
+		return TUNEFS_ET_NO_MEMORY;
+
 	ret = o2cb_running_cluster_desc(&desc);
 	if (!ret) {
 		tunefs_block_signals();
@@ -50,6 +56,9 @@ static errcode_t update_cluster(ocfs2_filesys *fs)
 		o2cb_free_cluster_desc(&desc);
 	}
 
+	tools_progress_step(prog, 1);
+	tools_progress_stop(prog);
+
 	return ret;
 }
 
-- 
1.5.6.5




More information about the Ocfs2-tools-devel mailing list