Skip to content

Commit f459c34

Browse files
committed
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 ...
2 parents 29dcea8 + 32a50fa commit f459c34

File tree

212 files changed

+4020
-3984
lines changed

Some content is hidden

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

212 files changed

+4020
-3984
lines changed

Documentation/block/null_blk.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ use_per_node_hctx=[0/1]: Default: 0
7171
1: The multi-queue block layer is instantiated with a hardware dispatch
7272
queue for each CPU node in the system.
7373

74-
use_lightnvm=[0/1]: Default: 0
75-
Register device with LightNVM. Requires blk-mq and CONFIG_NVM to be enabled.
76-
7774
no_sched=[0/1]: Default: 0
7875
0: nullb* use default blk-mq io scheduler.
7976
1: nullb* doesn't use io scheduler.
8077

78+
blocking=[0/1]: Default: 0
79+
0: Register as a non-blocking blk-mq driver device.
80+
1: Register as a blocking blk-mq driver device, null_blk will set
81+
the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always
82+
needs to block in its ->queue_rq() function.
83+
8184
shared_tags=[0/1]: Default: 0
8285
0: Tag set is not shared.
8386
1: Tag set shared between devices for blk-mq. Only makes sense with

Documentation/scsi/scsi_eh.txt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,13 @@ function
8282
1. invokes optional hostt->eh_timed_out() callback. Return value can
8383
be one of
8484

85-
- BLK_EH_HANDLED
86-
This indicates that eh_timed_out() dealt with the timeout.
87-
The command is passed back to the block layer and completed
88-
via __blk_complete_requests().
89-
90-
*NOTE* After returning BLK_EH_HANDLED the SCSI layer is
91-
assumed to be finished with the command, and no other
92-
functions from the SCSI layer will be called. So this
93-
should typically only be returned if the eh_timed_out()
94-
handler raced with normal completion.
95-
9685
- BLK_EH_RESET_TIMER
9786
This indicates that more time is required to finish the
9887
command. Timer is restarted. This action is counted as a
9988
retry and only allowed scmd->allowed + 1(!) times. Once the
100-
limit is reached, action for BLK_EH_NOT_HANDLED is taken instead.
89+
limit is reached, action for BLK_EH_DONE is taken instead.
10190

102-
- BLK_EH_NOT_HANDLED
91+
- BLK_EH_DONE
10392
eh_timed_out() callback did not handle the command.
10493
Step #2 is taken.
10594

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9700,7 +9700,7 @@ S: Maintained
97009700
F: drivers/net/ethernet/netronome/
97019701

97029702
NETWORK BLOCK DEVICE (NBD)
9703-
M: Josef Bacik <jbacik@fb.com>
9703+
M: Josef Bacik <josef@toxicpanda.com>
97049704
S: Maintained
97059705
97069706

arch/sparc/include/uapi/asm/jsflash.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

block/bfq-cgroup.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ BFQG_FLAG_FNS(empty)
5555
/* This should be called with the scheduler lock held. */
5656
static void bfqg_stats_update_group_wait_time(struct bfqg_stats *stats)
5757
{
58-
unsigned long long now;
58+
u64 now;
5959

6060
if (!bfqg_stats_waiting(stats))
6161
return;
6262

63-
now = sched_clock();
64-
if (time_after64(now, stats->start_group_wait_time))
63+
now = ktime_get_ns();
64+
if (now > stats->start_group_wait_time)
6565
blkg_stat_add(&stats->group_wait_time,
6666
now - stats->start_group_wait_time);
6767
bfqg_stats_clear_waiting(stats);
@@ -77,20 +77,20 @@ static void bfqg_stats_set_start_group_wait_time(struct bfq_group *bfqg,
7777
return;
7878
if (bfqg == curr_bfqg)
7979
return;
80-
stats->start_group_wait_time = sched_clock();
80+
stats->start_group_wait_time = ktime_get_ns();
8181
bfqg_stats_mark_waiting(stats);
8282
}
8383

8484
/* This should be called with the scheduler lock held. */
8585
static void bfqg_stats_end_empty_time(struct bfqg_stats *stats)
8686
{
87-
unsigned long long now;
87+
u64 now;
8888

8989
if (!bfqg_stats_empty(stats))
9090
return;
9191

92-
now = sched_clock();
93-
if (time_after64(now, stats->start_empty_time))
92+
now = ktime_get_ns();
93+
if (now > stats->start_empty_time)
9494
blkg_stat_add(&stats->empty_time,
9595
now - stats->start_empty_time);
9696
bfqg_stats_clear_empty(stats);
@@ -116,7 +116,7 @@ void bfqg_stats_set_start_empty_time(struct bfq_group *bfqg)
116116
if (bfqg_stats_empty(stats))
117117
return;
118118

119-
stats->start_empty_time = sched_clock();
119+
stats->start_empty_time = ktime_get_ns();
120120
bfqg_stats_mark_empty(stats);
121121
}
122122

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

127127
if (bfqg_stats_idling(stats)) {
128-
unsigned long long now = sched_clock();
128+
u64 now = ktime_get_ns();
129129

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

141-
stats->start_idle_time = sched_clock();
141+
stats->start_idle_time = ktime_get_ns();
142142
bfqg_stats_mark_idling(stats);
143143
}
144144

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

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

180-
if (time_after64(now, io_start_time))
180+
if (now > io_start_time_ns)
181181
blkg_rwstat_add(&stats->service_time, op,
182-
now - io_start_time);
183-
if (time_after64(io_start_time, start_time))
182+
now - io_start_time_ns);
183+
if (io_start_time_ns > start_time_ns)
184184
blkg_rwstat_add(&stats->wait_time, op,
185-
io_start_time - start_time);
185+
io_start_time_ns - start_time_ns);
186186
}
187187

188188
#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,
191191
unsigned int op) { }
192192
void bfqg_stats_update_io_remove(struct bfq_group *bfqg, unsigned int op) { }
193193
void bfqg_stats_update_io_merged(struct bfq_group *bfqg, unsigned int op) { }
194-
void bfqg_stats_update_completion(struct bfq_group *bfqg, uint64_t start_time,
195-
uint64_t io_start_time, unsigned int op) { }
194+
void bfqg_stats_update_completion(struct bfq_group *bfqg, u64 start_time_ns,
195+
u64 io_start_time_ns, unsigned int op) { }
196196
void bfqg_stats_update_dequeue(struct bfq_group *bfqg) { }
197197
void bfqg_stats_set_start_empty_time(struct bfq_group *bfqg) { }
198198
void bfqg_stats_update_idle_time(struct bfq_group *bfqg) { }

0 commit comments

Comments
 (0)