block-6.7-2023-12-29

-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmWO7A0QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpjqsEAC4IpYMGeEiY2kEBPLKm/vUEFsQtT2YkdN0
 isc6h6xepmqeZO9a+6jLZ5zadCT6IbCdORN0zUrO91lRdfVolIGNDWnkArAye7Yj
 62FbYf7+G7WebW8XAMkbx43dFik7qneZpN852b/kaGSHF+SZPsj2hTG5yRuuahcA
 nVKRk+7U8Y0ZvjCpd6E2Ir2R86KU/JspCEWCYvQ/kz/AYyxQzZUElRO4ptPB/NTb
 EcWexEFaLi770UkNqrKf87YlcnWiWbeNyeTjRrzDsp4nf8MwxB+tgg2ApGf4lMLv
 B7lTEIjww7JbsVouLf/EWylp+PI+Ebl4tA3oiya/skby/eiO5fhXMM6NsnIxKx/a
 Lg3uOg4Xs2Se0GYiw63mDZCpf/+joKTike6smG76GQ5cdsDQoHczvGiAPul5Bp5w
 6s5whj4ODdxbLsUqZlfToeZnLL91TI8+UbVJt/fIp5lF0+tiICvdpa2b3hBn6rYP
 WmenW21OX1Pr4S7X1+lAc8MD/hYpEpbY4U5jWKOejxA9KeQNAK9TJOWQQF3Lu6/s
 EGzJpFJmZd+G6qSMuJHSoHlPHk9WfHXGatQ/T9ecizVfj7FlUPtbFvbyoKzkY4xK
 8Z1pRd2JhDS7GB2bgu/+Eagz0LksHnAe4eK52wgy/uvNdcbTsLGUgsQyAWHHaCKY
 7OUzMi/ekg==
 =wPUa
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2023-12-29 11:41:40 -08:00
commit 09c57a762e
2 changed files with 5 additions and 3 deletions

View File

@ -1312,12 +1312,14 @@ re_check:
prev = prev_badblocks(bb, &bad, hint);
/* start after all badblocks */
if ((prev + 1) >= bb->count && !overlap_front(bb, prev, &bad)) {
if ((prev >= 0) &&
((prev + 1) >= bb->count) && !overlap_front(bb, prev, &bad)) {
len = sectors;
goto update_sectors;
}
if (overlap_front(bb, prev, &bad)) {
/* Overlapped with front badblocks record */
if ((prev >= 0) && overlap_front(bb, prev, &bad)) {
if (BB_ACK(p[prev]))
acked_badblocks++;
else

View File

@ -538,7 +538,7 @@ struct request_queue {
#define QUEUE_FLAG_ADD_RANDOM 10 /* Contributes to random pool */
#define QUEUE_FLAG_SYNCHRONOUS 11 /* always completes in submit context */
#define QUEUE_FLAG_SAME_FORCE 12 /* force complete on same CPU */
#define QUEUE_FLAG_HW_WC 18 /* Write back caching supported */
#define QUEUE_FLAG_HW_WC 13 /* Write back caching supported */
#define QUEUE_FLAG_INIT_DONE 14 /* queue is initialized */
#define QUEUE_FLAG_STABLE_WRITES 15 /* don't modify blks until WB is done */
#define QUEUE_FLAG_POLL 16 /* IO polling enabled if set */