akiradeveloper / dm-writeboost

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

blkdev_issue_flush: discard unused memory allocation flags #227

Closed piso77 closed 3 years ago

piso77 commented 3 years ago

Since:

commit c6bf3f0e25f4c0f0ecce6cf8d1c589bd9d74d3cf Author: Christoph Hellwig hch@lst.de Date: Tue Jan 26 15:52:35 2021 +0100

block: use an on-stack bio in blkdev_issue_flush

is no point in allocating memory for a synchronous flush.

blkdev_issue_flush() doesn't accept memory allocation flags as a parameter anymore, so discard them.

Signed-off-by: Paolo Pisati paolo.pisati@canonical.com

akiradeveloper commented 3 years ago

Compile error happens with 5.12. Confirmed.

~/dm-writeboost/src$ make
make -C /lib/modules/5.12.0/build M=/home/akira/dm-writeboost/src modules
make[1]: Entering directory '/home/akira/linux'
  CC [M]  /home/akira/dm-writeboost/src/dm-writeboost-target.o
In file included from /home/akira/dm-writeboost/src/dm-writeboost-target.c:23:
/home/akira/dm-writeboost/src/dm-writeboost-target.c: In function ‘writeboost_postsuspend’:
/home/akira/dm-writeboost/src/dm-writeboost.h:532:37: error: too many arguments to function ‘blkdev_issue_flush’
 #define dm_blkdev_issue_flush(x, y) blkdev_issue_flush(x, y)
                                     ^~~~~~~~~~~~~~~~~~
/home/akira/dm-writeboost/src/dm-writeboost-target.c:1840:2: note: in expansion of macro ‘dm_blkdev_issue_flush’
  dm_blkdev_issue_flush(wb->cache_dev->bdev, GFP_NOIO);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/device-mapper.h:12,
                 from /home/akira/dm-writeboost/src/dm-writeboost.h:36,
                 from /home/akira/dm-writeboost/src/dm-writeboost-target.c:23:
./include/linux/blkdev.h:1289:5: note: declared here
 int blkdev_issue_flush(struct block_device *bdev);
     ^~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:271: /home/akira/dm-writeboost/src/dm-writeboost-target.o] Error 1
make[1]: *** [Makefile:1851: /home/akira/dm-writeboost/src] Error 2
make[1]: Leaving directory '/home/akira/linux'
make: *** [Makefile:11: all] Error 2