[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] qemu-ga: generate missing stubs for fsfreeze
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-ppc] [PATCH] qemu-ga: generate missing stubs for fsfreeze |
Date: |
Tue, 17 Apr 2012 13:54:49 -0300 |
On Tue, 17 Apr 2012 10:15:03 -0500
Michael Roth <address@hidden> wrote:
> On Tue, Apr 17, 2012 at 11:44:39AM -0300, Luiz Capitulino wrote:
> > On Fri, 13 Apr 2012 21:07:36 -0500
> > Michael Roth <address@hidden> wrote:
> >
> > > When linux-specific commands (including guest-fsfreeze-*) were
> > > consolidated
> > > under defined(__linux__), we forgot to account for the case where
> > > defined(__linux__) && !defined(FIFREEZE). As a result stubs are no longer
> > > being generated on linux hosts that don't have FIFREEZE support. Fix
> > > this.
> > >
> > > Signed-off-by: Michael Roth <address@hidden>
> >
> > Looks good to me, but I'm honestly a bit confused with the number of ifdefs
> > we
> > have in this file. I think it's possible to re-organize them, but maybe it's
> > best to move the linux specific stuff to its own file.
> >
>
> Yah, it was actually pretty nice and organized prior to this patch.
I think there's room for improvement. Today we have:
#if defined(__linux__)
-> includes
#if defined(__linux__) && defined(FIREEZE)
#defined CONFIG_FSFREEZE
#endif
#endif
#if defined(__linux__)
static void reopen_fd_to_null(int fd);
#endif
-> non linux-specific code
#if defined(__linux__)
#if defined(CONFIG_FSFREEZE)
-> fsfreeze functions
#endif CONFIG_FSFREEZE
-> linux specific functions
#else /* !defined(__linux__) */
-> fsfree & suspend stubs
#endif
I think we could have:
-> non-linux code
#if defined(__linux__)
-> includes
static void reopen_fd_to_null(int fd)
-> linux specific functions
#if defined(FIREEZE)
-> fsfreeze functions
#else /* ! defined(FIREEZE) */
-> fsfreeze stubs
#endif /* defined(FIREEZE) */
-> suspend stubs
#endif /* defined(__linux__) */