Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-6.7-2023-12-29' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
"Fix for a badly numbered flag, and a regression fix for the badblocks
updates from this merge window"

* tag 'block-6.7-2023-12-29' of git://git.kernel.dk/linux:
block: renumber QUEUE_FLAG_HW_WC
badblocks: avoid checking invalid range in badblocks_check()

+5 -3
+4 -2
block/badblocks.c
··· 1312 1312 prev = prev_badblocks(bb, &bad, hint); 1313 1313 1314 1314 /* start after all badblocks */ 1315 - if ((prev + 1) >= bb->count && !overlap_front(bb, prev, &bad)) { 1315 + if ((prev >= 0) && 1316 + ((prev + 1) >= bb->count) && !overlap_front(bb, prev, &bad)) { 1316 1317 len = sectors; 1317 1318 goto update_sectors; 1318 1319 } 1319 1320 1320 - if (overlap_front(bb, prev, &bad)) { 1321 + /* Overlapped with front badblocks record */ 1322 + if ((prev >= 0) && overlap_front(bb, prev, &bad)) { 1321 1323 if (BB_ACK(p[prev])) 1322 1324 acked_badblocks++; 1323 1325 else
+1 -1
include/linux/blkdev.h
··· 538 538 #define QUEUE_FLAG_ADD_RANDOM 10 /* Contributes to random pool */ 539 539 #define QUEUE_FLAG_SYNCHRONOUS 11 /* always completes in submit context */ 540 540 #define QUEUE_FLAG_SAME_FORCE 12 /* force complete on same CPU */ 541 - #define QUEUE_FLAG_HW_WC 18 /* Write back caching supported */ 541 + #define QUEUE_FLAG_HW_WC 13 /* Write back caching supported */ 542 542 #define QUEUE_FLAG_INIT_DONE 14 /* queue is initialized */ 543 543 #define QUEUE_FLAG_STABLE_WRITES 15 /* don't modify blks until WB is done */ 544 544 #define QUEUE_FLAG_POLL 16 /* IO polling enabled if set */