All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix g++ warning about void* used in arithmetic
@ 2014-02-12 18:25 Daniel Gollub
  2014-02-13  4:11 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Gollub @ 2014-02-12 18:25 UTC (permalink / raw)
  To: fio; +Cc: Daniel Gollub

../parse.h: In function ‘void* td_var(thread_options*, fio_option*, unsigned int)’:
../parse.h:110:10: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
../parse.h:112:9: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

Signed-off-by: Daniel Gollub <d.gollub@telekom.de>
---
 parse.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse.h b/parse.h
index 5273d23..1009252 100644
--- a/parse.h
+++ b/parse.h
@@ -100,7 +100,7 @@ typedef int (fio_opt_str_val_fn)(void *, long long *);
 typedef int (fio_opt_int_fn)(void *, int *);
 typedef int (fio_opt_str_set_fn)(void *);
 
-#define __td_var(start, offset)	((void *) start + (offset))
+#define __td_var(start, offset)	((char *) start + (offset))
 
 struct thread_options;
 static inline void *td_var(struct thread_options *to, struct fio_option *o,
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix g++ warning about void* used in arithmetic
  2014-02-12 18:25 [PATCH] Fix g++ warning about void* used in arithmetic Daniel Gollub
@ 2014-02-13  4:11 ` Jens Axboe
  2014-02-13  6:13   ` Daniel Gollub
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2014-02-13  4:11 UTC (permalink / raw)
  To: Daniel Gollub, fio; +Cc: Daniel Gollub

On 2014-02-12 11:25, Daniel Gollub wrote:
> ../parse.h: In function ‘void* td_var(thread_options*, fio_option*, unsigned int)’:
> ../parse.h:110:10: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
> ../parse.h:112:9: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

I bet there are a lot of these, or other similar code that would prevent 
compiling with g++. I'm dubious of the value add here. Fio is written in 
C, after all.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix g++ warning about void* used in arithmetic
  2014-02-13  4:11 ` Jens Axboe
@ 2014-02-13  6:13   ` Daniel Gollub
  2014-02-13 10:32     ` Erwan Velu
  2014-02-13 15:05     ` [PATCH] Fix g++ warning about void* used in arithmetic Jens Axboe
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Gollub @ 2014-02-13  6:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio, Daniel Gollub

Hi Jens,

On Wed, 12 Feb 2014 21:11:21 -0700, Jens Axboe wrote:
> On 2014-02-12 11:25, Daniel Gollub wrote:
> > ../parse.h: In function ‘void* td_var(thread_options*, fio_option*,
> > unsigned int)’: ../parse.h:110:10: warning: pointer of type ‘void
> > *’ used in arithmetic [-Wpointer-arith] ../parse.h:112:9: warning:
> > pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
> 
> I bet there are a lot of these, or other similar code that would
> prevent compiling with g++. I'm dubious of the value add here. Fio is
> written in C, after all.
> 

I should have mentioned this in the commit message: this is required to
compile an external ionengine written in C++. I do not try to compile
entire fio with g++. If I include fio.h in the external ioengine,
parse.h gets included by fio.h or so and causes this g++ warning.

This was the last warning (which just got introduced 2 days
ago) when fio.h gets included by an external engine build with g++.

So the value here is to build external ioengines against libraries/APIs
which are only available in C++. In my case against an internal library
of CEPH.


-- 
Daniel Gollub


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix g++ warning about void* used in arithmetic
  2014-02-13  6:13   ` Daniel Gollub
@ 2014-02-13 10:32     ` Erwan Velu
  2014-02-13 16:27       ` fio ioengines for CEPH (was: RE: [PATCH] Fix g++ warning about void* used in arithmetic) Gollub, Daniel
  2014-02-13 15:05     ` [PATCH] Fix g++ warning about void* used in arithmetic Jens Axboe
  1 sibling, 1 reply; 6+ messages in thread
From: Erwan Velu @ 2014-02-13 10:32 UTC (permalink / raw)
  To: Daniel Gollub; +Cc: Jens Axboe, fio, Daniel Gollub

I'm interested in CEPH too. Can you tell us what is your plan with fio & CEPH ?

----- Mail original -----
De: "Daniel Gollub" <daniel.gollub@t-online.de>
À: "Jens Axboe" <axboe@kernel.dk>
Cc: fio@vger.kernel.org, "Daniel Gollub" <d.gollub@telekom.de>
Envoyé: Jeudi 13 Février 2014 07:13:57
Objet: Re: [PATCH] Fix g++ warning about void* used in arithmetic

Hi Jens,

On Wed, 12 Feb 2014 21:11:21 -0700, Jens Axboe wrote:
> On 2014-02-12 11:25, Daniel Gollub wrote:
> > ../parse.h: In function ‘void* td_var(thread_options*, fio_option*,
> > unsigned int)’: ../parse.h:110:10: warning: pointer of type ‘void
> > *’ used in arithmetic [-Wpointer-arith] ../parse.h:112:9: warning:
> > pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
> 
> I bet there are a lot of these, or other similar code that would
> prevent compiling with g++. I'm dubious of the value add here. Fio is
> written in C, after all.
> 

I should have mentioned this in the commit message: this is required to
compile an external ionengine written in C++. I do not try to compile
entire fio with g++. If I include fio.h in the external ioengine,
parse.h gets included by fio.h or so and causes this g++ warning.

This was the last warning (which just got introduced 2 days
ago) when fio.h gets included by an external engine build with g++.

So the value here is to build external ioengines against libraries/APIs
which are only available in C++. In my case against an internal library
of CEPH.


-- 
Daniel Gollub

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix g++ warning about void* used in arithmetic
  2014-02-13  6:13   ` Daniel Gollub
  2014-02-13 10:32     ` Erwan Velu
@ 2014-02-13 15:05     ` Jens Axboe
  1 sibling, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2014-02-13 15:05 UTC (permalink / raw)
  To: Daniel Gollub; +Cc: fio, Daniel Gollub

On 02/12/2014 11:13 PM, Daniel Gollub wrote:
> Hi Jens,
>
> On Wed, 12 Feb 2014 21:11:21 -0700, Jens Axboe wrote:
>> On 2014-02-12 11:25, Daniel Gollub wrote:
>>> ../parse.h: In function ‘void* td_var(thread_options*, fio_option*,
>>> unsigned int)’: ../parse.h:110:10: warning: pointer of type ‘void
>>> *’ used in arithmetic [-Wpointer-arith] ../parse.h:112:9: warning:
>>> pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
>>
>> I bet there are a lot of these, or other similar code that would
>> prevent compiling with g++. I'm dubious of the value add here. Fio is
>> written in C, after all.
>>
>
> I should have mentioned this in the commit message: this is required to
> compile an external ionengine written in C++. I do not try to compile
> entire fio with g++. If I include fio.h in the external ioengine,
> parse.h gets included by fio.h or so and causes this g++ warning.
>
> This was the last warning (which just got introduced 2 days
> ago) when fio.h gets included by an external engine build with g++.
>
> So the value here is to build external ioengines against libraries/APIs
> which are only available in C++. In my case against an internal library
> of CEPH.

I guessed as much last night, so I did end up applying your patches.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* fio ioengines for CEPH (was: RE: [PATCH] Fix g++ warning about void* used in arithmetic)
  2014-02-13 10:32     ` Erwan Velu
@ 2014-02-13 16:27       ` Gollub, Daniel
  0 siblings, 0 replies; 6+ messages in thread
From: Gollub, Daniel @ 2014-02-13 16:27 UTC (permalink / raw)
  To: Erwan Velu, Daniel Gollub; +Cc: Jens Axboe, fio, danny.al-gaaf

Hi Erwan,

my colleagues of DTAG P&I Platform Engineering of the Business Marketplace and me did the last month
performance profiling of our CEPH cluster for RBDs. We decided to implement fio engine based on librbd
and an external fio engine using CEPHs FileStore class. So we can run the same IO pattern with the same
IO test tool on all the different layers. And fio was just the perfect fit for us:

 * inside the KVM/QEMU VM with fio ioengine=libaio
 * on the KVM-host using fio ioengine=rbd
 * on the CEPH OSD node with a external fio engine based on CEPH FileStore (writing the PG groups on the filesystem + OSD journal)
 * finally: fio tests on the OSD filesystem and the plain blockdevice



I plan to clean the RBD branch up and send out patches hopefully tomorrow.
RBD ioengine branch: https://github.com/TelekomCloud/fio/commits/rbd-engine_v2


The external FileStore ioengine I plan to cleanup next week - right now its a "quick hack" shape:
https://github.com/gollub/ceph/blob/fio_filestore/src/fio_ceph_filestore.c

Once I am done with the cleanup and pushed everything Danny and me will provide a write-up on the
TelekomCloud blog about our CEPH-RBD performance sprint with fio.


Kind Regards
Daniel Gollub
________________________________________
From: Erwan Velu [erwan.velu@enovance.com]
Sent: Thursday, February 13, 2014 11:32 AM
To: Daniel Gollub
Cc: Jens Axboe; fio@vger.kernel.org; Gollub, Daniel
Subject: Re: [PATCH] Fix g++ warning about void* used in arithmetic

I'm interested in CEPH too. Can you tell us what is your plan with fio & CEPH ?

----- Mail original -----
De: "Daniel Gollub" <daniel.gollub@t-online.de>
À: "Jens Axboe" <axboe@kernel.dk>
Cc: fio@vger.kernel.org, "Daniel Gollub" <d.gollub@telekom.de>
Envoyé: Jeudi 13 Février 2014 07:13:57
Objet: Re: [PATCH] Fix g++ warning about void* used in arithmetic

Hi Jens,

On Wed, 12 Feb 2014 21:11:21 -0700, Jens Axboe wrote:
> On 2014-02-12 11:25, Daniel Gollub wrote:
> > ../parse.h: In function ‘void* td_var(thread_options*, fio_option*,
> > unsigned int)’: ../parse.h:110:10: warning: pointer of type ‘void
> > *’ used in arithmetic [-Wpointer-arith] ../parse.h:112:9: warning:
> > pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
>
> I bet there are a lot of these, or other similar code that would
> prevent compiling with g++. I'm dubious of the value add here. Fio is
> written in C, after all.
>

I should have mentioned this in the commit message: this is required to
compile an external ionengine written in C++. I do not try to compile
entire fio with g++. If I include fio.h in the external ioengine,
parse.h gets included by fio.h or so and causes this g++ warning.

This was the last warning (which just got introduced 2 days
ago) when fio.h gets included by an external engine build with g++.

So the value here is to build external ioengines against libraries/APIs
which are only available in C++. In my case against an internal library
of CEPH.


--
Daniel Gollub
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-13 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 18:25 [PATCH] Fix g++ warning about void* used in arithmetic Daniel Gollub
2014-02-13  4:11 ` Jens Axboe
2014-02-13  6:13   ` Daniel Gollub
2014-02-13 10:32     ` Erwan Velu
2014-02-13 16:27       ` fio ioengines for CEPH (was: RE: [PATCH] Fix g++ warning about void* used in arithmetic) Gollub, Daniel
2014-02-13 15:05     ` [PATCH] Fix g++ warning about void* used in arithmetic Jens Axboe

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.