virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
PATCH 1/1 virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
Actual debug output:
-------------------------------
[2778114403742] [ID: 00000033] lo_setxattr(ino=93998909307364[2778114466291] [ID: 00000033] unique: 56, success, outsize: 16
-------------------------------
Correct debug output:
-------------------------------
383 [2341816212531] [ID: 00000098] lo_setxattr(ino=3, name=user.test value=test size=4)
-------------------------------
--- tools/virtiofsd/passthrough_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/virtiofsd/passthrough_ll.c +1 -1
@@ -2528,7 +2528,7 @@ static void lo_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, goto out; } -fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64, +fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64", name=%s value=%s size=%zd)\n" , ino, name, value, size);if (inode->is_symlink) {
Signature · 1 line
2.21.0
Quoted 20 lines · * Xiao Yang ([email protected]) wrote:
Actual debug output:
-------------------------------
[2778114403742] [ID: 00000033] lo_setxattr(ino=93998909307364[2778114466291] [ID: 00000033] unique: 56, success, outsize: 16
-------------------------------
Correct debug output:
-------------------------------
383 [2341816212531] [ID: 00000098]lo_setxattr(ino=3, name=user.test value=test size=4)
-------------------------------Fixes 63bc560920ad ("virtiofsd: print log only when priority is high enough)"Signed-off-by Xiao Yang <[email protected]>--- tools/virtiofsd/passthrough_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/virtiofsd/passthrough_ll.c +0
-0
tools/virtiofsd/passthrough_ll.c static void lo_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, · line 2534
Quoted 8 lines
tools/virtiofsd/passthrough_ll.c +1
-1@@ -2528,7 +2528,7 @@ static void lo_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, goto out; } -fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64, +fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64", name=%s value=%s size=%zd)\n" , ino, name, value, size);if (inode->is_symlink) {
Thank you for the fix! I think we need to mark fuse_log as being printf format so hopefully it will spot more of these errors automatically.
Dave
Quoted 10 lines
Signature · 9 lines
2.21.0 _______________________________________________ Virtio-fs mailing list [email protected] https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 2 lines · Dr. David Alan Gilbert
Thank you for the fix! I think we need to mark
fuse_logas being printf format so hopefully it will spot more of these errors automatically.
Hi Dave,
Do you perfer to write output to stdout rather than stderr? right?(e.g. replace vfprintf with vprintf?)
BTW: Perhaps, log_func() needs to call g_free() after using g_strdup_printf().
Thanks,
Xiao Yang
Quoted 1 line
Dave
Quoted 7 lines · * Xiao Yang ([email protected]) wrote:
Quoted 2 lines · Dr. David Alan Gilbert
Thank you for the fix! I think we need to mark
fuse_logas being printf format so hopefully it will spot more of these errors automatically.Hi Dave,
Do you perfer to write output to stdout rather than stderr? right?(e.g. replace vfprintf with vprintf?)
No, I think it's OK as is.
Quoted 2 lines
BTW: Perhaps,
log_func()needs to callg_free()after usingg_strdup_printf().
No because the pointer is declared with g_autofree - it does the free automatically.
Dave
Quoted 6 lines
Thanks,
Xiao YangQuoted 1 line
Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 20 lines · Xiao Yang
Actual debug output:
-------------------------------
[2778114403742] [ID: 00000033] lo_setxattr(ino=93998909307364[2778114466291] [ID: 00000033] unique: 56, success, outsize: 16
-------------------------------
Correct debug output:
-------------------------------
383 [2341816212531] [ID: 00000098]lo_setxattr(ino=3, name=user.test value=test size=4)
-------------------------------Fixes 63bc560920ad ("virtiofsd: print log only when priority is high enough)"Signed-off-by Xiao Yang <[email protected]>--- tools/virtiofsd/passthrough_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/virtiofsd/passthrough_ll.c +0
-0
tools/virtiofsd/passthrough_ll.c static void lo_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, · line 2532
Quoted 6 lines
tools/virtiofsd/passthrough_ll.c +1
-1@@ -2528,7 +2528,7 @@ static void lo_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, goto out; } -fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64, +fuse_log (FUSE_LOG_DEBUG ,"lo_setxattr(ino=%" PRIu64", name=%s value=%s size=%zd)\n" , ino, name, value, size);
Ah, my bad, thanks for the fix!
Quoted 12 lines
tools/virtiofsd/passthrough_ll.c +0
-0if (inode->is_symlink) {Signature · 9 lines
2.21.0 _______________________________________________ Virtio-fs mailing list [email protected] https://www.redhat.com/mailman/listinfo/virtio-fs