summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2008-10-28 02:43:23 -0400
committerWenji Huang <wenji.huang@oracle.com>2008-10-28 02:43:23 -0400
commitb972f47ac298a454b8a93cfb2d2d5c3be3ad88a4 (patch)
tree31318b672f7188fb48f4e7e56f056d1b8403bb44 /tapset
parented70d5b028bf8af776380deda5e6a75857c41c28 (diff)
downloadsystemtap-steved-b972f47ac298a454b8a93cfb2d2d5c3be3ad88a4.tar.gz
systemtap-steved-b972f47ac298a454b8a93cfb2d2d5c3be3ad88a4.tar.xz
systemtap-steved-b972f47ac298a454b8a93cfb2d2d5c3be3ad88a4.zip
Correct ioblock and scsi tapset for 2.6.28.
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog5
-rw-r--r--tapset/ioblock.stp4
-rw-r--r--tapset/scsi.stp7
3 files changed, 16 insertions, 0 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index b692f227..20f9e4ff 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-28 Wenji Huang <wenji.huang@oracle.com>
+
+ * ioblock.stp (ioblock.request, ioblock.end): Correct for 2.6.28.
+ * scsi.stp (scsi_timer_pending): Ditto.
+
2008-10-27 William Cohen <wcohen@redhat.com>
* vfs.stp (vfs.(read|write){.return}): Add dev and devname variables.
diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp
index 14ce3f6b..4bf7ad92 100644
--- a/tapset/ioblock.stp
+++ b/tapset/ioblock.stp
@@ -122,7 +122,9 @@ probe ioblock.request = kernel.function ("generic_make_request")
vcnt = $bio->bi_vcnt
idx = $bio->bi_idx
phys_segments = $bio->bi_phys_segments
+%(kernel_v < "2.6.28" %?
hw_segments = $bio->bi_hw_segments
+%)
size = $bio->bi_size
bdev = $bio->bi_bdev
@@ -176,6 +178,8 @@ probe ioblock.end = kernel.function("bio_endio")
vcnt = $bio->bi_vcnt
idx = $bio->bi_idx
phys_segments = $bio->bi_phys_segments
+%(kernel_v < "2.6.28" %?
hw_segments = $bio->bi_hw_segments
+%)
size = $bio->bi_size
}
diff --git a/tapset/scsi.stp b/tapset/scsi.stp
index 7787b6d6..ed96b430 100644
--- a/tapset/scsi.stp
+++ b/tapset/scsi.stp
@@ -87,7 +87,14 @@ probe scsi.iocompleted
function scsi_timer_pending:long(var:long)
%{ /* pure */
struct scsi_cmnd *cmd = (struct scsi_cmnd *)((long)THIS->var);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
THIS->__retvalue = timer_pending(&cmd->eh_timeout); /* FIXME: deref hazard! */
+#else
+ struct request *req = (struct request *)kread(&cmd->request);
+ struct request_queue *rq = (struct request_queue *)kread(&req->q);
+ THIS->__retvalue = timer_pending(&rq->timeout); /* FIXME: deref hazard! */
+ CATCH_DEREF_FAULT();
+#endif
%}
function get_devstate_from_req:long(var:long)