Skip to content

Commit

Permalink
fix for lk6.10
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeiShtepa committed Jun 3, 2024
1 parent 33b6fc1 commit feb6481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/Makefile-config
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep "__blk_alloc_disk" $(srctree)/include/linux/blkdev.h | \
grep -qw "struct queue_limits" && \
echo -D HAVE_BDEV_QUEUE_LIMITS)


EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep -qw "void blk_queue_max_hw_sectors" $(srctree)/include/linux/blkdev.h && \
echo -D HAVE_BLK_QUEUE_MAX_HW_SECTORS)

3 changes: 3 additions & 0 deletions module/snapimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,13 @@ struct snapimage *snapimage_create(struct diff_area *diff_area,

blk_queue_bounce_limit(snapimage->queue, BLK_BOUNCE_HIGH);
#endif

#ifdef HAVE_BLK_QUEUE_MAX_HW_SECTORS
#ifdef BLK_DEF_MAX_SECTORS_CAP
blk_queue_max_hw_sectors(disk->queue, BLK_DEF_MAX_SECTORS_CAP);
#else
blk_queue_max_hw_sectors(disk->queue, BLK_DEF_MAX_SECTORS);
#endif
#endif
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, disk->queue);

Expand Down

0 comments on commit feb6481

Please sign in to comment.