* Peter Xu (pet...@redhat.com) wrote: > MADV_COLLAPSE is a new madvise() on Linux. Define it.
I'd probably have merged this with the MADV_SPLIT one since they go together; but also, it would be good in the commit message for Qemu to include either the definition or a pointer to the kernel definiton of them. Dave > Signed-off-by: Peter Xu <pet...@redhat.com> > --- > include/qemu/madvise.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/qemu/madvise.h b/include/qemu/madvise.h > index 3dddd25065..794e5fb0a7 100644 > --- a/include/qemu/madvise.h > +++ b/include/qemu/madvise.h > @@ -68,6 +68,11 @@ > #else > #define QEMU_MADV_SPLIT QEMU_MADV_INVALID > #endif > +#ifdef MADV_COLLAPSE > +#define QEMU_MADV_COLLAPSE MADV_COLLAPSE > +#else > +#define QEMU_MADV_COLLAPSE QEMU_MADV_INVALID > +#endif > > #elif defined(CONFIG_POSIX_MADVISE) > > @@ -83,6 +88,7 @@ > #define QEMU_MADV_REMOVE QEMU_MADV_DONTNEED > #define QEMU_MADV_POPULATE_WRITE QEMU_MADV_INVALID > #define QEMU_MADV_SPLIT QEMU_MADV_INVALID > +#define QEMU_MADV_COLLAPSE QEMU_MADV_INVALID > > #else /* no-op */ > > @@ -98,6 +104,7 @@ > #define QEMU_MADV_REMOVE QEMU_MADV_INVALID > #define QEMU_MADV_POPULATE_WRITE QEMU_MADV_INVALID > #define QEMU_MADV_SPLIT QEMU_MADV_INVALID > +#define QEMU_MADV_COLLAPSE QEMU_MADV_INVALID > > #endif > > -- > 2.37.3 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK