[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel 2.6.36



Hi Klaus,


Klaus Knopper-2 wrote:
> 
> On Mon, Oct 25, 2010 at 07:39:59AM -0700, stirner wrote:
>> Another kernel another patch!!!
> 
> Right, I just noticed they removed blk_fs_request() and locked_ioctl in
> Kernel 2.6.36. 
> 
>> make[1]: Entering directory `/usr/src/linux-2.6.36'
>>   CC [M]  /usr/src/cloop-2.634/compressed_loop.o
>> /usr/src/cloop-2.634/compressed_loop.c: In function 'cloop_do_request':
>> /usr/src/cloop-2.634/compressed_loop.c:384: error: implicit declaration
>> of
>> function 'blk_fs_request'
>> /usr/src/cloop-2.634/compressed_loop.c: At top level:
>> /usr/src/cloop-2.634/compressed_loop.c:905: error: unknown field
>> 'locked_ioctl' specified in initializer
>> make[2]: *** [/usr/src/cloop-2.634/compressed_loop.o] Error 1
>> make[1]: *** [_module_/usr/src/cloop-2.634] Error 2
>> make[1]: Leaving directory `/usr/src/linux-2.6.36'
>> make: *** [cloop.ko] Error 2
>> 
>> No rush
> 
> I just made a quick fix that compiles with Kernel 2.6.36 now (patch for
> cloop-2.6.34 attached), but need to wait for aufs 2.1 being ready for
> kernel 2.6.36 before I can test the new cloop version in a Knoppix live
> session, so, please don't rely on this patch yet. Tests/Bugreports are
> welcome, of course. Especially losetup ioctls have to be tested, since
> there is a call to lock_kernel().
> 
> Regards
> -Klaus
> 
> --- cloop-2.634/compressed_loop.c	2010-08-25 13:35:21.000000000 +0200
> +++ cloop-2.636/compressed_loop.c	2010-10-25 22:01:48.000000000 +0200
> @@ -20,7 +20,7 @@
>   */
>  
>  #define CLOOP_NAME "cloop"
> -#define CLOOP_VERSION "2.634"
> +#define CLOOP_VERSION "2.636"
>  #define CLOOP_MAX 8
>  
>  #ifndef KBUILD_MODNAME
> @@ -381,7 +381,9 @@
>     struct cloop_device *clo;
>     int rw;
>   /* quick sanity checks */
> -   if (unlikely(!blk_fs_request(req))) goto error_continue;
> +   /* blk_fs_request() was removed in 2.6.36 */
> +   if (unlikely(req == NULL || (req->cmd_type != REQ_TYPE_FS)))
> +    goto error_continue;
>     rw = rq_data_dir(req);
>     if (unlikely(rw != READ && rw != READA))
>      {
> @@ -835,6 +837,7 @@
>   cloop_num = MINOR(bdev->bd_dev);
>   if (cloop_num < 0 || cloop_num > cloop_count-1) return -ENODEV;
>   clo = &cloop_dev[cloop_num];
> + lock_kernel();
>   switch (cmd)
>    { /* We use the same ioctls that loop does */
>     case LOOP_CHANGE_FD:
> @@ -867,6 +870,7 @@
>     default:
>       err = -EINVAL;
>    }
> + unlock_kernel();
>   return err;
>  }
>  
> @@ -902,7 +906,8 @@
>          owner:		THIS_MODULE,
>          open:           cloop_open,
>          release:        cloop_close,
> -	locked_ioctl:   cloop_ioctl
> +	ioctl:          cloop_ioctl
> +	/* locked_ioctl ceased to exist in 2.6.36 */
>  };
>  
>  static int cloop_register_blkdev(int major_nr)
> 
> 

Does not work for me:

make[2]: Entering directory
`/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/linux-2.6.36'
  CC [M] 
/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/cloop-2.631/compressed_loop.o
/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/cloop-2.631/compressed_loop.c:
In function ‘cloop_ioctl’:
/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/cloop-2.631/compressed_loop.c:840:
error: implicit declaration of function ‘lock_kernel’
/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/cloop-2.631/compressed_loop.c:873:
error: implicit declaration of function ‘unlock_kernel’
make[3]: ***
[/srv/home/tschmitt/linbo/linuxmuster-linbo/trunk/kernel/cloop-2.631/compressed_loop.o]
Fehler 1

Both 2.634 and 2.636 patches were applied to cloop 2.631.

Regards
Thomas Schmitt

-- 
View this message in context: http://old.nabble.com/Kernel-2.6.36-tp30048538p30084614.html
Sent from the debian-knoppix mailing list archive at Nabble.com.


Reply to: