[PATCH 16/21] Add sync before unmount in debugfs unmount command
Valerie Aurora
val at versity.com
Tue Feb 11 13:19:13 PST 2025
Syncing before unmount prevents a lot of race conditions during
shutdown (but is not a complete solution to clean shutdown).
Signed-off-by: Valerie Aurora <val at versity.com>
---
cli/debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cli/debugfs.c b/cli/debugfs.c
index b134026..58f01b6 100644
--- a/cli/debugfs.c
+++ b/cli/debugfs.c
@@ -227,7 +227,9 @@ static void debugfs_thread(struct thread *thr, void *arg)
break;
}
- ret = 0;
+ ret = ngnfs_block_sync(ctx->nfi);
+ if (ret < 0)
+ printf("final sync error: "ENOF"\n", ENOA(-ret));
out:
free(line);
free(line_argv);
--
2.48.1
More information about the ngnfs-devel
mailing list