From: Jens Axboe Date: Tue, 1 Mar 2011 20:04:39 +0000 (-0500) Subject: Merge commit 'v2.6.38-rc6' into for-2.6.39/core X-Git-Tag: v2.6.39-rc1~80^2~50 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=6fae9c25134baffbeeb20031479e7ff6f6d8eec0;p=~andy%2Flinux Merge commit 'v2.6.38-rc6' into for-2.6.39/core Conflicts: block/cfq-iosched.c Signed-off-by: Jens Axboe --- 6fae9c25134baffbeeb20031479e7ff6f6d8eec0 diff --cc block/cfq-iosched.c index 968455c57e1,7be4c795962..f27ff3efe6c --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@@ -3681,13 -3705,13 +3705,13 @@@ new_queue } cfqq->allocated[rw]++; - atomic_inc(&cfqq->ref); - cfqq->ref++; - rq->elevator_private = cic; - rq->elevator_private2 = cfqq; - rq->elevator_private3 = cfq_ref_get_cfqg(cfqq->cfqg); spin_unlock_irqrestore(q->queue_lock, flags); ++ cfqq->ref++; + rq->elevator_private[0] = cic; + rq->elevator_private[1] = cfqq; + rq->elevator_private[2] = cfq_ref_get_cfqg(cfqq->cfqg); return 0; queue_fail: diff --cc include/linux/blkdev.h index 12bb426949e,4d18ff34670..e3ee74fc590 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@@ -108,19 -108,14 +108,20 @@@ struct request /* * Three pointers are available for the IO schedulers, if they need - * more they have to dynamically allocate it. + * more they have to dynamically allocate it. Flush requests are + * never put on the IO scheduler. So let the flush fields share + * space with the three elevator_private pointers. */ - void *elevator_private; - void *elevator_private2; - void *elevator_private3; + union { + void *elevator_private[3]; + struct { + unsigned int seq; + struct list_head list; + } flush; + }; struct gendisk *rq_disk; + struct hd_struct *part; unsigned long start_time; #ifdef CONFIG_BLK_CGROUP unsigned long long start_time_ns;