Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-20190323' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
"A set of fixes/changes that should go into this series. This contains:

- Kernel doc / comment updates (Bart, Shenghui)

- Un-export of core-only used function (Bart)

- Fix race on loop file access (Dongli)

- pf/pcd queue cleanup fixes (me)

- Use appropriate helper for RESTART bit set (Yufen)

- Use named identifier for classic poll (Yufen)"

* tag 'for-linus-20190323' of git://git.kernel.dk/linux-block:
sbitmap: trivial - update comment for sbitmap_deferred_clear_bit
blkcg: Fix kernel-doc warnings
blk-iolatency: #include "blk.h"
block: Unexport blk_mq_add_to_requeue_list()
block: add BLK_MQ_POLL_CLASSIC for hybrid poll and return EINVAL for unexpected value
blk-mq: remove unused 'nr_expired' from blk_mq_hw_ctx
loop: access lo_backing_file only when the loop device is Lo_bound
blk-mq: use blk_mq_sched_mark_restart_hctx to set RESTART
paride/pcd: cleanup queues when detection fails
paride/pf: cleanup queues when detection fails

+39 -25
+5 -4
block/blk-cgroup.c
··· 1736 1736 1737 1737 /** 1738 1738 * blkcg_schedule_throttle - this task needs to check for throttling 1739 - * @q - the request queue IO was submitted on 1740 - * @use_memdelay - do we charge this to memory delay for PSI 1739 + * @q: the request queue IO was submitted on 1740 + * @use_memdelay: do we charge this to memory delay for PSI 1741 1741 * 1742 1742 * This is called by the IO controller when we know there's delay accumulated 1743 1743 * for the blkg for this task. We do not pass the blkg because there are places ··· 1769 1769 1770 1770 /** 1771 1771 * blkcg_add_delay - add delay to this blkg 1772 - * @now - the current time in nanoseconds 1773 - * @delta - how many nanoseconds of delay to add 1772 + * @blkg: blkg of interest 1773 + * @now: the current time in nanoseconds 1774 + * @delta: how many nanoseconds of delay to add 1774 1775 * 1775 1776 * Charge @delta to the blkg's current delay accumulation. This is used to 1776 1777 * throttle tasks if an IO controller thinks we need more throttling.
+1
block/blk-iolatency.c
··· 75 75 #include <linux/blk-mq.h> 76 76 #include "blk-rq-qos.h" 77 77 #include "blk-stat.h" 78 + #include "blk.h" 78 79 79 80 #define DEFAULT_SCALE_COOKIE 1000000U 80 81
+3 -5
block/blk-mq.c
··· 782 782 if (kick_requeue_list) 783 783 blk_mq_kick_requeue_list(q); 784 784 } 785 - EXPORT_SYMBOL(blk_mq_add_to_requeue_list); 786 785 787 786 void blk_mq_kick_requeue_list(struct request_queue *q) 788 787 { ··· 1092 1093 bool ret; 1093 1094 1094 1095 if (!(hctx->flags & BLK_MQ_F_TAG_SHARED)) { 1095 - if (!test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state)) 1096 - set_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state); 1096 + blk_mq_sched_mark_restart_hctx(hctx); 1097 1097 1098 1098 /* 1099 1099 * It's possible that a tag was freed in the window between the ··· 2855 2857 /* 2856 2858 * Default to classic polling 2857 2859 */ 2858 - q->poll_nsec = -1; 2860 + q->poll_nsec = BLK_MQ_POLL_CLASSIC; 2859 2861 2860 2862 blk_mq_init_cpu_queues(q, set->nr_hw_queues); 2861 2863 blk_mq_add_queue_tag_set(set, q); ··· 3390 3392 { 3391 3393 struct request *rq; 3392 3394 3393 - if (q->poll_nsec == -1) 3395 + if (q->poll_nsec == BLK_MQ_POLL_CLASSIC) 3394 3396 return false; 3395 3397 3396 3398 if (!blk_qc_t_is_internal(cookie))
+2
block/blk-mq.h
··· 41 41 int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr); 42 42 void blk_mq_wake_waiters(struct request_queue *q); 43 43 bool blk_mq_dispatch_rq_list(struct request_queue *, struct list_head *, bool); 44 + void blk_mq_add_to_requeue_list(struct request *rq, bool at_head, 45 + bool kick_requeue_list); 44 46 void blk_mq_flush_busy_ctxs(struct blk_mq_hw_ctx *hctx, struct list_head *list); 45 47 bool blk_mq_get_driver_tag(struct request *rq); 46 48 struct request *blk_mq_dequeue_from_ctx(struct blk_mq_hw_ctx *hctx,
+7 -5
block/blk-sysfs.c
··· 360 360 { 361 361 int val; 362 362 363 - if (q->poll_nsec == -1) 364 - val = -1; 363 + if (q->poll_nsec == BLK_MQ_POLL_CLASSIC) 364 + val = BLK_MQ_POLL_CLASSIC; 365 365 else 366 366 val = q->poll_nsec / 1000; 367 367 ··· 380 380 if (err < 0) 381 381 return err; 382 382 383 - if (val == -1) 384 - q->poll_nsec = -1; 385 - else 383 + if (val == BLK_MQ_POLL_CLASSIC) 384 + q->poll_nsec = BLK_MQ_POLL_CLASSIC; 385 + else if (val >= 0) 386 386 q->poll_nsec = val * 1000; 387 + else 388 + return -EINVAL; 387 389 388 390 return count; 389 391 }
+1 -1
drivers/block/loop.c
··· 656 656 return -EBADF; 657 657 658 658 l = f->f_mapping->host->i_bdev->bd_disk->private_data; 659 - if (l->lo_state == Lo_unbound) { 659 + if (l->lo_state != Lo_bound) { 660 660 return -EINVAL; 661 661 } 662 662 f = l->lo_backing_file;
+5 -1
drivers/block/paride/pcd.c
··· 749 749 return 0; 750 750 751 751 printk("%s: No CD-ROM drive found\n", name); 752 - for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) 752 + for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) { 753 + blk_cleanup_queue(cd->disk->queue); 754 + cd->disk->queue = NULL; 755 + blk_mq_free_tag_set(&cd->tag_set); 753 756 put_disk(cd->disk); 757 + } 754 758 pi_unregister_driver(par_drv); 755 759 return -1; 756 760 }
+11 -5
drivers/block/paride/pf.c
··· 761 761 return 0; 762 762 763 763 printk("%s: No ATAPI disk detected\n", name); 764 - for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) 764 + for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) { 765 + blk_cleanup_queue(pf->disk->queue); 766 + pf->disk->queue = NULL; 767 + blk_mq_free_tag_set(&pf->tag_set); 765 768 put_disk(pf->disk); 769 + } 766 770 pi_unregister_driver(par_drv); 767 771 return -1; 768 772 } ··· 1051 1047 int unit; 1052 1048 unregister_blkdev(major, name); 1053 1049 for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) { 1054 - if (!pf->present) 1055 - continue; 1056 - del_gendisk(pf->disk); 1050 + if (pf->present) 1051 + del_gendisk(pf->disk); 1052 + 1057 1053 blk_cleanup_queue(pf->disk->queue); 1058 1054 blk_mq_free_tag_set(&pf->tag_set); 1059 1055 put_disk(pf->disk); 1060 - pi_release(pf->pi); 1056 + 1057 + if (pf->present) 1058 + pi_release(pf->pi); 1061 1059 } 1062 1060 } 1063 1061
-3
include/linux/blk-mq.h
··· 57 57 unsigned int queue_num; 58 58 59 59 atomic_t nr_active; 60 - unsigned int nr_expired; 61 60 62 61 struct hlist_node cpuhp_dead; 63 62 struct kobject kobj; ··· 299 300 void __blk_mq_end_request(struct request *rq, blk_status_t error); 300 301 301 302 void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list); 302 - void blk_mq_add_to_requeue_list(struct request *rq, bool at_head, 303 - bool kick_requeue_list); 304 303 void blk_mq_kick_requeue_list(struct request_queue *q); 305 304 void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs); 306 305 bool blk_mq_complete_request(struct request *rq);
+3
include/linux/blkdev.h
··· 50 50 /* Must be consistent with blk_mq_poll_stats_bkt() */ 51 51 #define BLK_MQ_POLL_STATS_BKTS 16 52 52 53 + /* Doing classic polling */ 54 + #define BLK_MQ_POLL_CLASSIC -1 55 + 53 56 /* 54 57 * Maximum number of blkcg policies allowed to be registered concurrently. 55 58 * Defined here to simplify include dependency.
+1 -1
include/linux/sbitmap.h
··· 330 330 /* 331 331 * This one is special, since it doesn't actually clear the bit, rather it 332 332 * sets the corresponding bit in the ->cleared mask instead. Paired with 333 - * the caller doing sbitmap_batch_clear() if a given index is full, which 333 + * the caller doing sbitmap_deferred_clear() if a given index is full, which 334 334 * will clear the previously freed entries in the corresponding ->word. 335 335 */ 336 336 static inline void sbitmap_deferred_clear_bit(struct sbitmap *sb, unsigned int bitnr)