Updates for kernel 2.6.38 v0.19.7
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 16 Mar 2011 22:02:46 +0000 (18:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 16 Mar 2011 22:02:46 +0000 (18:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-ascii.c
ltt-relay-alloc.c
probes/block-trace.c

index b020fedb39a62ea1771e51d52006e2b6ed7db70d..ad128e8bcd4708bd3288f4f0184bd0549ea1b77e 100644 (file)
@@ -543,7 +543,7 @@ void ltt_ascii_remove(struct ltt_chan *chan)
         * Wait for every reference to the dentry to be gone,
         * except us.
         */
-       while (atomic_read(&dentry->d_count) != 1)
+       while (ACCESS_ONCE(dentry->d_count) != 1)
                msleep(100);
        dput(dentry);
 }
index 43246a73d38f7e3f9e6b929b66c6af03e99e0f38..03a6ffa0e83827fccc58b19db953f762e7527e8c 100644 (file)
@@ -360,7 +360,7 @@ void ltt_chan_alloc_remove_files(struct ltt_chan_alloc *chan)
                 * Wait for every reference to the dentry to be gone,
                 * except us.
                 */
-               while (atomic_read(&dentry->d_count) != 1)
+               while (ACCESS_ONCE(dentry->d_count) != 1)
                        msleep(100);
                dput(dentry);
        }
index fcb87d58f5a0504278211f81304e0fd421f88c21..a01b6f450c6bce44a7aa796a69e0e71715ab8bc1 100644 (file)
@@ -163,15 +163,15 @@ void probe_block_bio_bounce(void *data, struct request_queue *q, struct bio *bio
                bio->bi_rw, !bio_flagged(bio, BIO_UPTODATE));
 }
 
-void probe_block_bio_complete(void *data, struct request_queue *q, struct bio *bio)
+void probe_block_bio_complete(void *data, struct request_queue *q, struct bio *bio, int error)
 {
        trace_mark_tp(block, bio_complete, block_bio_complete,
                probe_block_bio_complete,
                "sector %llu size %u rw(FAILFAST_DRIVER,FAILFAST_TRANSPORT,"
                "FAILFAST_DEV,DISCARD,META,SYNC,BARRIER,AHEAD,RW) %lX "
-               "not_uptodate #1u%d",
+               "not_uptodate #1u%d error %d",
                (unsigned long long)bio->bi_sector, bio->bi_size,
-               bio->bi_rw, !bio_flagged(bio, BIO_UPTODATE));
+               bio->bi_rw, !bio_flagged(bio, BIO_UPTODATE), error);
 }
 
 void probe_block_bio_backmerge(void *data, struct request_queue *q, struct bio *bio)
@@ -288,22 +288,40 @@ void probe_block_split(void *data, struct request_queue *q, struct bio *bio,
                bio->bi_rw, !bio_flagged(bio, BIO_UPTODATE), pdu);
 }
 
-void probe_block_remap(void *data, struct request_queue *q, struct bio *bio,
-                      dev_t dev, sector_t from)
+void probe_block_bio_remap(void *data, struct request_queue *q, struct bio *bio,
+                          dev_t dev, sector_t from)
 {
-       trace_mark_tp(block, remap, block_remap,
-               probe_block_remap,
-               "device_from %lu sector_from %llu device_to %lu "
-               "size %u rw(FAILFAST_DRIVER,FAILFAST_TRANSPORT,"
+       trace_mark_tp(block, bio_remap, block_bio_remap,
+               probe_block_bio_remap,
+               "device_from %lu sector_from %llu nr_sector %llu device_to %lu "
+               "sector_to %llu size %u rw(FAILFAST_DRIVER,FAILFAST_TRANSPORT,"
                "FAILFAST_DEV,DISCARD,META,SYNC,BARRIER,AHEAD,RW) %lX "
                "not_uptodate #1u%d",
-               (unsigned long)bio->bi_bdev->bd_dev,
-               (unsigned long long)from,
                (unsigned long)dev,
+               (unsigned long long)from,
+               (unsigned long long)bio->bi_size >> 9,
+               (unsigned long)bio->bi_bdev->bd_dev,
+               (unsigned long long)bio->bi_sector,
                bio->bi_size, bio->bi_rw,
                !bio_flagged(bio, BIO_UPTODATE));
 }
 
+void probe_block_rq_remap(void *data, struct request_queue *q,
+                         struct request *rq,
+                         dev_t dev, sector_t from)
+{
+       trace_mark_tp(block, rq_remap, block_rq_remap,
+               probe_block_rq_remap,
+               "device_from %lu sector_from %llu nr_sector %llu device_to %lu "
+               "sector_to %llu size %u",
+               (unsigned long)dev,
+               (unsigned long long)from,
+               (unsigned long long)blk_rq_sectors(rq),
+               (unsigned long)disk_devt(rq->rq_disk),
+               (unsigned long long)blk_rq_pos(rq),
+               blk_rq_bytes(rq));
+}
+
 MODULE_LICENSE("GPL and additional rights");
 MODULE_AUTHOR("Mathieu Desnoyers");
 MODULE_DESCRIPTION("Block Tracepoint Probes");
This page took 0.028638 seconds and 4 git commands to generate.