* [Qemu-devel] [RFC PATCH v1 0/3] pkg-config and discard support for gluster driver
@ 2013-07-12 6:56 Bharata B Rao
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
2013-07-12 7:00 ` [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for " Bharata B Rao
0 siblings, 2 replies; 14+ messages in thread
From: Bharata B Rao @ 2013-07-12 6:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Anand Avati
Hi,
This is a patchset that achieves the following:
- Use pkg-config to configure GlusterFS driver in QEMU.
- Enable discard support in GlusterFS driver.
Regards,
Bharata.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-12 6:56 [Qemu-devel] [RFC PATCH v1 0/3] pkg-config and discard support for gluster driver Bharata B Rao
@ 2013-07-12 6:58 ` Bharata B Rao
2013-07-16 6:02 ` Stefan Hajnoczi
` (2 more replies)
2013-07-12 7:00 ` [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for " Bharata B Rao
1 sibling, 3 replies; 14+ messages in thread
From: Bharata B Rao @ 2013-07-12 6:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Anand Avati
gluster: Use pkg-config to configure GlusterFS block driver
Use pkg-config to determine the version and library dependency
for GlusterFS block driver.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
configure | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index cb0f870..76adcb1 100755
--- a/configure
+++ b/configure
@@ -2566,23 +2566,17 @@ fi
##########################################
# glusterfs probe
if test "$glusterfs" != "no" ; then
- cat > $TMPC <<EOF
-#include <glusterfs/api/glfs.h>
-int main(void) {
- (void) glfs_new("volume");
- return 0;
-}
-EOF
- glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
- if compile_prog "" "$glusterfs_libs" ; then
- glusterfs=yes
- libs_tools="$glusterfs_libs $libs_tools"
- libs_softmmu="$glusterfs_libs $libs_softmmu"
+ if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
+ glusterfs="yes"
+ glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
+ glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
+ CFLAGS="$CFLAGS $glusterfs_cflags"
+ LIBS="$LIBS $glusterfs_libs"
else
if test "$glusterfs" = "yes" ; then
feature_not_found "GlusterFS backend support"
fi
- glusterfs=no
+ glusterfs="no"
fi
fi
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for GlusterFS block driver
2013-07-12 6:56 [Qemu-devel] [RFC PATCH v1 0/3] pkg-config and discard support for gluster driver Bharata B Rao
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
@ 2013-07-12 7:00 ` Bharata B Rao
2013-07-16 6:05 ` Stefan Hajnoczi
2013-07-16 8:29 ` Kevin Wolf
1 sibling, 2 replies; 14+ messages in thread
From: Bharata B Rao @ 2013-07-12 7:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Anand Avati
gluster: Add discard support for GlusterFS block driver.
Implement bdrv_aio_discard for gluster.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
block/gluster.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
configure | 8 ++++++++
2 files changed, 53 insertions(+)
diff --git a/block/gluster.c b/block/gluster.c
index 61424bc..6de418c 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -532,6 +532,39 @@ out:
return NULL;
}
+#ifdef CONFIG_GLUSTERFS_DISCARD
+static BlockDriverAIOCB *qemu_gluster_aio_discard(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors, BlockDriverCompletionFunc *cb,
+ void *opaque)
+{
+ int ret;
+ GlusterAIOCB *acb;
+ BDRVGlusterState *s = bs->opaque;
+ size_t size;
+ off_t offset;
+
+ offset = sector_num * BDRV_SECTOR_SIZE;
+ size = nb_sectors * BDRV_SECTOR_SIZE;
+
+ acb = qemu_aio_get(&gluster_aiocb_info, bs, cb, opaque);
+ acb->size = 0;
+ acb->ret = 0;
+ acb->finished = NULL;
+ s->qemu_aio_count++;
+
+ ret = glfs_discard_async(s->fd, offset, size, &gluster_finish_aiocb, acb);
+ if (ret < 0) {
+ goto out;
+ }
+ return &acb->common;
+
+out:
+ s->qemu_aio_count--;
+ qemu_aio_release(acb);
+ return NULL;
+}
+#endif
+
static int64_t qemu_gluster_getlength(BlockDriverState *bs)
{
BDRVGlusterState *s = bs->opaque;
@@ -602,6 +635,9 @@ static BlockDriver bdrv_gluster = {
.bdrv_aio_writev = qemu_gluster_aio_writev,
.bdrv_aio_flush = qemu_gluster_aio_flush,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
+#ifdef CONFIG_GLUSTERFS_DISCARD
+ .bdrv_aio_discard = qemu_gluster_aio_discard,
+#endif
.create_options = qemu_gluster_create_options,
};
@@ -618,6 +654,9 @@ static BlockDriver bdrv_gluster_tcp = {
.bdrv_aio_writev = qemu_gluster_aio_writev,
.bdrv_aio_flush = qemu_gluster_aio_flush,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
+#ifdef CONFIG_GLUSTERFS_DISCARD
+ .bdrv_aio_discard = qemu_gluster_aio_discard,
+#endif
.create_options = qemu_gluster_create_options,
};
@@ -634,6 +673,9 @@ static BlockDriver bdrv_gluster_unix = {
.bdrv_aio_writev = qemu_gluster_aio_writev,
.bdrv_aio_flush = qemu_gluster_aio_flush,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
+#ifdef CONFIG_GLUSTERFS_DISCARD
+ .bdrv_aio_discard = qemu_gluster_aio_discard,
+#endif
.create_options = qemu_gluster_create_options,
};
@@ -650,6 +692,9 @@ static BlockDriver bdrv_gluster_rdma = {
.bdrv_aio_writev = qemu_gluster_aio_writev,
.bdrv_aio_flush = qemu_gluster_aio_flush,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
+#ifdef CONFIG_GLUSTERFS_DISCARD
+ .bdrv_aio_discard = qemu_gluster_aio_discard,
+#endif
.create_options = qemu_gluster_create_options,
};
diff --git a/configure b/configure
index 76adcb1..7f90882 100755
--- a/configure
+++ b/configure
@@ -237,6 +237,7 @@ libiscsi=""
coroutine=""
seccomp=""
glusterfs=""
+glusterfs_discard="no"
virtio_blk_data_plane=""
gtk=""
gtkabi="2.0"
@@ -2572,6 +2573,9 @@ if test "$glusterfs" != "no" ; then
glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
CFLAGS="$CFLAGS $glusterfs_cflags"
LIBS="$LIBS $glusterfs_libs"
+ if $pkg_config --atleast-version=5 glusterfs-api >/dev/null 2>&1; then
+ glusterfs_discard="yes"
+ fi
else
if test "$glusterfs" = "yes" ; then
feature_not_found "GlusterFS backend support"
@@ -3959,6 +3963,10 @@ if test "$glusterfs" = "yes" ; then
echo "CONFIG_GLUSTERFS=y" >> $config_host_mak
fi
+if test "$glusterfs_discard" = "yes" ; then
+ echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
+fi
+
if test "$libssh2" = "yes" ; then
echo "CONFIG_LIBSSH2=y" >> $config_host_mak
fi
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
@ 2013-07-16 6:02 ` Stefan Hajnoczi
2013-07-16 6:04 ` Anand Avati
2013-07-16 8:25 ` Kevin Wolf
2013-07-23 11:57 ` Daniel P. Berrange
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2013-07-16 6:02 UTC (permalink / raw)
To: Bharata B Rao; +Cc: Kevin Wolf, Anand Avati, qemu-devel
On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
> gluster: Use pkg-config to configure GlusterFS block driver
The commit message is duplicated in the commit description.
> Use pkg-config to determine the version and library dependency
> for GlusterFS block driver.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
> configure | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index cb0f870..76adcb1 100755
> --- a/configure
> +++ b/configure
> @@ -2566,23 +2566,17 @@ fi
> ##########################################
> # glusterfs probe
> if test "$glusterfs" != "no" ; then
> - cat > $TMPC <<EOF
> -#include <glusterfs/api/glfs.h>
> -int main(void) {
> - (void) glfs_new("volume");
> - return 0;
> -}
> -EOF
> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> - if compile_prog "" "$glusterfs_libs" ; then
> - glusterfs=yes
> - libs_tools="$glusterfs_libs $libs_tools"
> - libs_softmmu="$glusterfs_libs $libs_softmmu"
> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
gfapi was added in Gluster 3.4. Is --atleast-version=3 sufficient?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-16 6:02 ` Stefan Hajnoczi
@ 2013-07-16 6:04 ` Anand Avati
0 siblings, 0 replies; 14+ messages in thread
From: Anand Avati @ 2013-07-16 6:04 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel, Bharata B Rao
On 7/15/13 11:02 PM, Stefan Hajnoczi wrote:
> On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
>> gluster: Use pkg-config to configure GlusterFS block driver
>
> The commit message is duplicated in the commit description.
>
>> Use pkg-config to determine the version and library dependency
>> for GlusterFS block driver.
>>
>> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>> ---
>> configure | 20 +++++++-------------
>> 1 file changed, 7 insertions(+), 13 deletions(-)
>>
>> diff --git a/configure b/configure
>> index cb0f870..76adcb1 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2566,23 +2566,17 @@ fi
>> ##########################################
>> # glusterfs probe
>> if test "$glusterfs" != "no" ; then
>> - cat > $TMPC <<EOF
>> -#include <glusterfs/api/glfs.h>
>> -int main(void) {
>> - (void) glfs_new("volume");
>> - return 0;
>> -}
>> -EOF
>> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
>> - if compile_prog "" "$glusterfs_libs" ; then
>> - glusterfs=yes
>> - libs_tools="$glusterfs_libs $libs_tools"
>> - libs_softmmu="$glusterfs_libs $libs_softmmu"
>> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
>
> gfapi was added in Gluster 3.4. Is --atleast-version=3 sufficient?
>
--atleast-version=3 is the api version (not release version). 3 is
sufficient for basic qemu integration. 5 and above has fallocate/discard.
Avati
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for GlusterFS block driver
2013-07-12 7:00 ` [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for " Bharata B Rao
@ 2013-07-16 6:05 ` Stefan Hajnoczi
2013-07-16 8:29 ` Kevin Wolf
1 sibling, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2013-07-16 6:05 UTC (permalink / raw)
To: Bharata B Rao; +Cc: Kevin Wolf, Anand Avati, qemu-devel
On Fri, Jul 12, 2013 at 12:30:08PM +0530, Bharata B Rao wrote:
> gluster: Add discard support for GlusterFS block driver.
Commit message duplicated into commit description.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
2013-07-16 6:02 ` Stefan Hajnoczi
@ 2013-07-16 8:25 ` Kevin Wolf
2013-07-16 11:34 ` Bharata B Rao
2013-07-23 11:57 ` Daniel P. Berrange
2 siblings, 1 reply; 14+ messages in thread
From: Kevin Wolf @ 2013-07-16 8:25 UTC (permalink / raw)
To: Bharata B Rao; +Cc: Stefan Hajnoczi, Anand Avati, qemu-devel
Am 12.07.2013 um 08:58 hat Bharata B Rao geschrieben:
> gluster: Use pkg-config to configure GlusterFS block driver
>
> Use pkg-config to determine the version and library dependency
> for GlusterFS block driver.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
> configure | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index cb0f870..76adcb1 100755
> --- a/configure
> +++ b/configure
> @@ -2566,23 +2566,17 @@ fi
> ##########################################
> # glusterfs probe
> if test "$glusterfs" != "no" ; then
> - cat > $TMPC <<EOF
> -#include <glusterfs/api/glfs.h>
> -int main(void) {
> - (void) glfs_new("volume");
> - return 0;
> -}
> -EOF
> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> - if compile_prog "" "$glusterfs_libs" ; then
> - glusterfs=yes
> - libs_tools="$glusterfs_libs $libs_tools"
> - libs_softmmu="$glusterfs_libs $libs_softmmu"
> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
> + glusterfs="yes"
> + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
> + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
> + CFLAGS="$CFLAGS $glusterfs_cflags"
> + LIBS="$LIBS $glusterfs_libs"
Why do you switch from libs_tools/libs_softmmu to LIBS? If I understand
it right, this means that you now link the library to linux-user targets
as well, but I can't see how they need it.
Kevin
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for GlusterFS block driver
2013-07-12 7:00 ` [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for " Bharata B Rao
2013-07-16 6:05 ` Stefan Hajnoczi
@ 2013-07-16 8:29 ` Kevin Wolf
1 sibling, 0 replies; 14+ messages in thread
From: Kevin Wolf @ 2013-07-16 8:29 UTC (permalink / raw)
To: Bharata B Rao; +Cc: Stefan Hajnoczi, Anand Avati, qemu-devel
Am 12.07.2013 um 09:00 hat Bharata B Rao geschrieben:
> gluster: Add discard support for GlusterFS block driver.
>
> Implement bdrv_aio_discard for gluster.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-16 8:25 ` Kevin Wolf
@ 2013-07-16 11:34 ` Bharata B Rao
0 siblings, 0 replies; 14+ messages in thread
From: Bharata B Rao @ 2013-07-16 11:34 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Stefan Hajnoczi, Anand Avati, qemu-devel
On Tue, Jul 16, 2013 at 10:25:29AM +0200, Kevin Wolf wrote:
> > - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> > - if compile_prog "" "$glusterfs_libs" ; then
> > - glusterfs=yes
> > - libs_tools="$glusterfs_libs $libs_tools"
> > - libs_softmmu="$glusterfs_libs $libs_softmmu"
> > + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
> > + glusterfs="yes"
> > + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
> > + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
> > + CFLAGS="$CFLAGS $glusterfs_cflags"
> > + LIBS="$LIBS $glusterfs_libs"
>
> Why do you switch from libs_tools/libs_softmmu to LIBS? If I understand
> it right, this means that you now link the library to linux-user targets
> as well, but I can't see how they need it.
Copied from some other backend and didn't realize that I ended up considering
linux-user target also. Will change this and send v2.
Regards,
Bharata.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
2013-07-16 6:02 ` Stefan Hajnoczi
2013-07-16 8:25 ` Kevin Wolf
@ 2013-07-23 11:57 ` Daniel P. Berrange
2013-07-23 12:02 ` Anand Avati
2 siblings, 1 reply; 14+ messages in thread
From: Daniel P. Berrange @ 2013-07-23 11:57 UTC (permalink / raw)
To: Bharata B Rao; +Cc: Kevin Wolf, Stefan Hajnoczi, Anand Avati, qemu-devel
On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
> gluster: Use pkg-config to configure GlusterFS block driver
>
> Use pkg-config to determine the version and library dependency
> for GlusterFS block driver.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
> configure | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index cb0f870..76adcb1 100755
> --- a/configure
> +++ b/configure
> @@ -2566,23 +2566,17 @@ fi
> ##########################################
> # glusterfs probe
> if test "$glusterfs" != "no" ; then
> - cat > $TMPC <<EOF
> -#include <glusterfs/api/glfs.h>
> -int main(void) {
> - (void) glfs_new("volume");
> - return 0;
> -}
> -EOF
> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> - if compile_prog "" "$glusterfs_libs" ; then
> - glusterfs=yes
> - libs_tools="$glusterfs_libs $libs_tools"
> - libs_softmmu="$glusterfs_libs $libs_softmmu"
> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
> + glusterfs="yes"
> + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
> + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
> + CFLAGS="$CFLAGS $glusterfs_cflags"
> + LIBS="$LIBS $glusterfs_libs"
The glusterfs v 3.4 RPMs in Fedora do not include any pkg-config files.
So with this change now in GIT, QEMU no longer detects support for
glusterfs even though it is present.
Has the min required glusterfs been increased to a new 3.5 version
which does include pkg-config support ? If not, then I think this
patch needs to be reverted, so that it does a non-pkg-config based
check for glusterfs.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-23 11:57 ` Daniel P. Berrange
@ 2013-07-23 12:02 ` Anand Avati
2013-07-23 12:03 ` Daniel P. Berrange
2013-07-23 12:07 ` Kaleb KEITHLEY
0 siblings, 2 replies; 14+ messages in thread
From: Anand Avati @ 2013-07-23 12:02 UTC (permalink / raw)
To: Daniel P. Berrange
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, Bharata B Rao,
Kaleb Keithley, devel
On 7/23/13 4:57 AM, Daniel P. Berrange wrote:
> On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
>> gluster: Use pkg-config to configure GlusterFS block driver
>>
>> Use pkg-config to determine the version and library dependency
>> for GlusterFS block driver.
>>
>> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>> ---
>> configure | 20 +++++++-------------
>> 1 file changed, 7 insertions(+), 13 deletions(-)
>>
>> diff --git a/configure b/configure
>> index cb0f870..76adcb1 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2566,23 +2566,17 @@ fi
>> ##########################################
>> # glusterfs probe
>> if test "$glusterfs" != "no" ; then
>> - cat > $TMPC <<EOF
>> -#include <glusterfs/api/glfs.h>
>> -int main(void) {
>> - (void) glfs_new("volume");
>> - return 0;
>> -}
>> -EOF
>> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
>> - if compile_prog "" "$glusterfs_libs" ; then
>> - glusterfs=yes
>> - libs_tools="$glusterfs_libs $libs_tools"
>> - libs_softmmu="$glusterfs_libs $libs_softmmu"
>> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
>> + glusterfs="yes"
>> + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
>> + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
>> + CFLAGS="$CFLAGS $glusterfs_cflags"
>> + LIBS="$LIBS $glusterfs_libs"
>
> The glusterfs v 3.4 RPMs in Fedora do not include any pkg-config files.
> So with this change now in GIT, QEMU no longer detects support for
> glusterfs even though it is present.
>
> Has the min required glusterfs been increased to a new 3.5 version
> which does include pkg-config support ? If not, then I think this
> patch needs to be reverted, so that it does a non-pkg-config based
> check for glusterfs.
>
> Regards,
> Daniel
>
Copying Kaleb.
We should just include the pkg-config file in the Fedora RPM for
glusterfs if it already isn't.
Avati
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-23 12:02 ` Anand Avati
@ 2013-07-23 12:03 ` Daniel P. Berrange
2013-07-23 12:07 ` Kaleb KEITHLEY
1 sibling, 0 replies; 14+ messages in thread
From: Daniel P. Berrange @ 2013-07-23 12:03 UTC (permalink / raw)
To: Anand Avati
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, Bharata B Rao,
Kaleb Keithley, devel
On Tue, Jul 23, 2013 at 05:02:20AM -0700, Anand Avati wrote:
> On 7/23/13 4:57 AM, Daniel P. Berrange wrote:
> >On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
> >>gluster: Use pkg-config to configure GlusterFS block driver
> >>
> >>Use pkg-config to determine the version and library dependency
> >>for GlusterFS block driver.
> >>
> >>Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> >>---
> >> configure | 20 +++++++-------------
> >> 1 file changed, 7 insertions(+), 13 deletions(-)
> >>
> >>diff --git a/configure b/configure
> >>index cb0f870..76adcb1 100755
> >>--- a/configure
> >>+++ b/configure
> >>@@ -2566,23 +2566,17 @@ fi
> >> ##########################################
> >> # glusterfs probe
> >> if test "$glusterfs" != "no" ; then
> >>- cat > $TMPC <<EOF
> >>-#include <glusterfs/api/glfs.h>
> >>-int main(void) {
> >>- (void) glfs_new("volume");
> >>- return 0;
> >>-}
> >>-EOF
> >>- glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> >>- if compile_prog "" "$glusterfs_libs" ; then
> >>- glusterfs=yes
> >>- libs_tools="$glusterfs_libs $libs_tools"
> >>- libs_softmmu="$glusterfs_libs $libs_softmmu"
> >>+ if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
> >>+ glusterfs="yes"
> >>+ glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
> >>+ glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
> >>+ CFLAGS="$CFLAGS $glusterfs_cflags"
> >>+ LIBS="$LIBS $glusterfs_libs"
> >
> >The glusterfs v 3.4 RPMs in Fedora do not include any pkg-config files.
> >So with this change now in GIT, QEMU no longer detects support for
> >glusterfs even though it is present.
> >
> >Has the min required glusterfs been increased to a new 3.5 version
> >which does include pkg-config support ? If not, then I think this
> >patch needs to be reverted, so that it does a non-pkg-config based
> >check for glusterfs.
> >
> >Regards,
> >Daniel
> >
>
> Copying Kaleb.
>
> We should just include the pkg-config file in the Fedora RPM for
> glusterfs if it already isn't.
That doesn't help anyone trying to build QEMU with gluster support
on all the existing released distros which lack the pkg-config files.
If you really want a pkg-config file check for glusterfs in QEMU,
then it must at least fallback to probing the non-pkg-config way
to support existing deployed distros.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-23 12:02 ` Anand Avati
2013-07-23 12:03 ` Daniel P. Berrange
@ 2013-07-23 12:07 ` Kaleb KEITHLEY
2013-07-23 12:14 ` Daniel P. Berrange
1 sibling, 1 reply; 14+ messages in thread
From: Kaleb KEITHLEY @ 2013-07-23 12:07 UTC (permalink / raw)
To: Anand Avati, Daniel P. Berrange
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, devel, Bharata B Rao
On 07/23/2013 05:32 PM, Anand Avati wrote:
> On 7/23/13 4:57 AM, Daniel P. Berrange wrote:
>> On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
>>> gluster: Use pkg-config to configure GlusterFS block driver
>>>
>>> Use pkg-config to determine the version and library dependency
>>> for GlusterFS block driver.
>>>
>>> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>>> ---
>>> configure | 20 +++++++-------------
>>> 1 file changed, 7 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index cb0f870..76adcb1 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2566,23 +2566,17 @@ fi
>>> ##########################################
>>> # glusterfs probe
>>> if test "$glusterfs" != "no" ; then
>>> - cat > $TMPC <<EOF
>>> -#include <glusterfs/api/glfs.h>
>>> -int main(void) {
>>> - (void) glfs_new("volume");
>>> - return 0;
>>> -}
>>> -EOF
>>> - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
>>> - if compile_prog "" "$glusterfs_libs" ; then
>>> - glusterfs=yes
>>> - libs_tools="$glusterfs_libs $libs_tools"
>>> - libs_softmmu="$glusterfs_libs $libs_softmmu"
>>> + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1;
>>> then
>>> + glusterfs="yes"
>>> + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
>>> + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
>>> + CFLAGS="$CFLAGS $glusterfs_cflags"
>>> + LIBS="$LIBS $glusterfs_libs"
>>
>> The glusterfs v 3.4 RPMs in Fedora do not include any pkg-config files.
>> So with this change now in GIT, QEMU no longer detects support for
>> glusterfs even though it is present.
>>
>> Has the min required glusterfs been increased to a new 3.5 version
>> which does include pkg-config support ? If not, then I think this
>> patch needs to be reverted, so that it does a non-pkg-config based
>> check for glusterfs.
>>
>> Regards,
>> Daniel
>>
>
> Copying Kaleb.
>
> We should just include the pkg-config file in the Fedora RPM for
> glusterfs if it already isn't.
It's in the glusterfs-api-devel rpm:
% rpm -ql glusterfs-api-devel
/usr/include/glusterfs/api/glfs.h
/usr/lib64/libgfapi.so
/usr/lib64/pkgconfig/glusterfs-api.pc
--
Kaleb
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
2013-07-23 12:07 ` Kaleb KEITHLEY
@ 2013-07-23 12:14 ` Daniel P. Berrange
0 siblings, 0 replies; 14+ messages in thread
From: Daniel P. Berrange @ 2013-07-23 12:14 UTC (permalink / raw)
To: Kaleb KEITHLEY
Cc: Kevin Wolf, Anand Avati, Stefan Hajnoczi, qemu-devel,
Bharata B Rao, devel
On Tue, Jul 23, 2013 at 05:37:54PM +0530, Kaleb KEITHLEY wrote:
> On 07/23/2013 05:32 PM, Anand Avati wrote:
> >On 7/23/13 4:57 AM, Daniel P. Berrange wrote:
> >>On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
> >>>gluster: Use pkg-config to configure GlusterFS block driver
> >>>
> >>>Use pkg-config to determine the version and library dependency
> >>>for GlusterFS block driver.
> >>>
> >>>Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> >>>---
> >>> configure | 20 +++++++-------------
> >>> 1 file changed, 7 insertions(+), 13 deletions(-)
> >>>
> >>>diff --git a/configure b/configure
> >>>index cb0f870..76adcb1 100755
> >>>--- a/configure
> >>>+++ b/configure
> >>>@@ -2566,23 +2566,17 @@ fi
> >>> ##########################################
> >>> # glusterfs probe
> >>> if test "$glusterfs" != "no" ; then
> >>>- cat > $TMPC <<EOF
> >>>-#include <glusterfs/api/glfs.h>
> >>>-int main(void) {
> >>>- (void) glfs_new("volume");
> >>>- return 0;
> >>>-}
> >>>-EOF
> >>>- glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
> >>>- if compile_prog "" "$glusterfs_libs" ; then
> >>>- glusterfs=yes
> >>>- libs_tools="$glusterfs_libs $libs_tools"
> >>>- libs_softmmu="$glusterfs_libs $libs_softmmu"
> >>>+ if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1;
> >>>then
> >>>+ glusterfs="yes"
> >>>+ glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
> >>>+ glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
> >>>+ CFLAGS="$CFLAGS $glusterfs_cflags"
> >>>+ LIBS="$LIBS $glusterfs_libs"
> >>
> >>The glusterfs v 3.4 RPMs in Fedora do not include any pkg-config files.
> >>So with this change now in GIT, QEMU no longer detects support for
> >>glusterfs even though it is present.
> >>
> >>Has the min required glusterfs been increased to a new 3.5 version
> >>which does include pkg-config support ? If not, then I think this
> >>patch needs to be reverted, so that it does a non-pkg-config based
> >>check for glusterfs.
> >>
> >>Regards,
> >>Daniel
> >>
> >
> >Copying Kaleb.
> >
> >We should just include the pkg-config file in the Fedora RPM for
> >glusterfs if it already isn't.
>
> It's in the glusterfs-api-devel rpm:
>
> % rpm -ql glusterfs-api-devel
> /usr/include/glusterfs/api/glfs.h
> /usr/lib64/libgfapi.so
> /usr/lib64/pkgconfig/glusterfs-api.pc
Oooh, not the main glusterfs-devel RPM. Ok, ignore my earlier message
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-07-23 12:14 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 6:56 [Qemu-devel] [RFC PATCH v1 0/3] pkg-config and discard support for gluster driver Bharata B Rao
2013-07-12 6:58 ` [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Bharata B Rao
2013-07-16 6:02 ` Stefan Hajnoczi
2013-07-16 6:04 ` Anand Avati
2013-07-16 8:25 ` Kevin Wolf
2013-07-16 11:34 ` Bharata B Rao
2013-07-23 11:57 ` Daniel P. Berrange
2013-07-23 12:02 ` Anand Avati
2013-07-23 12:03 ` Daniel P. Berrange
2013-07-23 12:07 ` Kaleb KEITHLEY
2013-07-23 12:14 ` Daniel P. Berrange
2013-07-12 7:00 ` [Qemu-devel] [RFC PATCH v1 2/2] gluster: Add discard support for " Bharata B Rao
2013-07-16 6:05 ` Stefan Hajnoczi
2013-07-16 8:29 ` Kevin Wolf
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.