Hi expert,
i want take a look at the buf content by tracing fbt::scsi_transport. 
The core part of my dtrace script just like following:

fbt::scsi_transport:entry
/execname == "dd"/
{
        this->pkt = (struct scsi_pkt *)arg0;
        this->buf = (struct buf *) this->pkt->pkt_private;
        this->cdb = this->pkt->pkt_cdbp;

        this->b_flags = (int)this->buf->b_flags;
        printf(" this->b_flags=0x%x", this->b_flags);
        printf(" ku=%2s", this->b_flags & B_PAGEIO? "U" : "K");
        printf(" this->bcount=0x%x", this->buf->b_bcount);
        this->buf_addr = (unsigned char *)(this->buf->b_un.b_addr);
        printf(" buf_addr=%a", this->buf->b_un.b_addr);
        printf( " %a " , copyin((uintptr_t)this->buf->b_un.b_addr, 4 ));
}

When I run dd like following:
dd if=/etc/driver_aliases of=/dev/dsk/c2t2d0s0 oseek=1000 bs=1k count

I will encounter following problem:
  1  21379             scsi_transport:entry  this->b_flags=0x2080051 ku= 
U this->bcount=1000 buf_addr=0x0
dtrace: error on enabled probe ID 3 (ID 21379: 
fbt:scsi:scsi_transport:entry): invalid address (0x0) in action #1 at 
DIF offset 52

Would you please tell me:
1. Why buf_addr is 0x0?
2. What's wrong about the copyin?

Thanks a lot!
-Rokh
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to