akiradeveloper / dm-writeboost

Log-structured Caching for Linux
GNU General Public License v2.0
123 stars 19 forks source link

FTBFS with kernel 4.8: ‘struct dm_io_request’ has no member named ‘bi_rw’ #164

Closed onlyjob closed 7 years ago

onlyjob commented 7 years ago
In file included from /var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost.h:36:0,
                 from /var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:23:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘wb_io_internal’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:99:58: error: ‘struct dm_io_request’ has no member named ‘bi_rw’
         buf, (unsigned long long) regions->sector, io_req->bi_rw);
                                                          ^
/usr/src/linux-headers-4.8.0-0.bpo.2-common/include/linux/device-mapper.h:536:61: note: in definition of macro ‘DMERR’
  printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
                                                             ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘fill_payload_by_backing’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:611:3: error: unknown field ‘bi_rw’ specified in initializer
   .bi_rw = READ,
   ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:611:3: warning: excess elements in struct initializer
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:611:3: warning: (near initialization for ‘(anonymous)’)
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘read_mb’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:663:4: error: unknown field ‘bi_rw’ specified in initializer
    .bi_rw = READ,
    ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:663:4: warning: excess elements in struct initializer
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:663:4: warning: (near initialization for ‘(anonymous)’)
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘complete_process_write’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1201:9: error: ‘struct bio’ has no member named ‘bi_rw’
  if (bio->bi_rw & REQ_FUA) {
         ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘read_backing_async’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1314:3: error: unknown field ‘bi_rw’ specified in initializer
   .bi_rw = READ,
   ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1314:3: warning: excess elements in struct initializer
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1314:3: warning: (near initialization for ‘(anonymous)’)
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c: In function ‘writeboost_map’:
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1455:9: error: ‘struct bio’ has no member named ‘bi_rw’
  if (bio->bi_rw & REQ_FLUSH)
         ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1455:19: error: ‘REQ_FLUSH’ undeclared (first use in this function)
  if (bio->bi_rw & REQ_FLUSH)
                   ^
/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.c:1455:19: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/linux-headers-4.8.0-0.bpo.2-common/scripts/Makefile.build:294: recipe for target '/var/lib/dkms/dm-writeboost/2.2.5/build/dm-writeboost-target.o' failed
akiradeveloper commented 7 years ago

@onlyjob I believe it's due to that the dm-writeboost is bit old. The issue is fixed in 2.2.6. I should have written in the ChangeLog that I've fixed the issue with 4.8 kernel by the issue #160.

see the commit

https://github.com/akiradeveloper/dm-writeboost/commit/08b96fcad9d223aa80f9ac76ddb677e056066b48

onlyjob commented 7 years ago

OMG I've forgotten to upgrade dm-writeboost on this machine... Sorry, Akira. Everything is OK...