All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
@ 2020-01-21  7:32 Xiao Yang
  2020-01-21 10:02 ` Dr. David Alan Gilbert
  2020-01-28  9:52 ` Eryu Guan
  0 siblings, 2 replies; 5+ messages in thread
From: Xiao Yang @ 2020-01-21  7:32 UTC (permalink / raw)
  To: virtio-fs

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 <yangx.jy@cn.fujitsu.com>
---
 tools/virtiofsd/passthrough_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 57f58aef26..ff34e77a23 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -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) {
-- 
2.21.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
  2020-01-21  7:32 [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr() Xiao Yang
@ 2020-01-21 10:02 ` Dr. David Alan Gilbert
  2020-01-21 10:45   ` Xiao Yang
  2020-01-28  9:52 ` Eryu Guan
  1 sibling, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2020-01-21 10:02 UTC (permalink / raw)
  To: Xiao Yang; +Cc: virtio-fs

* Xiao Yang (yangx.jy@cn.fujitsu.com) 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 <yangx.jy@cn.fujitsu.com>
> ---
>  tools/virtiofsd/passthrough_ll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> index 57f58aef26..ff34e77a23 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -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

> -- 
> 2.21.0
> 
> 
> 
> 
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
  2020-01-21 10:02 ` Dr. David Alan Gilbert
@ 2020-01-21 10:45   ` Xiao Yang
  2020-01-21 11:55     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao Yang @ 2020-01-21 10:45 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: virtio-fs

On 2020/1/21 18:02, Dr. David Alan Gilbert wrote:
> 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.
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
> Dave





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
  2020-01-21 10:45   ` Xiao Yang
@ 2020-01-21 11:55     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2020-01-21 11:55 UTC (permalink / raw)
  To: Xiao Yang; +Cc: virtio-fs

* Xiao Yang (yangx.jy@cn.fujitsu.com) wrote:
> On 2020/1/21 18:02, Dr. David Alan Gilbert wrote:
> > 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.
> 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.

> BTW: Perhaps, log_func() needs to call g_free() after using
> g_strdup_printf().

No because the pointer is declared with g_autofree - it does the
free automatically.

Dave

> Thanks,
> Xiao Yang
> > Dave
> 
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr()
  2020-01-21  7:32 [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr() Xiao Yang
  2020-01-21 10:02 ` Dr. David Alan Gilbert
@ 2020-01-28  9:52 ` Eryu Guan
  1 sibling, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2020-01-28  9:52 UTC (permalink / raw)
  To: Xiao Yang; +Cc: virtio-fs

On Tue, Jan 21, 2020 at 03:32:36PM +0800, Xiao Yang 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 <yangx.jy@cn.fujitsu.com>
> ---
>  tools/virtiofsd/passthrough_ll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> index 57f58aef26..ff34e77a23 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -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!

Reviewed-by: Eryu Guan <eguan@linux.alibaba.com>

>  
>      if (inode->is_symlink) {
> -- 
> 2.21.0
> 
> 
> 
> 
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-28  9:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  7:32 [Virtio-fs] [PATCH] virtiofsd/passthrough_ll: Fix wrong output format in lo_setxattr() Xiao Yang
2020-01-21 10:02 ` Dr. David Alan Gilbert
2020-01-21 10:45   ` Xiao Yang
2020-01-21 11:55     ` Dr. David Alan Gilbert
2020-01-28  9:52 ` Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.