Skip to content

Commit 9dd6956

Browse files
committed
Merge tag 'for-6.4/block-2023-04-21' of git://git.kernel.dk/linux
Pull block updates from Jens Axboe: - drbd patches, bringing us closer to unifying the out-of-tree version and the in tree one (Andreas, Christoph) - support for auto-quiesce for the s390 dasd driver (Stefan) - MD pull request via Song: - md/bitmap: Optimal last page size (Jon Derrick) - Various raid10 fixes (Yu Kuai, Li Nan) - md: add error_handlers for raid0 and linear (Mariusz Tkaczyk) - NVMe pull request via Christoph: - Drop redundant pci_enable_pcie_error_reporting (Bjorn Helgaas) - Validate nvmet module parameters (Chaitanya Kulkarni) - Fence TCP socket on receive error (Chris Leech) - Fix async event trace event (Keith Busch) - Minor cleanups (Chaitanya Kulkarni, zhenwei pi) - Fix and cleanup nvmet Identify handling (Damien Le Moal, Christoph Hellwig) - Fix double blk_mq_complete_request race in the timeout handler (Lei Yin) - Fix irq locking in nvme-fcloop (Ming Lei) - Remove queue mapping helper for rdma devices (Sagi Grimberg) - use structured request attribute checks for nbd (Jakub) - fix blk-crypto race conditions between keyslot management (Eric) - add sed-opal support for reading read locking range attributes (Ondrej) - make fault injection configurable for null_blk (Akinobu) - clean up the request insertion API (Christoph) - clean up the queue running API (Christoph) - blkg config helper cleanups (Tejun) - lazy init support for blk-iolatency (Tejun) - various fixes and tweaks to ublk (Ming) - remove hybrid polling. It hasn't really been useful since we got async polled IO support, and these days we don't support sync polled IO at all (Keith) - misc fixes, cleanups, improvements (Zhong, Ondrej, Colin, Chengming, Chaitanya, me) * tag 'for-6.4/block-2023-04-21' of git://git.kernel.dk/linux: (118 commits) nbd: fix incomplete validation of ioctl arg ublk: don't return 0 in case of any failure sed-opal: geometry feature reporting command null_blk: Always check queue mode setting from configfs block: ublk: switch to ioctl command encoding blk-mq: fix the blk_mq_add_to_requeue_list call in blk_kick_flush block, bfq: Fix division by zero error on zero wsum fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m block: store bdev->bd_disk->fops->submit_bio state in bdev block: re-arrange the struct block_device fields for better layout md/raid5: remove unused working_disks variable md/raid10: don't call bio_start_io_acct twice for bio which experienced read error md/raid10: fix memleak of md thread md/raid10: fix memleak for 'conf->bio_split' md/raid10: fix leak of 'r10bio->remaining' for recovery md/raid10: don't BUG_ON() in raise_barrier() md: fix soft lockup in status_resync md: add error_handlers for raid0 and linear md: Use optimal I/O size for last bitmap page md: Fix types in sb writer ...
2 parents 5b9a7bb + 55793ea commit 9dd6956

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2255
-1768
lines changed

Documentation/ABI/stable/sysfs-block

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,11 @@ What: /sys/block/<disk>/queue/io_poll_delay
336336
Date: November 2016
337337
338338
Description:
339-
[RW] If polling is enabled, this controls what kind of polling
340-
will be performed. It defaults to -1, which is classic polling.
339+
[RW] This was used to control what kind of polling will be
340+
performed. It is now fixed to -1, which is classic polling.
341341
In this mode, the CPU will repeatedly ask for completions
342-
without giving up any time. If set to 0, a hybrid polling mode
343-
is used, where the kernel will attempt to make an educated guess
344-
at when the IO will complete. Based on this guess, the kernel
345-
will put the process issuing IO to sleep for an amount of time,
346-
before entering a classic poll loop. This mode might be a little
347-
slower than pure classic polling, but it will be more efficient.
348-
If set to a value larger than 0, the kernel will put the process
349-
issuing IO to sleep for this amount of microseconds before
350-
entering classic polling.
342+
without giving up any time.
343+
<deprecated>
351344

352345

353346
What: /sys/block/<disk>/queue/io_timeout

Documentation/block/inline-encryption.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ Request queue based layered devices like dm-rq that wish to support inline
270270
encryption need to create their own blk_crypto_profile for their request_queue,
271271
and expose whatever functionality they choose. When a layered device wants to
272272
pass a clone of that request to another request_queue, blk-crypto will
273-
initialize and prepare the clone as necessary; see
274-
``blk_crypto_insert_cloned_request()``.
273+
initialize and prepare the clone as necessary.
275274

276275
Interaction between inline encryption and blk integrity
277276
=======================================================

Documentation/fault-injection/fault-injection.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ Available fault injection capabilities
5252
status code is NVME_SC_INVALID_OPCODE with no retry. The status code and
5353
retry flag can be set via the debugfs.
5454

55+
- Null test block driver fault injection
56+
57+
inject IO timeouts by setting config items under
58+
/sys/kernel/config/nullb/<disk>/timeout_inject,
59+
inject requeue requests by setting config items under
60+
/sys/kernel/config/nullb/<disk>/requeue_inject, and
61+
inject init_hctx() errors by setting config items under
62+
/sys/kernel/config/nullb/<disk>/init_hctx_fault_inject.
5563

5664
Configure fault-injection capabilities behavior
5765
-----------------------------------------------

arch/s390/include/uapi/asm/dasd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ typedef struct dasd_information2_t {
7878
* 0x040: give access to raw eckd data
7979
* 0x080: enable discard support
8080
* 0x100: enable autodisable for IFCC errors (default)
81+
* 0x200: enable requeue of all requests on autoquiesce
8182
*/
8283
#define DASD_FEATURE_READONLY 0x001
8384
#define DASD_FEATURE_USEDIAG 0x002
@@ -88,6 +89,7 @@ typedef struct dasd_information2_t {
8889
#define DASD_FEATURE_USERAW 0x040
8990
#define DASD_FEATURE_DISCARD 0x080
9091
#define DASD_FEATURE_PATH_AUTODISABLE 0x100
92+
#define DASD_FEATURE_REQUEUEQUIESCE 0x200
9193
#define DASD_FEATURE_DEFAULT DASD_FEATURE_PATH_AUTODISABLE
9294

9395
#define DASD_PARTN_BITS 2

block/Kconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,6 @@ config BLK_MQ_VIRTIO
215215
depends on VIRTIO
216216
default y
217217

218-
config BLK_MQ_RDMA
219-
bool
220-
depends on INFINIBAND
221-
default y
222-
223218
config BLK_PM
224219
def_bool PM
225220

block/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ obj-$(CONFIG_BLK_DEV_INTEGRITY) += bio-integrity.o blk-integrity.o
3030
obj-$(CONFIG_BLK_DEV_INTEGRITY_T10) += t10-pi.o
3131
obj-$(CONFIG_BLK_MQ_PCI) += blk-mq-pci.o
3232
obj-$(CONFIG_BLK_MQ_VIRTIO) += blk-mq-virtio.o
33-
obj-$(CONFIG_BLK_MQ_RDMA) += blk-mq-rdma.o
3433
obj-$(CONFIG_BLK_DEV_ZONED) += blk-zoned.o
3534
obj-$(CONFIG_BLK_WBT) += blk-wbt.o
3635
obj-$(CONFIG_BLK_DEBUG_FS) += blk-mq-debugfs.o

block/bdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno)
419419
bdev->bd_inode = inode;
420420
bdev->bd_queue = disk->queue;
421421
bdev->bd_stats = alloc_percpu(struct disk_stats);
422+
bdev->bd_has_submit_bio = false;
422423
if (!bdev->bd_stats) {
423424
iput(inode);
424425
return NULL;

block/bfq-cgroup.c

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,9 @@ static struct blkcg_policy_data *bfq_cpd_alloc(gfp_t gfp)
497497
bgd = kzalloc(sizeof(*bgd), gfp);
498498
if (!bgd)
499499
return NULL;
500-
return &bgd->pd;
501-
}
502-
503-
static void bfq_cpd_init(struct blkcg_policy_data *cpd)
504-
{
505-
struct bfq_group_data *d = cpd_to_bfqgd(cpd);
506500

507-
d->weight = cgroup_subsys_on_dfl(io_cgrp_subsys) ?
508-
CGROUP_WEIGHT_DFL : BFQ_WEIGHT_LEGACY_DFL;
501+
bgd->weight = CGROUP_WEIGHT_DFL;
502+
return &bgd->pd;
509503
}
510504

511505
static void bfq_cpd_free(struct blkcg_policy_data *cpd)
@@ -1111,9 +1105,11 @@ static ssize_t bfq_io_set_device_weight(struct kernfs_open_file *of,
11111105
struct bfq_group *bfqg;
11121106
u64 v;
11131107

1114-
ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, buf, &ctx);
1108+
blkg_conf_init(&ctx, buf);
1109+
1110+
ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, &ctx);
11151111
if (ret)
1116-
return ret;
1112+
goto out;
11171113

11181114
if (sscanf(ctx.body, "%llu", &v) == 1) {
11191115
/* require "default" on dfl */
@@ -1135,7 +1131,7 @@ static ssize_t bfq_io_set_device_weight(struct kernfs_open_file *of,
11351131
ret = 0;
11361132
}
11371133
out:
1138-
blkg_conf_finish(&ctx);
1134+
blkg_conf_exit(&ctx);
11391135
return ret ?: nbytes;
11401136
}
11411137

@@ -1301,8 +1297,6 @@ struct blkcg_policy blkcg_policy_bfq = {
13011297
.legacy_cftypes = bfq_blkcg_legacy_files,
13021298

13031299
.cpd_alloc_fn = bfq_cpd_alloc,
1304-
.cpd_init_fn = bfq_cpd_init,
1305-
.cpd_bind_fn = bfq_cpd_init,
13061300
.cpd_free_fn = bfq_cpd_free,
13071301

13081302
.pd_alloc_fn = bfq_pd_alloc,

block/bfq-iosched.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129
#include "elevator.h"
130130
#include "blk.h"
131131
#include "blk-mq.h"
132-
#include "blk-mq-tag.h"
133132
#include "blk-mq-sched.h"
134133
#include "bfq-iosched.h"
135134
#include "blk-wbt.h"
@@ -649,6 +648,8 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
649648
sched_data->service_tree[i].wsum;
650649
}
651650
}
651+
if (!wsum)
652+
continue;
652653
limit = DIV_ROUND_CLOSEST(limit * entity->weight, wsum);
653654
if (entity->allocated >= limit) {
654655
bfq_log_bfqq(bfqq->bfqd, bfqq,
@@ -6232,7 +6233,7 @@ static inline void bfq_update_insert_stats(struct request_queue *q,
62326233
static struct bfq_queue *bfq_init_rq(struct request *rq);
62336234

62346235
static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
6235-
bool at_head)
6236+
blk_insert_t flags)
62366237
{
62376238
struct request_queue *q = hctx->queue;
62386239
struct bfq_data *bfqd = q->elevator->elevator_data;
@@ -6255,11 +6256,10 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
62556256

62566257
trace_block_rq_insert(rq);
62576258

6258-
if (!bfqq || at_head) {
6259-
if (at_head)
6260-
list_add(&rq->queuelist, &bfqd->dispatch);
6261-
else
6262-
list_add_tail(&rq->queuelist, &bfqd->dispatch);
6259+
if (flags & BLK_MQ_INSERT_AT_HEAD) {
6260+
list_add(&rq->queuelist, &bfqd->dispatch);
6261+
} else if (!bfqq) {
6262+
list_add_tail(&rq->queuelist, &bfqd->dispatch);
62636263
} else {
62646264
idle_timer_disabled = __bfq_insert_request(bfqd, rq);
62656265
/*
@@ -6289,14 +6289,15 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
62896289
}
62906290

62916291
static void bfq_insert_requests(struct blk_mq_hw_ctx *hctx,
6292-
struct list_head *list, bool at_head)
6292+
struct list_head *list,
6293+
blk_insert_t flags)
62936294
{
62946295
while (!list_empty(list)) {
62956296
struct request *rq;
62966297

62976298
rq = list_first_entry(list, struct request, queuelist);
62986299
list_del_init(&rq->queuelist);
6299-
bfq_insert_request(hctx, rq, at_head);
6300+
bfq_insert_request(hctx, rq, flags);
63006301
}
63016302
}
63026303

block/bfq-iosched.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#define BFQ_DEFAULT_QUEUE_IOPRIO 4
2222

23-
#define BFQ_WEIGHT_LEGACY_DFL 100
2423
#define BFQ_DEFAULT_GRP_IOPRIO 0
2524
#define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE
2625

0 commit comments

Comments
 (0)