]> err.no Git - linux-2.6/commitdiff
[PATCH] ifdef blktrace debugging fields
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 29 Sep 2006 08:59:40 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:09 +0000 (09:18 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
block/blktrace.c
block/ll_rw_blk.c
include/linux/blkdev.h
include/linux/sched.h
kernel/fork.c

index 2b4ef2b89b8d74b376a2011b5455039fd3730e20..8ff33441d8a214259bd2c718ddb4735874dd2fc5 100644 (file)
@@ -450,8 +450,10 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
  **/
 void blk_trace_shutdown(request_queue_t *q)
 {
-       blk_trace_startstop(q, 0);
-       blk_trace_remove(q);
+       if (q->blk_trace) {
+               blk_trace_startstop(q, 0);
+               blk_trace_remove(q);
+       }
 }
 
 /*
index 9c3a06bcb7ba97b02d12de6638944ac79e33baa2..51dc0edf76e0281f52e53da15576e4ffa62b0eab 100644 (file)
@@ -1847,8 +1847,7 @@ static void blk_release_queue(struct kobject *kobj)
        if (q->queue_tags)
                __blk_queue_free_tags(q);
 
-       if (q->blk_trace)
-               blk_trace_shutdown(q);
+       blk_trace_shutdown(q);
 
        kmem_cache_free(requestq_cachep, q);
 }
index c773ee545ebd046a7256c3c13a44a1bb894760b2..cfde8b3ee9199293b17c883bd7a2292ecbad44c2 100644 (file)
@@ -417,9 +417,9 @@ struct request_queue
        unsigned int            sg_timeout;
        unsigned int            sg_reserved_size;
        int                     node;
-
+#ifdef CONFIG_BLK_DEV_IO_TRACE
        struct blk_trace        *blk_trace;
-
+#endif
        /*
         * reserved for flush operations
         */
index 27122575d9026d13630dac584e6b4e9becc86e55..3696f2f7126d60fb54c907a77b945c846aaaacd0 100644 (file)
@@ -784,8 +784,9 @@ struct task_struct {
        struct prio_array *array;
 
        unsigned short ioprio;
+#ifdef CONFIG_BLK_DEV_IO_TRACE
        unsigned int btrace_seq;
-
+#endif
        unsigned long sleep_avg;
        unsigned long long timestamp, last_ran;
        unsigned long long sched_time; /* sched_clock time spent running */
index 802b1cf0e63f322b4197e68111bca1a22b2800e1..bca6ce6d3ded7f2ef5c4048296ce13aa5d554bcc 100644 (file)
@@ -183,7 +183,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
        /* One for us, one for whoever does the "release_task()" (usually parent) */
        atomic_set(&tsk->usage,2);
        atomic_set(&tsk->fs_excl, 0);
+#ifdef CONFIG_BLK_DEV_IO_TRACE
        tsk->btrace_seq = 0;
+#endif
        tsk->splice_pipe = NULL;
        return tsk;
 }