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

Merge tag 'block-6.9-20240315' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

- Revert of a change for mq-deadline that went into the 6.8 release,
causing a performance regression for some (Bart)

- Revert of the interruptible discard handling. This needs more work
since the ioctl and fs path aren't properly split, and will happen
for the 6.10 kernel release. For 6.9, do the minimal revert
(Christoph)

- Fix for an issue with the timestamp caching code (me)

- kerneldoc fix (Jiapeng)

* tag 'block-6.9-20240315' of git://git.kernel.dk/linux:
block: fix mismatched kerneldoc function name
Revert "blk-lib: check for kill signal"
Revert "block/mq-deadline: use correct way to throttling write requests"
block: limit block time caching to in_task() context

+4 -43
+1 -39
block/blk-lib.c
··· 35 35 return round_down(UINT_MAX, discard_granularity) >> SECTOR_SHIFT; 36 36 } 37 37 38 - static void await_bio_endio(struct bio *bio) 39 - { 40 - complete(bio->bi_private); 41 - bio_put(bio); 42 - } 43 - 44 - /* 45 - * await_bio_chain - ends @bio and waits for every chained bio to complete 46 - */ 47 - static void await_bio_chain(struct bio *bio) 48 - { 49 - DECLARE_COMPLETION_ONSTACK_MAP(done, 50 - bio->bi_bdev->bd_disk->lockdep_map); 51 - 52 - bio->bi_private = &done; 53 - bio->bi_end_io = await_bio_endio; 54 - bio_endio(bio); 55 - blk_wait_io(&done); 56 - } 57 - 58 38 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, 59 39 sector_t nr_sects, gfp_t gfp_mask, struct bio **biop) 60 40 { ··· 77 97 * is disabled. 78 98 */ 79 99 cond_resched(); 80 - if (fatal_signal_pending(current)) { 81 - await_bio_chain(bio); 82 - return -EINTR; 83 - } 84 100 } 85 101 86 102 *biop = bio; ··· 143 167 nr_sects -= len; 144 168 sector += len; 145 169 cond_resched(); 146 - if (fatal_signal_pending(current)) { 147 - await_bio_chain(bio); 148 - return -EINTR; 149 - } 150 170 } 151 171 152 172 *biop = bio; ··· 187 215 break; 188 216 } 189 217 cond_resched(); 190 - if (fatal_signal_pending(current)) { 191 - await_bio_chain(bio); 192 - return -EINTR; 193 - } 194 218 } 195 219 196 220 *biop = bio; ··· 277 309 bio_put(bio); 278 310 } 279 311 blk_finish_plug(&plug); 280 - if (ret && ret != -EINTR && try_write_zeroes) { 312 + if (ret && try_write_zeroes) { 281 313 if (!(flags & BLKDEV_ZERO_NOFALLBACK)) { 282 314 try_write_zeroes = false; 283 315 goto retry; ··· 329 361 sector += len; 330 362 nr_sects -= len; 331 363 cond_resched(); 332 - if (fatal_signal_pending(current)) { 333 - await_bio_chain(bio); 334 - ret = -EINTR; 335 - bio = NULL; 336 - break; 337 - } 338 364 } 339 365 if (bio) { 340 366 ret = submit_bio_wait(bio);
+1 -1
block/blk-settings.c
··· 267 267 EXPORT_SYMBOL_GPL(queue_limits_commit_update); 268 268 269 269 /** 270 - * queue_limits_commit_set - apply queue limits to queue 270 + * queue_limits_set - apply queue limits to queue 271 271 * @q: queue to update 272 272 * @lim: limits to apply 273 273 *
+1 -1
block/blk.h
··· 534 534 { 535 535 struct blk_plug *plug = current->plug; 536 536 537 - if (!plug) 537 + if (!plug || !in_task()) 538 538 return ktime_get_ns(); 539 539 540 540 /*
+1 -2
block/mq-deadline.c
··· 646 646 struct request_queue *q = hctx->queue; 647 647 struct deadline_data *dd = q->elevator->elevator_data; 648 648 struct blk_mq_tags *tags = hctx->sched_tags; 649 - unsigned int shift = tags->bitmap_tags.sb.shift; 650 649 651 - dd->async_depth = max(1U, 3 * (1U << shift) / 4); 650 + dd->async_depth = max(1UL, 3 * q->nr_requests / 4); 652 651 653 652 sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth); 654 653 }