* [PATCH] compat_ioctl requires CONFIG_BLOCK
@ 2007-07-20 22:58 Sebastian Siewior
2007-07-20 23:08 ` Arnd Bergmann
0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Siewior @ 2007-07-20 22:58 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: compat_ioctl_fix.diff --]
[-- Type: text/plain, Size: 899 bytes --]
Got with randconfig
include/linux/loop.h:66: error: expected specifier-qualifier-list before
'request_queue_t'
make[1]: *** [fs/compat_ioctl.o] Error 1
parts of compat ioctl require CONFIG_BLOCK to be set.
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Index: b/fs/compat_ioctl.c
===================================================================
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -63,7 +63,9 @@
#include <linux/wireless.h>
#include <linux/atalk.h>
#include <linux/blktrace_api.h>
+#ifdef CONFIG_BLOCK
#include <linux/loop.h>
+#endif
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci.h>
@@ -3491,8 +3493,10 @@ HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_tr
IGNORE_IOCTL(VFAT_IOCTL_READDIR_BOTH32)
IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32)
+#ifdef CONFIG_BLOCK
/* loop */
IGNORE_IOCTL(LOOP_CLR_FD)
+#endif
};
#define IOCTL_HASHSIZE 256
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-20 22:58 [PATCH] compat_ioctl requires CONFIG_BLOCK Sebastian Siewior
@ 2007-07-20 23:08 ` Arnd Bergmann
2007-07-21 8:40 ` Sebastian Siewior
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2007-07-20 23:08 UTC (permalink / raw)
To: Sebastian Siewior; +Cc: linux-kernel
On Saturday 21 July 2007, Sebastian Siewior wrote:
>
> Got with randconfig
> include/linux/loop.h:66: error: expected specifier-qualifier-list before
> 'request_queue_t'
> make[1]: *** [fs/compat_ioctl.o] Error 1
>
> parts of compat ioctl require CONFIG_BLOCK to be set.
>
> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> Index: b/fs/compat_ioctl.c
> ===================================================================
> --- a/fs/compat_ioctl.c
> +++ b/fs/compat_ioctl.c
> @@ -63,7 +63,9 @@
> #include <linux/wireless.h>
> #include <linux/atalk.h>
> #include <linux/blktrace_api.h>
> +#ifdef CONFIG_BLOCK
> #include <linux/loop.h>
> +#endif
Adding #ifdef around an #include is considered bad style. Better just
make loop.h compile without any conditionals. Does the below
patch work for you?
Arnd <><
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -63,7 +63,7 @@ struct loop_device {
struct task_struct *lo_thread;
wait_queue_head_t lo_event;
- request_queue_t *lo_queue;
+ struct request_queue *lo_queue;
struct gendisk *lo_disk;
struct list_head lo_list;
};
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-20 23:08 ` Arnd Bergmann
@ 2007-07-21 8:40 ` Sebastian Siewior
2007-07-21 12:44 ` Christoph Hellwig
2007-07-24 0:23 ` Andrew Morton
2 siblings, 0 replies; 7+ messages in thread
From: Sebastian Siewior @ 2007-07-21 8:40 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel
* Arnd Bergmann | 2007-07-21 01:08:57 [+0200]:
>On Saturday 21 July 2007, Sebastian Siewior wrote:
>>
>> Got with randconfig
>> include/linux/loop.h:66: error: expected specifier-qualifier-list before
>> 'request_queue_t'
>> make[1]: *** [fs/compat_ioctl.o] Error 1
>>
>> parts of compat ioctl require CONFIG_BLOCK to be set.
>>
>> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
>> Index: b/fs/compat_ioctl.c
>> ===================================================================
>> --- a/fs/compat_ioctl.c
>> +++ b/fs/compat_ioctl.c
>> @@ -63,7 +63,9 @@
>> #include <linux/wireless.h>
>> #include <linux/atalk.h>
>> #include <linux/blktrace_api.h>
>> +#ifdef CONFIG_BLOCK
>> #include <linux/loop.h>
>> +#endif
>
>Adding #ifdef around an #include is considered bad style. Better just
>make loop.h compile without any conditionals. Does the below
>patch work for you?
>
Yes it does.
> Arnd <><
Sebastian
>
>--- a/include/linux/loop.h
>+++ b/include/linux/loop.h
>@@ -63,7 +63,7 @@ struct loop_device {
> struct task_struct *lo_thread;
> wait_queue_head_t lo_event;
>
>- request_queue_t *lo_queue;
>+ struct request_queue *lo_queue;
> struct gendisk *lo_disk;
> struct list_head lo_list;
> };
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-20 23:08 ` Arnd Bergmann
2007-07-21 8:40 ` Sebastian Siewior
@ 2007-07-21 12:44 ` Christoph Hellwig
2007-07-21 13:17 ` Arnd Bergmann
2007-07-24 0:23 ` Andrew Morton
2 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2007-07-21 12:44 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Sebastian Siewior, linux-kernel
On Sat, Jul 21, 2007 at 01:08:57AM +0200, Arnd Bergmann wrote:
> On Saturday 21 July 2007, Sebastian Siewior wrote:
> >
> > Got with randconfig
> > include/linux/loop.h:66: error: expected specifier-qualifier-list before
> > 'request_queue_t'
> > make[1]: *** [fs/compat_ioctl.o] Error 1
> >
> > parts of compat ioctl require CONFIG_BLOCK to be set.
> >
> > Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> > Index: b/fs/compat_ioctl.c
> > ===================================================================
> > --- a/fs/compat_ioctl.c
> > +++ b/fs/compat_ioctl.c
> > @@ -63,7 +63,9 @@
> > ?#include <linux/wireless.h>
> > ?#include <linux/atalk.h>
> > ?#include <linux/blktrace_api.h>
> > +#ifdef CONFIG_BLOCK
> > ?#include <linux/loop.h>
> > +#endif
>
> Adding #ifdef around an #include is considered bad style. Better just
> make loop.h compile without any conditionals. Does the below
> patch work for you?
That patch looks good, but even better would be adding a compat_ioctl
handler to the loop driver. IIRC you even have an old patch for that :)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-21 12:44 ` Christoph Hellwig
@ 2007-07-21 13:17 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2007-07-21 13:17 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Sebastian Siewior, linux-kernel
On Saturday 21 July 2007, Christoph Hellwig wrote:
>
> > Adding #ifdef around an #include is considered bad style. Better just
> > make loop.h compile without any conditionals. Does the below
> > patch work for you?
>
> That patch looks good, but even better would be adding a compat_ioctl
> handler to the loop driver. IIRC you even have an old patch for that
No, that doesn't fly in this case. The loop driver actually has a
compat_ioctl method, but the problem is that some tools try to
call this ioctl on devices other than loop.
We could of course add a fallback handler to compat_blkdev_ioctl(),
but I'm not convinced that this is better than the IGNORE_IOCTL
helper, unless we eventually move all of fs/compat_ioctl.c into
drivers.
Arnd <><
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-20 23:08 ` Arnd Bergmann
2007-07-21 8:40 ` Sebastian Siewior
2007-07-21 12:44 ` Christoph Hellwig
@ 2007-07-24 0:23 ` Andrew Morton
2007-07-24 6:51 ` Jens Axboe
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2007-07-24 0:23 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Sebastian Siewior, linux-kernel, Jens Axboe
On Sat, 21 Jul 2007 01:08:57 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> On Saturday 21 July 2007, Sebastian Siewior wrote:
> >
> > Got with randconfig
> > include/linux/loop.h:66: error: expected specifier-qualifier-list before
> > 'request_queue_t'
> > make[1]: *** [fs/compat_ioctl.o] Error 1
> >
> > parts of compat ioctl require CONFIG_BLOCK to be set.
> >
> > Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> > Index: b/fs/compat_ioctl.c
> > ===================================================================
> > --- a/fs/compat_ioctl.c
> > +++ b/fs/compat_ioctl.c
> > @@ -63,7 +63,9 @@
> > __#include <linux/wireless.h>
> > __#include <linux/atalk.h>
> > __#include <linux/blktrace_api.h>
> > +#ifdef CONFIG_BLOCK
> > __#include <linux/loop.h>
> > +#endif
>
> Adding #ifdef around an #include is considered bad style. Better just
> make loop.h compile without any conditionals. Does the below
> patch work for you?
This is the classic why-typedefs-are-bad. AFAIK there is no way of fixing
this build error apart from adding otherwise-unneeded nested inclusions
(very bad), or:
> Arnd <><
>
> --- a/include/linux/loop.h
> +++ b/include/linux/loop.h
> @@ -63,7 +63,7 @@ struct loop_device {
> struct task_struct *lo_thread;
> wait_queue_head_t lo_event;
>
> - request_queue_t *lo_queue;
> + struct request_queue *lo_queue;
> struct gendisk *lo_disk;
> struct list_head lo_list;
> };
Good start. Now can we do the rest of the kernel? ;)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] compat_ioctl requires CONFIG_BLOCK
2007-07-24 0:23 ` Andrew Morton
@ 2007-07-24 6:51 ` Jens Axboe
0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2007-07-24 6:51 UTC (permalink / raw)
To: Andrew Morton; +Cc: Arnd Bergmann, Sebastian Siewior, linux-kernel
On Mon, Jul 23 2007, Andrew Morton wrote:
> On Sat, 21 Jul 2007 01:08:57 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
>
> > On Saturday 21 July 2007, Sebastian Siewior wrote:
> > >
> > > Got with randconfig
> > > include/linux/loop.h:66: error: expected specifier-qualifier-list before
> > > 'request_queue_t'
> > > make[1]: *** [fs/compat_ioctl.o] Error 1
> > >
> > > parts of compat ioctl require CONFIG_BLOCK to be set.
> > >
> > > Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> > > Index: b/fs/compat_ioctl.c
> > > ===================================================================
> > > --- a/fs/compat_ioctl.c
> > > +++ b/fs/compat_ioctl.c
> > > @@ -63,7 +63,9 @@
> > > __#include <linux/wireless.h>
> > > __#include <linux/atalk.h>
> > > __#include <linux/blktrace_api.h>
> > > +#ifdef CONFIG_BLOCK
> > > __#include <linux/loop.h>
> > > +#endif
> >
> > Adding #ifdef around an #include is considered bad style. Better just
> > make loop.h compile without any conditionals. Does the below
> > patch work for you?
>
> This is the classic why-typedefs-are-bad. AFAIK there is no way of fixing
> this build error apart from adding otherwise-unneeded nested inclusions
> (very bad), or:
>
> > Arnd <><
> >
> > --- a/include/linux/loop.h
> > +++ b/include/linux/loop.h
> > @@ -63,7 +63,7 @@ struct loop_device {
> > struct task_struct *lo_thread;
> > wait_queue_head_t lo_event;
> >
> > - request_queue_t *lo_queue;
> > + struct request_queue *lo_queue;
> > struct gendisk *lo_disk;
> > struct list_head lo_list;
> > };
>
> Good start. Now can we do the rest of the kernel? ;)
Yep indeed, it's been my plan to kill that ugly typedef for some time...
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-07-24 6:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 22:58 [PATCH] compat_ioctl requires CONFIG_BLOCK Sebastian Siewior
2007-07-20 23:08 ` Arnd Bergmann
2007-07-21 8:40 ` Sebastian Siewior
2007-07-21 12:44 ` Christoph Hellwig
2007-07-21 13:17 ` Arnd Bergmann
2007-07-24 0:23 ` Andrew Morton
2007-07-24 6:51 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).