aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-19 18:10:59 -0400
committerJens Axboe <axboe@kernel.dk>2012-03-20 07:47:48 -0400
commit2b566fa55b9a94b53217c2818e6c5e5756eeb1a1 (patch)
treed2186ebd18062172a7b0c83e31ca834f44ecdcc0 /block
parent598971bfbdfdc8701337dc1636c7919c44699914 (diff)
block: remove ioc_*_changed()
After the previous patch to cfq, there's no ioc_get_changed() user left. This patch yanks out ioc_{ioprio|cgroup|get}_changed() and all related stuff. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-cgroup.c19
-rw-r--r--block/blk-ioc.c68
2 files changed, 0 insertions, 87 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 30e07308db24..a74019b67311 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -47,8 +47,6 @@ static struct cgroup_subsys_state *blkiocg_create(struct cgroup_subsys *,
47 struct cgroup *); 47 struct cgroup *);
48static int blkiocg_can_attach(struct cgroup_subsys *, struct cgroup *, 48static int blkiocg_can_attach(struct cgroup_subsys *, struct cgroup *,
49 struct cgroup_taskset *); 49 struct cgroup_taskset *);
50static void blkiocg_attach(struct cgroup_subsys *, struct cgroup *,
51 struct cgroup_taskset *);
52static int blkiocg_pre_destroy(struct cgroup_subsys *, struct cgroup *); 50static int blkiocg_pre_destroy(struct cgroup_subsys *, struct cgroup *);
53static void blkiocg_destroy(struct cgroup_subsys *, struct cgroup *); 51static void blkiocg_destroy(struct cgroup_subsys *, struct cgroup *);
54static int blkiocg_populate(struct cgroup_subsys *, struct cgroup *); 52static int blkiocg_populate(struct cgroup_subsys *, struct cgroup *);
@@ -63,7 +61,6 @@ struct cgroup_subsys blkio_subsys = {
63 .name = "blkio", 61 .name = "blkio",
64 .create = blkiocg_create, 62 .create = blkiocg_create,
65 .can_attach = blkiocg_can_attach, 63 .can_attach = blkiocg_can_attach,
66 .attach = blkiocg_attach,
67 .pre_destroy = blkiocg_pre_destroy, 64 .pre_destroy = blkiocg_pre_destroy,
68 .destroy = blkiocg_destroy, 65 .destroy = blkiocg_destroy,
69 .populate = blkiocg_populate, 66 .populate = blkiocg_populate,
@@ -1729,22 +1726,6 @@ static int blkiocg_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
1729 return ret; 1726 return ret;
1730} 1727}
1731 1728
1732static void blkiocg_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
1733 struct cgroup_taskset *tset)
1734{
1735 struct task_struct *task;
1736 struct io_context *ioc;
1737
1738 cgroup_taskset_for_each(task, cgrp, tset) {
1739 /* we don't lose anything even if ioc allocation fails */
1740 ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE);
1741 if (ioc) {
1742 ioc_cgroup_changed(ioc);
1743 put_io_context(ioc);
1744 }
1745 }
1746}
1747
1748static void blkcg_bypass_start(void) 1729static void blkcg_bypass_start(void)
1749 __acquires(&all_q_mutex) 1730 __acquires(&all_q_mutex)
1750{ 1731{
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 439ec21fd787..3f3dd51a1280 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -388,74 +388,6 @@ struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q,
388 return icq; 388 return icq;
389} 389}
390 390
391void ioc_set_icq_flags(struct io_context *ioc, unsigned int flags)
392{
393 struct io_cq *icq;
394 struct hlist_node *n;
395
396 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node)
397 icq->flags |= flags;
398}
399
400/**
401 * ioc_ioprio_changed - notify ioprio change
402 * @ioc: io_context of interest
403 * @ioprio: new ioprio
404 *
405 * @ioc's ioprio has changed to @ioprio. Set %ICQ_IOPRIO_CHANGED for all
406 * icq's. iosched is responsible for checking the bit and applying it on
407 * request issue path.
408 */
409void ioc_ioprio_changed(struct io_context *ioc, int ioprio)
410{
411 unsigned long flags;
412
413 spin_lock_irqsave(&ioc->lock, flags);
414 ioc->ioprio = ioprio;
415 ioc_set_icq_flags(ioc, ICQ_IOPRIO_CHANGED);
416 spin_unlock_irqrestore(&ioc->lock, flags);
417}
418
419/**
420 * ioc_cgroup_changed - notify cgroup change
421 * @ioc: io_context of interest
422 *
423 * @ioc's cgroup has changed. Set %ICQ_CGROUP_CHANGED for all icq's.
424 * iosched is responsible for checking the bit and applying it on request
425 * issue path.
426 */
427void ioc_cgroup_changed(struct io_context *ioc)
428{
429 unsigned long flags;
430
431 spin_lock_irqsave(&ioc->lock, flags);
432 ioc_set_icq_flags(ioc, ICQ_CGROUP_CHANGED);
433 spin_unlock_irqrestore(&ioc->lock, flags);
434}
435EXPORT_SYMBOL(ioc_cgroup_changed);
436
437/**
438 * icq_get_changed - fetch and clear icq changed mask
439 * @icq: icq of interest
440 *
441 * Fetch and clear ICQ_*_CHANGED bits from @icq. Grabs and releases
442 * @icq->ioc->lock.
443 */
444unsigned icq_get_changed(struct io_cq *icq)
445{
446 unsigned int changed = 0;
447 unsigned long flags;
448
449 if (unlikely(icq->flags & ICQ_CHANGED_MASK)) {
450 spin_lock_irqsave(&icq->ioc->lock, flags);
451 changed = icq->flags & ICQ_CHANGED_MASK;
452 icq->flags &= ~ICQ_CHANGED_MASK;
453 spin_unlock_irqrestore(&icq->ioc->lock, flags);
454 }
455 return changed;
456}
457EXPORT_SYMBOL(icq_get_changed);
458
459static int __init blk_ioc_init(void) 391static int __init blk_ioc_init(void)
460{ 392{
461 iocontext_cachep = kmem_cache_create("blkdev_ioc", 393 iocontext_cachep = kmem_cache_create("blkdev_ioc",