* [PATCH] qga: Add log to guest-fsfreeze-thaw command
@ 2024-12-09 11:18 Konstantin Kostiuk
2024-12-09 11:30 ` Daniel P. Berrangé
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Kostiuk @ 2024-12-09 11:18 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P . Berrangé, Marc-André Lureau, Michael Roth,
Philippe Mathieu-Daudé
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/commands-posix.c | 3 +++
qga/commands-win32.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 636307bedf..ac8d150582 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -805,6 +805,9 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
int ret;
ret = qmp_guest_fsfreeze_do_thaw(errp);
+
+ slog("guest-fsthaw called");
+
if (ret >= 0) {
ga_unset_frozen(ga_state);
execute_fsfreeze_hook(FSFREEZE_HOOK_THAW, errp);
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 038beb8cfa..3a6f3ac7c5 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1272,6 +1272,8 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
qga_vss_fsfreeze(&i, false, NULL, errp);
+ slog("guest-fsthaw called");
+
ga_unset_frozen(ga_state);
return i;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] qga: Add log to guest-fsfreeze-thaw command
2024-12-09 11:18 [PATCH] qga: Add log to guest-fsfreeze-thaw command Konstantin Kostiuk
@ 2024-12-09 11:30 ` Daniel P. Berrangé
2024-12-09 11:40 ` Konstantin Kostiuk
0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrangé @ 2024-12-09 11:30 UTC (permalink / raw)
To: Konstantin Kostiuk
Cc: qemu-devel, Marc-André Lureau, Michael Roth,
Philippe Mathieu-Daudé
On Mon, Dec 09, 2024 at 01:18:17PM +0200, Konstantin Kostiuk wrote:
> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> ---
> qga/commands-posix.c | 3 +++
> qga/commands-win32.c | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 636307bedf..ac8d150582 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -805,6 +805,9 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
> int ret;
>
> ret = qmp_guest_fsfreeze_do_thaw(errp);
> +
> + slog("guest-fsthaw called");
If ret < 0, then thawing failed and surely it is potentially
unsafe to log ?
> +
> if (ret >= 0) {
> ga_unset_frozen(ga_state);
> execute_fsfreeze_hook(FSFREEZE_HOOK_THAW, errp);
> diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> index 038beb8cfa..3a6f3ac7c5 100644
> --- a/qga/commands-win32.c
> +++ b/qga/commands-win32.c
> @@ -1272,6 +1272,8 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
>
> qga_vss_fsfreeze(&i, false, NULL, errp);
>
> + slog("guest-fsthaw called");
> +
> ga_unset_frozen(ga_state);
> return i;
> }
> --
> 2.47.1
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qga: Add log to guest-fsfreeze-thaw command
2024-12-09 11:30 ` Daniel P. Berrangé
@ 2024-12-09 11:40 ` Konstantin Kostiuk
0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Kostiuk @ 2024-12-09 11:40 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Marc-André Lureau, Michael Roth,
Philippe Mathieu-Daudé
[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]
Best Regards,
Konstantin Kostiuk.
On Mon, Dec 9, 2024 at 1:30 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:
> On Mon, Dec 09, 2024 at 01:18:17PM +0200, Konstantin Kostiuk wrote:
> > Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> > ---
> > qga/commands-posix.c | 3 +++
> > qga/commands-win32.c | 2 ++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> > index 636307bedf..ac8d150582 100644
> > --- a/qga/commands-posix.c
> > +++ b/qga/commands-posix.c
> > @@ -805,6 +805,9 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
> > int ret;
> >
> > ret = qmp_guest_fsfreeze_do_thaw(errp);
> > +
> > + slog("guest-fsthaw called");
>
> If ret < 0, then thawing failed and surely it is potentially
> unsafe to log ?
>
>
Potentially yes, but we have similar in guest_fsfreeze_cleanup.
We print the log when qmp_guest_fsfreeze_thaw fails.
> > +
> > if (ret >= 0) {
> > ga_unset_frozen(ga_state);
> > execute_fsfreeze_hook(FSFREEZE_HOOK_THAW, errp);
> > diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> > index 038beb8cfa..3a6f3ac7c5 100644
> > --- a/qga/commands-win32.c
> > +++ b/qga/commands-win32.c
> > @@ -1272,6 +1272,8 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
> >
> > qga_vss_fsfreeze(&i, false, NULL, errp);
> >
> > + slog("guest-fsthaw called");
> > +
> > ga_unset_frozen(ga_state);
> > return i;
> > }
> > --
> > 2.47.1
> >
>
> With regards,
> Daniel
> --
> |: https://berrange.com -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o-
> https://www.instagram.com/dberrange :|
>
>
[-- Attachment #2: Type: text/html, Size: 3266 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-09 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 11:18 [PATCH] qga: Add log to guest-fsfreeze-thaw command Konstantin Kostiuk
2024-12-09 11:30 ` Daniel P. Berrangé
2024-12-09 11:40 ` Konstantin Kostiuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).