Skip to content

Commit 277100b

Browse files
committed
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
2 parents c8e7699 + 4c4ab8a commit 277100b

File tree

4 files changed

+4
-43
lines changed

4 files changed

+4
-43
lines changed

block/blk-lib.c

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,6 @@ static sector_t bio_discard_limit(struct block_device *bdev, sector_t sector)
3535
return round_down(UINT_MAX, discard_granularity) >> SECTOR_SHIFT;
3636
}
3737

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-
5838
int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
5939
sector_t nr_sects, gfp_t gfp_mask, struct bio **biop)
6040
{
@@ -97,10 +77,6 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
9777
* is disabled.
9878
*/
9979
cond_resched();
100-
if (fatal_signal_pending(current)) {
101-
await_bio_chain(bio);
102-
return -EINTR;
103-
}
10480
}
10581

10682
*biop = bio;
@@ -167,10 +143,6 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev,
167143
nr_sects -= len;
168144
sector += len;
169145
cond_resched();
170-
if (fatal_signal_pending(current)) {
171-
await_bio_chain(bio);
172-
return -EINTR;
173-
}
174146
}
175147

176148
*biop = bio;
@@ -215,10 +187,6 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev,
215187
break;
216188
}
217189
cond_resched();
218-
if (fatal_signal_pending(current)) {
219-
await_bio_chain(bio);
220-
return -EINTR;
221-
}
222190
}
223191

224192
*biop = bio;
@@ -309,7 +277,7 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
309277
bio_put(bio);
310278
}
311279
blk_finish_plug(&plug);
312-
if (ret && ret != -EINTR && try_write_zeroes) {
280+
if (ret && try_write_zeroes) {
313281
if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
314282
try_write_zeroes = false;
315283
goto retry;
@@ -361,12 +329,6 @@ int blkdev_issue_secure_erase(struct block_device *bdev, sector_t sector,
361329
sector += len;
362330
nr_sects -= len;
363331
cond_resched();
364-
if (fatal_signal_pending(current)) {
365-
await_bio_chain(bio);
366-
ret = -EINTR;
367-
bio = NULL;
368-
break;
369-
}
370332
}
371333
if (bio) {
372334
ret = submit_bio_wait(bio);

block/blk-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int queue_limits_commit_update(struct request_queue *q,
267267
EXPORT_SYMBOL_GPL(queue_limits_commit_update);
268268

269269
/**
270-
* queue_limits_commit_set - apply queue limits to queue
270+
* queue_limits_set - apply queue limits to queue
271271
* @q: queue to update
272272
* @lim: limits to apply
273273
*

block/blk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static inline u64 blk_time_get_ns(void)
534534
{
535535
struct blk_plug *plug = current->plug;
536536

537-
if (!plug)
537+
if (!plug || !in_task())
538538
return ktime_get_ns();
539539

540540
/*

block/mq-deadline.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,8 @@ static void dd_depth_updated(struct blk_mq_hw_ctx *hctx)
646646
struct request_queue *q = hctx->queue;
647647
struct deadline_data *dd = q->elevator->elevator_data;
648648
struct blk_mq_tags *tags = hctx->sched_tags;
649-
unsigned int shift = tags->bitmap_tags.sb.shift;
650649

651-
dd->async_depth = max(1U, 3 * (1U << shift) / 4);
650+
dd->async_depth = max(1UL, 3 * q->nr_requests / 4);
652651

653652
sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth);
654653
}

0 commit comments

Comments
 (0)