• Home
  • Raw
  • Download

Lines Matching refs:q

314 static void blk_trace_free(struct request_queue *q, struct blk_trace *bt)  in blk_trace_free()  argument
323 debugfs_lookup_and_remove("dropped", q->debugfs_dir); in blk_trace_free()
324 debugfs_lookup_and_remove("msg", q->debugfs_dir); in blk_trace_free()
380 static void blk_trace_cleanup(struct request_queue *q, struct blk_trace *bt) in blk_trace_cleanup() argument
384 blk_trace_free(q, bt); in blk_trace_cleanup()
388 static int __blk_trace_remove(struct request_queue *q) in __blk_trace_remove() argument
392 bt = rcu_replace_pointer(q->blk_trace, NULL, in __blk_trace_remove()
393 lockdep_is_held(&q->debugfs_mutex)); in __blk_trace_remove()
397 blk_trace_cleanup(q, bt); in __blk_trace_remove()
402 int blk_trace_remove(struct request_queue *q) in blk_trace_remove() argument
406 mutex_lock(&q->debugfs_mutex); in blk_trace_remove()
407 ret = __blk_trace_remove(q); in blk_trace_remove()
408 mutex_unlock(&q->debugfs_mutex); in blk_trace_remove()
514 static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, in do_blk_trace_setup() argument
522 lockdep_assert_held(&q->debugfs_mutex); in do_blk_trace_setup()
540 if (rcu_dereference_protected(q->blk_trace, in do_blk_trace_setup()
541 lockdep_is_held(&q->debugfs_mutex))) { in do_blk_trace_setup()
567 dir = q->debugfs_dir; in do_blk_trace_setup()
611 rcu_assign_pointer(q->blk_trace, bt); in do_blk_trace_setup()
617 blk_trace_free(q, bt); in do_blk_trace_setup()
621 static int __blk_trace_setup(struct request_queue *q, char *name, dev_t dev, in __blk_trace_setup() argument
631 ret = do_blk_trace_setup(q, name, dev, bdev, &buts); in __blk_trace_setup()
636 __blk_trace_remove(q); in __blk_trace_setup()
642 int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, in blk_trace_setup() argument
648 mutex_lock(&q->debugfs_mutex); in blk_trace_setup()
649 ret = __blk_trace_setup(q, name, dev, bdev, arg); in blk_trace_setup()
650 mutex_unlock(&q->debugfs_mutex); in blk_trace_setup()
657 static int compat_blk_trace_setup(struct request_queue *q, char *name, in compat_blk_trace_setup() argument
677 ret = do_blk_trace_setup(q, name, dev, bdev, &buts); in compat_blk_trace_setup()
682 __blk_trace_remove(q); in compat_blk_trace_setup()
690 static int __blk_trace_startstop(struct request_queue *q, int start) in __blk_trace_startstop() argument
694 bt = rcu_dereference_protected(q->blk_trace, in __blk_trace_startstop()
695 lockdep_is_held(&q->debugfs_mutex)); in __blk_trace_startstop()
705 int blk_trace_startstop(struct request_queue *q, int start) in blk_trace_startstop() argument
709 mutex_lock(&q->debugfs_mutex); in blk_trace_startstop()
710 ret = __blk_trace_startstop(q, start); in blk_trace_startstop()
711 mutex_unlock(&q->debugfs_mutex); in blk_trace_startstop()
732 struct request_queue *q; in blk_trace_ioctl() local
736 q = bdev_get_queue(bdev); in blk_trace_ioctl()
737 if (!q) in blk_trace_ioctl()
740 mutex_lock(&q->debugfs_mutex); in blk_trace_ioctl()
745 ret = __blk_trace_setup(q, b, bdev->bd_dev, bdev, arg); in blk_trace_ioctl()
750 ret = compat_blk_trace_setup(q, b, bdev->bd_dev, bdev, arg); in blk_trace_ioctl()
757 ret = __blk_trace_startstop(q, start); in blk_trace_ioctl()
760 ret = __blk_trace_remove(q); in blk_trace_ioctl()
767 mutex_unlock(&q->debugfs_mutex); in blk_trace_ioctl()
776 void blk_trace_shutdown(struct request_queue *q) in blk_trace_shutdown() argument
778 if (rcu_dereference_protected(q->blk_trace, in blk_trace_shutdown()
779 lockdep_is_held(&q->debugfs_mutex))) in blk_trace_shutdown()
780 __blk_trace_remove(q); in blk_trace_shutdown()
784 static u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio) in blk_trace_bio_get_cgid() argument
790 bt = rcu_dereference_protected(q->blk_trace, 1); in blk_trace_bio_get_cgid()
800 static u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio) in blk_trace_bio_get_cgid() argument
812 return blk_trace_bio_get_cgid(rq->q, rq->bio); in blk_trace_request_get_cgid()
837 bt = rcu_dereference(rq->q->blk_trace); in blk_add_trace_rq()
895 static void blk_add_trace_bio(struct request_queue *q, struct bio *bio, in blk_add_trace_bio() argument
901 bt = rcu_dereference(q->blk_trace); in blk_add_trace_bio()
909 blk_trace_bio_get_cgid(q, bio)); in blk_add_trace_bio()
919 struct request_queue *q, struct bio *bio) in blk_add_trace_bio_complete() argument
921 blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, in blk_add_trace_bio_complete()
947 static void blk_add_trace_plug(void *ignore, struct request_queue *q) in blk_add_trace_plug() argument
952 bt = rcu_dereference(q->blk_trace); in blk_add_trace_plug()
958 static void blk_add_trace_unplug(void *ignore, struct request_queue *q, in blk_add_trace_unplug() argument
964 bt = rcu_dereference(q->blk_trace); in blk_add_trace_unplug()
981 struct request_queue *q = bio->bi_bdev->bd_disk->queue; in blk_add_trace_split() local
985 bt = rcu_dereference(q->blk_trace); in blk_add_trace_split()
993 blk_trace_bio_get_cgid(q, bio)); in blk_add_trace_split()
1010 struct request_queue *q = bio->bi_bdev->bd_disk->queue; in blk_add_trace_bio_remap() local
1015 bt = rcu_dereference(q->blk_trace); in blk_add_trace_bio_remap()
1028 sizeof(r), &r, blk_trace_bio_get_cgid(q, bio)); in blk_add_trace_bio_remap()
1051 bt = rcu_dereference(rq->q->blk_trace); in blk_add_trace_rq_remap()
1058 r.device_to = cpu_to_be32(disk_devt(rq->q->disk)); in blk_add_trace_rq_remap()
1082 bt = rcu_dereference(rq->q->blk_trace); in blk_add_driver_data()
1611 static int blk_trace_remove_queue(struct request_queue *q) in blk_trace_remove_queue() argument
1615 bt = rcu_replace_pointer(q->blk_trace, NULL, in blk_trace_remove_queue()
1616 lockdep_is_held(&q->debugfs_mutex)); in blk_trace_remove_queue()
1624 blk_trace_free(q, bt); in blk_trace_remove_queue()
1631 static int blk_trace_setup_queue(struct request_queue *q, in blk_trace_setup_queue() argument
1650 rcu_assign_pointer(q->blk_trace, bt); in blk_trace_setup_queue()
1655 blk_trace_free(q, bt); in blk_trace_setup_queue()
1772 struct request_queue *q = bdev_get_queue(bdev); in sysfs_blk_trace_attr_show() local
1776 mutex_lock(&q->debugfs_mutex); in sysfs_blk_trace_attr_show()
1778 bt = rcu_dereference_protected(q->blk_trace, in sysfs_blk_trace_attr_show()
1779 lockdep_is_held(&q->debugfs_mutex)); in sysfs_blk_trace_attr_show()
1797 mutex_unlock(&q->debugfs_mutex); in sysfs_blk_trace_attr_show()
1806 struct request_queue *q = bdev_get_queue(bdev); in sysfs_blk_trace_attr_store() local
1827 mutex_lock(&q->debugfs_mutex); in sysfs_blk_trace_attr_store()
1829 bt = rcu_dereference_protected(q->blk_trace, in sysfs_blk_trace_attr_store()
1830 lockdep_is_held(&q->debugfs_mutex)); in sysfs_blk_trace_attr_store()
1837 ret = blk_trace_setup_queue(q, bdev); in sysfs_blk_trace_attr_store()
1839 ret = blk_trace_remove_queue(q); in sysfs_blk_trace_attr_store()
1845 ret = blk_trace_setup_queue(q, bdev); in sysfs_blk_trace_attr_store()
1846 bt = rcu_dereference_protected(q->blk_trace, in sysfs_blk_trace_attr_store()
1847 lockdep_is_held(&q->debugfs_mutex)); in sysfs_blk_trace_attr_store()
1862 mutex_unlock(&q->debugfs_mutex); in sysfs_blk_trace_attr_store()