Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-05 Thread Jens Axboe
On Thu, Oct 04 2007, Arnd Bergmann wrote: > On Thursday 04 October 2007, you wrote: > > This looks a lot better! I don't mind seperating the block bits, when we > > get the whole bunch in there. Just seemed overly silly and complicated > > to do it for just one ioctl command. When you are happy wit

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-04 Thread Arnd Bergmann
On Thursday 04 October 2007, you wrote: > This looks a lot better! I don't mind seperating the block bits, when we > get the whole bunch in there. Just seemed overly silly and complicated > to do it for just one ioctl command. When you are happy with this patch, > I'll add it to the pending block s

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-04 Thread Jens Axboe
On Thu, Oct 04 2007, Arnd Bergmann wrote: > On Wednesday 03 October 2007, Arnd Bergmann wrote: > > Jens, I think the best overall solution would be to have a > > block/compat_ioctl.c file with all the compat handling for block > > devices moved over from fs/compat_ioctl.c, and done in a nicer way.

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-03 Thread Arnd Bergmann
On Wednesday 03 October 2007, Arnd Bergmann wrote: > Jens, I think the best overall solution would be to have a > block/compat_ioctl.c file with all the compat handling for block > devices moved over from fs/compat_ioctl.c, and done in a nicer way. > If you agree, with this approach, I'd volunteer

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-03 Thread Arnd Bergmann
Here's my counterproposal for the blktrace compat code. It doesn't have any of the problems I found in your patch obviously, but I haven't tested it either, so I'm sure you can spot a bug or two in here. Comments? Jens, I think the best overall solution would be to have a block/compat_ioctl.c file

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-03 Thread Arnd Bergmann
On Tuesday 02 October 2007, Jens Axboe wrote: > Hi Arnd, > > Updated patch below. I kept the code in compat_ioctl.c, to me it seems > like the cleanest approach. I need the BLKTRACESETUP32 define both in > compat_ioctl.c and blktrace.c if I move it, and I need to hard-core the > struct size or def

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-02 Thread Jens Axboe
Hi Arnd, Updated patch below. I kept the code in compat_ioctl.c, to me it seems like the cleanest approach. I need the BLKTRACESETUP32 define both in compat_ioctl.c and blktrace.c if I move it, and I need to hard-core the struct size or define it in both places. And guard the code in blktrace.c wi

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-02 Thread Jens Axboe
On Tue, Oct 02 2007, Arnd Bergmann wrote: > On Tuesday 02 October 2007, Jens Axboe wrote: > > > > The layout of struct blk_user_trace_setup is a bit unfortunate, it gets > > padded differently on 32-bit and 64-bit archs. So right now it's not > > possible to trace 64-bit kernels with a 32-bit app.

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-02 Thread Arnd Bergmann
On Tuesday 02 October 2007, Jens Axboe wrote: > > The layout of struct blk_user_trace_setup is a bit unfortunate, it gets > padded differently on 32-bit and 64-bit archs. So right now it's not > possible to trace 64-bit kernels with a 32-bit app. This patch fixes > that up by adding a compat ioctl

Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-02 Thread David Miller
From: Jens Axboe <[EMAIL PROTECTED]> Date: Tue, 2 Oct 2007 09:39:43 +0200 > Hi, > > The layout of struct blk_user_trace_setup is a bit unfortunate, it gets > padded differently on 32-bit and 64-bit archs. So right now it's not > possible to trace 64-bit kernels with a 32-bit app. This patch fixes

[PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels

2007-10-02 Thread Jens Axboe
Hi, The layout of struct blk_user_trace_setup is a bit unfortunate, it gets padded differently on 32-bit and 64-bit archs. So right now it's not possible to trace 64-bit kernels with a 32-bit app. This patch fixes that up by adding a compat ioctl handler for BLKTRACESETUP. Signed-off-by: Jens Axb