mfrw / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

code in 195:cb1d3ff91390 doesn't compile with linux 2.6.36 #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. hg checkout current trunk
2. make

make -C "/lib/modules/2.6.36/build" M=/home/wolf/compcache/compcache modules
make[1]: Entering directory `/home/wolf/linux-2.6'
  CC [M]  /home/wolf/compcache/compcache/zram_drv.o
/home/wolf/compcache/compcache/zram_drv.c: In function ‘zram_make_request’:
/home/wolf/compcache/compcache/zram_drv.c:461:2: error: implicit declaration of 
function ‘bio_rw_flagged’
/home/wolf/compcache/compcache/zram_drv.c:461:6: error: ‘BIO_RW_DISCARD’ 
undeclared (first use in this function)
/home/wolf/compcache/compcache/zram_drv.c:461:6: note: each undeclared 
identifier is reported only once for each function it appears in
make[2]: *** [/home/wolf/compcache/compcache/zram_drv.o] Error 1
make[1]: *** [_module_/home/wolf/compcache/compcache] Error 2
make[1]: Leaving directory `/home/wolf/linux-2.6'
make: *** [all] Error 2

Since this version of kernel:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b6d
91daee5cac6402186ff224c3af39d79f4a0e

You need this patch:

diff -r cb1d3ff91390 zram_drv.c
--- a/zram_drv.c        Fri Sep 10 10:15:02 2010 -0400
+++ b/zram_drv.c        Thu Nov 11 03:18:12 2010 +0200
@@ -458,7 +458,7 @@
                return 0;
        }

-       if (unlikely(bio_rw_flagged(bio, BIO_RW_DISCARD))) {
+       if (unlikely(bio->bi_rw & REQ_DISCARD)) {
                zram_discard(zram, bio);
                return 0;
        }

At least to my brief look at the kernel history. I may be wrong and the change 
may be more subtle, I don't know.

Also, please update README to say that no patch is needed for kernel version 
>=2.6.35.

Original issue reported on code.google.com by zeev.tar...@gmail.com on 11 Nov 2010 at 1:27

GoogleCodeExporter commented 9 years ago
I'm getting this error on 2.6.36.2. Builds fine with the suggested patch, 
haven't tried it out yet.

Original comment by cookieca...@gmail.com on 19 Dec 2010 at 6:23

GoogleCodeExporter commented 9 years ago
The patch is already applied when I checked out the source yesterday. I'm still 
getting the error. I'm using kernel 2.6.36.2 with the CK patchset applied.

Original comment by badage...@gmail.com on 8 Jan 2011 at 9:07

GoogleCodeExporter commented 9 years ago
Block discard support has been temporarily removed, so this issue no longer 
exists. So, please pull and try again.

Original comment by nitingupta910@gmail.com on 23 Jan 2011 at 12:05