Skip to content

Commit 47454ca

Browse files
committed
Merge tag 'block-5.12-2021-03-05' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: - NVMe fixes: - more device quirks (Julian Einwag, Zoltán Böszörményi, Pascal Terjan) - fix a hwmon error return (Daniel Wagner) - fix the keep alive timeout initialization (Martin George) - ensure the model_number can't be changed on a used subsystem (Max Gurtovoy) - rsxx missing -EFAULT on copy_to_user() failure (Dan) - rsxx remove unused linux.h include (Tian) - kill unused RQF_SORTED (Jean) - updated outdated BFQ comments (Joseph) - revert work-around commit for bd_size_lock, since we removed the offending user in this merge window (Damien) * tag 'block-5.12-2021-03-05' of git://git.kernel.dk/linux-block: nvmet: model_number must be immutable once set nvme-fabrics: fix kato initialization nvme-hwmon: Return error code when registration fails nvme-pci: add quirks for Lexar 256GB SSD nvme-pci: mark Kingston SKC2000 as not supporting the deepest power state nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST. rsxx: Return -EFAULT if copy_to_user() fails block/bfq: update comments and default value in docs for fifo_expire rsxx: remove unused including <linux/version.h> block: Drop leftover references to RQF_SORTED block: revert "block: fix bd_size_lock use"
2 parents f292e87 + a2b658e commit 47454ca

File tree

16 files changed

+75
-69
lines changed

16 files changed

+75
-69
lines changed

Documentation/block/bfq-iosched.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ fifo_expire_async
430430
-----------------
431431

432432
This parameter is used to set the timeout of asynchronous requests. Default
433-
value of this is 248ms.
433+
value of this is 250ms.
434434

435435
fifo_expire_sync
436436
----------------
437437

438438
This parameter is used to set the timeout of synchronous requests. Default
439-
value of this is 124ms. In case to favor synchronous requests over asynchronous
439+
value of this is 125ms. In case to favor synchronous requests over asynchronous
440440
one, this value should be decreased relative to fifo_expire_async.
441441

442442
low_latency

block/bfq-iosched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ BFQ_BFQQ_FNS(split_coop);
162162
BFQ_BFQQ_FNS(softrt_update);
163163
#undef BFQ_BFQQ_FNS \
164164

165-
/* Expiration time of sync (0) and async (1) requests, in ns. */
165+
/* Expiration time of async (0) and sync (1) requests, in ns. */
166166
static const u64 bfq_fifo_expire[2] = { NSEC_PER_SEC / 4, NSEC_PER_SEC / 8 };
167167

168168
/* Maximum backwards seek (magic number lifted from CFQ), in KiB. */

block/blk-mq-debugfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ static const char *const cmd_flag_name[] = {
292292

293293
#define RQF_NAME(name) [ilog2((__force u32)RQF_##name)] = #name
294294
static const char *const rqf_name[] = {
295-
RQF_NAME(SORTED),
296295
RQF_NAME(STARTED),
297296
RQF_NAME(SOFTBARRIER),
298297
RQF_NAME(FLUSH_SEQ),

block/blk-mq-sched.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq)
385385
EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);
386386

387387
static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
388-
bool has_sched,
389388
struct request *rq)
390389
{
391390
/*
@@ -402,9 +401,6 @@ static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
402401
if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
403402
return true;
404403

405-
if (has_sched)
406-
rq->rq_flags |= RQF_SORTED;
407-
408404
return false;
409405
}
410406

@@ -418,7 +414,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
418414

419415
WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
420416

421-
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
417+
if (blk_mq_sched_bypass_insert(hctx, rq)) {
422418
/*
423419
* Firstly normal IO request is inserted to scheduler queue or
424420
* sw queue, meantime we add flush request to dispatch queue(

block/genhd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ static void disk_release_events(struct gendisk *disk);
4545
void set_capacity(struct gendisk *disk, sector_t sectors)
4646
{
4747
struct block_device *bdev = disk->part0;
48-
unsigned long flags;
4948

50-
spin_lock_irqsave(&bdev->bd_size_lock, flags);
49+
spin_lock(&bdev->bd_size_lock);
5150
i_size_write(bdev->bd_inode, (loff_t)sectors << SECTOR_SHIFT);
52-
spin_unlock_irqrestore(&bdev->bd_size_lock, flags);
51+
spin_unlock(&bdev->bd_size_lock);
5352
}
5453
EXPORT_SYMBOL(set_capacity);
5554

block/partitions/core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ static int (*check_part[])(struct parsed_partitions *) = {
8888

8989
static void bdev_set_nr_sectors(struct block_device *bdev, sector_t sectors)
9090
{
91-
unsigned long flags;
92-
93-
spin_lock_irqsave(&bdev->bd_size_lock, flags);
91+
spin_lock(&bdev->bd_size_lock);
9492
i_size_write(bdev->bd_inode, (loff_t)sectors << SECTOR_SHIFT);
95-
spin_unlock_irqrestore(&bdev->bd_size_lock, flags);
93+
spin_unlock(&bdev->bd_size_lock);
9694
}
9795

9896
static struct parsed_partitions *allocate_partitions(struct gendisk *hd)

drivers/block/rsxx/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,17 @@ static ssize_t rsxx_cram_read(struct file *fp, char __user *ubuf,
165165
{
166166
struct rsxx_cardinfo *card = file_inode(fp)->i_private;
167167
char *buf;
168-
ssize_t st;
168+
int st;
169169

170170
buf = kzalloc(cnt, GFP_KERNEL);
171171
if (!buf)
172172
return -ENOMEM;
173173

174174
st = rsxx_creg_read(card, CREG_ADD_CRAM + (u32)*ppos, cnt, buf, 1);
175-
if (!st)
176-
st = copy_to_user(ubuf, buf, cnt);
175+
if (!st) {
176+
if (copy_to_user(ubuf, buf, cnt))
177+
st = -EFAULT;
178+
}
177179
kfree(buf);
178180
if (st)
179181
return st;

drivers/block/rsxx/rsxx_priv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#ifndef __RSXX_PRIV_H__
1212
#define __RSXX_PRIV_H__
1313

14-
#include <linux/version.h>
1514
#include <linux/semaphore.h>
1615

1716
#include <linux/fs.h>

drivers/nvme/host/fabrics.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
630630
opts->queue_size = NVMF_DEF_QUEUE_SIZE;
631631
opts->nr_io_queues = num_online_cpus();
632632
opts->reconnect_delay = NVMF_DEF_RECONNECT_DELAY;
633-
opts->kato = NVME_DEFAULT_KATO;
633+
opts->kato = 0;
634634
opts->duplicate_connect = false;
635635
opts->fast_io_fail_tmo = NVMF_DEF_FAIL_FAST_TMO;
636636
opts->hdr_digest = false;
@@ -893,6 +893,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
893893
opts->nr_write_queues = 0;
894894
opts->nr_poll_queues = 0;
895895
opts->duplicate_connect = true;
896+
} else {
897+
if (!opts->kato)
898+
opts->kato = NVME_DEFAULT_KATO;
896899
}
897900
if (ctrl_loss_tmo < 0) {
898901
opts->max_reconnects = -1;

drivers/nvme/host/hwmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ int nvme_hwmon_init(struct nvme_ctrl *ctrl)
248248
if (IS_ERR(hwmon)) {
249249
dev_warn(dev, "Failed to instantiate hwmon device\n");
250250
kfree(data);
251+
return PTR_ERR(hwmon);
251252
}
252253
ctrl->hwmon_device = hwmon;
253254
return 0;

0 commit comments

Comments
 (0)