From e74d6cbd31322dc2771bdb5b116c8dbafb41c242 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 25 Apr 2024 17:48:52 +0400 Subject: migrate: improve "does not have correct st_dev" error message Better explain which st_dev value was expected and which was found and give a hint to why this mismatch might have occurred. --- c_src/cmd_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/c_src/cmd_migrate.c b/c_src/cmd_migrate.c index 5ac326dd..534b06e3 100644 --- a/c_src/cmd_migrate.c +++ b/c_src/cmd_migrate.c @@ -451,7 +451,8 @@ static void copy_dir(struct copy_fs_state *s, char *child_path = mprintf("%s/%s", src_path, d->d_name); if (stat.st_dev != s->dev) - die("%s does not have correct st_dev!", child_path); + die("%s does not have correct st_dev: expected %d, but got %d, " + "does it reside on separate filesystem?", child_path, s->dev, stat.st_dev); u64 *dst_inum = S_ISREG(stat.st_mode) ? genradix_ptr_alloc(&s->hardlinks, stat.st_ino, GFP_KERNEL) -- cgit v1.2.3-70-g09d2