import qemu-kvm-6.2.0-20.module+el8.7.0+16905+efca5d32.2

This commit is contained in:
CentOS Sources 2022-11-08 05:57:35 -05:00 committed by Stepan Oksanichenko
parent f244cd3cfa
commit 97d5b9938f
2 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,61 @@
From c4cc9d30f656acb7fcdc4d3a4b4a9bb0a34aaf7d Mon Sep 17 00:00:00 2001
From: Yusuke Okada <okada.yusuke@jp.fujitsu.com>
Date: Thu, 18 Aug 2022 14:46:19 -0400
Subject: [PATCH] virtiofsd: use g_date_time_get_microsecond to get subsecond
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-MergeRequest: 223: 8.7.z: virtiofsd: use g_date_time_get_microsecond to get subsecond
RH-Bugzilla: 2132391
RH-Acked-by: German Maglione <None>
RH-Acked-by: Jano Tomko <None>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Commit: [1/1] bf1fe2785996ee9799ae23cc117598517749336c
The "%f" specifier in g_date_time_format() is only available in glib
2.65.2 or later. If combined with older glib, the function returns null
and the timestamp displayed as "(null)".
For backward compatibility, g_date_time_get_microsecond should be used
to retrieve subsecond.
In this patch the g_date_time_format() leaves subsecond field as "%06d"
and let next snprintf to format with g_date_time_get_microsecond.
Signed-off-by: Yusuke Okada <okada.yusuke@jp.fujitsu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20220818184618.2205172-1-yokada.996@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit f16d15c9276bd8f501f861c39cbd4adc812d0c1d)
---
tools/virtiofsd/passthrough_ll.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index b3d0674f6d..523d8fbe1e 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -3791,6 +3791,7 @@ static void setup_nofile_rlimit(unsigned long rlimit_nofile)
static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
{
g_autofree char *localfmt = NULL;
+ char buf[64];
if (current_log_level < level) {
return;
@@ -3803,9 +3804,11 @@ static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
fmt);
} else {
g_autoptr(GDateTime) now = g_date_time_new_now_utc();
- g_autofree char *nowstr = g_date_time_format(now, "%Y-%m-%d %H:%M:%S.%f%z");
+ g_autofree char *nowstr = g_date_time_format(now,
+ "%Y-%m-%d %H:%M:%S.%%06d%z");
+ snprintf(buf, 64, nowstr, g_date_time_get_microsecond(now));
localfmt = g_strdup_printf("[%s] [ID: %08ld] %s",
- nowstr, syscall(__NR_gettid), fmt);
+ buf, syscall(__NR_gettid), fmt);
}
fmt = localfmt;
}
--
2.31.1

View File

@ -83,7 +83,7 @@ Obsoletes: %1-rhev <= %{epoch}:%{version}-%{release}
Summary: QEMU is a machine emulator and virtualizer
Name: qemu-kvm
Version: 6.2.0
Release: 20%{?rcrel}%{?dist}.1
Release: 20%{?rcrel}%{?dist}.2
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
Epoch: 15
License: GPLv2 and GPLv2+ and CC-BY
@ -431,6 +431,8 @@ Patch165: kvm-scsi-generic-Fix-emulated-block-limits-VPD-page.patch
Patch166: kvm-i386-reset-KVM-nested-state-upon-CPU-reset.patch
# For bz#2116743 - [RHEL8.7] Guests in VMX root operation fail to reboot with QEMU's 'system_reset' command
Patch167: kvm-i386-do-kvm_put_msr_feature_control-first-thing-when.patch
# For bz#2132391 - [virtiofs] virtiofsd debug log's timestamp is NULL [rhel-8.7.0.z]
Patch168: kvm-virtiofsd-use-g_date_time_get_microsecond-to-get-sub.patch
BuildRequires: wget
BuildRequires: rpm-build
@ -1600,6 +1602,11 @@ sh %{_sysconfdir}/sysconfig/modules/kvm.modules &> /dev/null || :
%changelog
* Wed Oct 12 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-20.el8_7.2
- kvm-virtiofsd-use-g_date_time_get_microsecond-to-get-sub.patch [bz#2132391]
- Resolves: bz#2132391
([virtiofs] virtiofsd debug log's timestamp is NULL [rhel-8.7.0.z])
* Wed Sep 14 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-20.el8.1
- kvm-i386-reset-KVM-nested-state-upon-CPU-reset.patch [bz#2116743]
- kvm-i386-do-kvm_put_msr_feature_control-first-thing-when.patch [bz#2116743]