Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f459c345 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-4.18/block-20180603' of git://git.kernel.dk/linux-block

Pull block updates from Jens Axboe:

 - clean up how we pass around gfp_t and
   blk_mq_req_flags_t (Christoph)

 - prepare us to defer scheduler attach (Christoph)

 - clean up drivers handling of bounce buffers (Christoph)

 - fix timeout handling corner cases (Christoph/Bart/Keith)

 - bcache fixes (Coly)

 - prep work for bcachefs and some block layer optimizations (Kent).

 - convert users of bio_sets to using embedded structs (Kent).

 - fixes for the BFQ io scheduler (Paolo/Davide/Filippo)

 - lightnvm fixes and improvements (Matias, with contributions from Hans
   and Javier)

 - adding discard throttling to blk-wbt (me)

 - sbitmap blk-mq-tag handling (me/Omar/Ming).

 - remove the sparc jsflash block driver, acked by DaveM.

 - Kyber scheduler improvement from Jianchao, making it more friendly
   wrt merging.

 - conversion of symbolic proc permissions to octal, from Joe Perches.
   Previously the block parts were a mix of both.

 - nbd fixes (Josef and Kevin Vigor)

 - unify how we handle the various kinds of timestamps that the block
   core and utility code uses (Omar)

 - three NVMe pull requests from Keith and Christoph, bringing AEN to
   feature completeness, file backed namespaces, cq/sq lock split, and
   various fixes

 - various little fixes and improvements all over the map

* tag 'for-4.18/block-20180603' of git://git.kernel.dk/linux-block: (196 commits)
  blk-mq: update nr_requests when switching to 'none' scheduler
  block: don't use blocking queue entered for recursive bio submits
  dm-crypt: fix warning in shutdown path
  lightnvm: pblk: take bitmap alloc. out of critical section
  lightnvm: pblk: kick writer on new flush points
  lightnvm: pblk: only try to recover lines with written smeta
  lightnvm: pblk: remove unnecessary bio_get/put
  lightnvm: pblk: add possibility to set write buffer size manually
  lightnvm: fix partial read error path
  lightnvm: proper error handling for pblk_bio_add_pages
  lightnvm: pblk: fix smeta write error path
  lightnvm: pblk: garbage collect lines with failed writes
  lightnvm: pblk: rework write error recovery path
  lightnvm: pblk: remove dead function
  lightnvm: pass flag on graceful teardown to targets
  lightnvm: pblk: check for chunk size before allocating it
  lightnvm: pblk: remove unnecessary argument
  lightnvm: pblk: remove unnecessary indirection
  lightnvm: pblk: return NVM_ error on failed submission
  lightnvm: pblk: warn in case of corrupted write buffer
  ...
parents 29dcea88 32a50fab
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -71,13 +71,16 @@ use_per_node_hctx=[0/1]: Default: 0
  1: The multi-queue block layer is instantiated with a hardware dispatch
     queue for each CPU node in the system.

use_lightnvm=[0/1]: Default: 0
  Register device with LightNVM. Requires blk-mq and CONFIG_NVM to be enabled.

no_sched=[0/1]: Default: 0
  0: nullb* use default blk-mq io scheduler.
  1: nullb* doesn't use io scheduler.

blocking=[0/1]: Default: 0
  0: Register as a non-blocking blk-mq driver device.
  1: Register as a blocking blk-mq driver device, null_blk will set
     the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always
     needs to block in its ->queue_rq() function.

shared_tags=[0/1]: Default: 0
  0: Tag set is not shared.
  1: Tag set shared between devices for blk-mq. Only makes sense with
+2 −13
Original line number Diff line number Diff line
@@ -82,24 +82,13 @@ function
 1. invokes optional hostt->eh_timed_out() callback.  Return value can
    be one of

    - BLK_EH_HANDLED
	This indicates that eh_timed_out() dealt with the timeout.
	The command is passed back to the block layer and completed
	via __blk_complete_requests().

	*NOTE* After returning BLK_EH_HANDLED the SCSI layer is
	assumed to be finished with the command, and no other
	functions from the SCSI layer will be called. So this
	should typically only be returned if the eh_timed_out()
	handler raced with normal completion.

    - BLK_EH_RESET_TIMER
	This indicates that more time is required to finish the
	command.  Timer is restarted.  This action is counted as a
	retry and only allowed scmd->allowed + 1(!) times.  Once the
	limit is reached, action for BLK_EH_NOT_HANDLED is taken instead.
	limit is reached, action for BLK_EH_DONE is taken instead.

    - BLK_EH_NOT_HANDLED
    - BLK_EH_DONE
        eh_timed_out() callback did not handle the command.
	Step #2 is taken.

+1 −1
Original line number Diff line number Diff line
@@ -9700,7 +9700,7 @@ S: Maintained
F:	drivers/net/ethernet/netronome/

NETWORK BLOCK DEVICE (NBD)
M:	Josef Bacik <jbacik@fb.com>
M:	Josef Bacik <josef@toxicpanda.com>
S:	Maintained
L:	linux-block@vger.kernel.org
L:	nbd@other.debian.org
+0 −40
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * jsflash.h: OS Flash SIMM support for JavaStations.
 *
 * Copyright (C) 1999  Pete Zaitcev
 */

#ifndef _SPARC_JSFLASH_H
#define _SPARC_JSFLASH_H

#ifndef _SPARC_TYPES_H
#include <linux/types.h>
#endif

/*
 * Semantics of the offset is a full address.
 * Hardcode it or get it from probe ioctl.
 *
 * We use full bus address, so that we would be
 * automatically compatible with possible future systems.
 */

#define JSFLASH_IDENT   (('F'<<8)|54)
struct jsflash_ident_arg {
	__u64 off;                /* 0x20000000 is included */
	__u32 size;
	char name[32];		/* With trailing zero */
};

#define JSFLASH_ERASE   (('F'<<8)|55)
/* Put 0 as argument, may be flags or sector number... */

#define JSFLASH_PROGRAM (('F'<<8)|56)
struct jsflash_program_arg {
	__u64 data;		/* char* for sparc and sparc64 */
	__u64 off;
	__u32 size;
};

#endif /* _SPARC_JSFLASH_H */
+20 −20
Original line number Diff line number Diff line
@@ -55,13 +55,13 @@ BFQG_FLAG_FNS(empty)
/* This should be called with the scheduler lock held. */
static void bfqg_stats_update_group_wait_time(struct bfqg_stats *stats)
{
	unsigned long long now;
	u64 now;

	if (!bfqg_stats_waiting(stats))
		return;

	now = sched_clock();
	if (time_after64(now, stats->start_group_wait_time))
	now = ktime_get_ns();
	if (now > stats->start_group_wait_time)
		blkg_stat_add(&stats->group_wait_time,
			      now - stats->start_group_wait_time);
	bfqg_stats_clear_waiting(stats);
@@ -77,20 +77,20 @@ static void bfqg_stats_set_start_group_wait_time(struct bfq_group *bfqg,
		return;
	if (bfqg == curr_bfqg)
		return;
	stats->start_group_wait_time = sched_clock();
	stats->start_group_wait_time = ktime_get_ns();
	bfqg_stats_mark_waiting(stats);
}

/* This should be called with the scheduler lock held. */
static void bfqg_stats_end_empty_time(struct bfqg_stats *stats)
{
	unsigned long long now;
	u64 now;

	if (!bfqg_stats_empty(stats))
		return;

	now = sched_clock();
	if (time_after64(now, stats->start_empty_time))
	now = ktime_get_ns();
	if (now > stats->start_empty_time)
		blkg_stat_add(&stats->empty_time,
			      now - stats->start_empty_time);
	bfqg_stats_clear_empty(stats);
@@ -116,7 +116,7 @@ void bfqg_stats_set_start_empty_time(struct bfq_group *bfqg)
	if (bfqg_stats_empty(stats))
		return;

	stats->start_empty_time = sched_clock();
	stats->start_empty_time = ktime_get_ns();
	bfqg_stats_mark_empty(stats);
}

@@ -125,9 +125,9 @@ void bfqg_stats_update_idle_time(struct bfq_group *bfqg)
	struct bfqg_stats *stats = &bfqg->stats;

	if (bfqg_stats_idling(stats)) {
		unsigned long long now = sched_clock();
		u64 now = ktime_get_ns();

		if (time_after64(now, stats->start_idle_time))
		if (now > stats->start_idle_time)
			blkg_stat_add(&stats->idle_time,
				      now - stats->start_idle_time);
		bfqg_stats_clear_idling(stats);
@@ -138,7 +138,7 @@ void bfqg_stats_set_start_idle_time(struct bfq_group *bfqg)
{
	struct bfqg_stats *stats = &bfqg->stats;

	stats->start_idle_time = sched_clock();
	stats->start_idle_time = ktime_get_ns();
	bfqg_stats_mark_idling(stats);
}

@@ -171,18 +171,18 @@ void bfqg_stats_update_io_merged(struct bfq_group *bfqg, unsigned int op)
	blkg_rwstat_add(&bfqg->stats.merged, op, 1);
}

void bfqg_stats_update_completion(struct bfq_group *bfqg, uint64_t start_time,
				  uint64_t io_start_time, unsigned int op)
void bfqg_stats_update_completion(struct bfq_group *bfqg, u64 start_time_ns,
				  u64 io_start_time_ns, unsigned int op)
{
	struct bfqg_stats *stats = &bfqg->stats;
	unsigned long long now = sched_clock();
	u64 now = ktime_get_ns();

	if (time_after64(now, io_start_time))
	if (now > io_start_time_ns)
		blkg_rwstat_add(&stats->service_time, op,
				now - io_start_time);
	if (time_after64(io_start_time, start_time))
				now - io_start_time_ns);
	if (io_start_time_ns > start_time_ns)
		blkg_rwstat_add(&stats->wait_time, op,
				io_start_time - start_time);
				io_start_time_ns - start_time_ns);
}

#else /* CONFIG_BFQ_GROUP_IOSCHED && CONFIG_DEBUG_BLK_CGROUP */
@@ -191,8 +191,8 @@ void bfqg_stats_update_io_add(struct bfq_group *bfqg, struct bfq_queue *bfqq,
			      unsigned int op) { }
void bfqg_stats_update_io_remove(struct bfq_group *bfqg, unsigned int op) { }
void bfqg_stats_update_io_merged(struct bfq_group *bfqg, unsigned int op) { }
void bfqg_stats_update_completion(struct bfq_group *bfqg, uint64_t start_time,
				  uint64_t io_start_time, unsigned int op) { }
void bfqg_stats_update_completion(struct bfq_group *bfqg, u64 start_time_ns,
				  u64 io_start_time_ns, unsigned int op) { }
void bfqg_stats_update_dequeue(struct bfq_group *bfqg) { }
void bfqg_stats_set_start_empty_time(struct bfq_group *bfqg) { }
void bfqg_stats_update_idle_time(struct bfq_group *bfqg) { }
Loading