getting from bio to buf in dastrategy()

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Aug 3 22:43:50 PDT 2003


In message <3F2D96AB.9000607 at andrew.cmu.edu>, Eno Thereska writes:
>Hi all,
>
>I am hacking into the FreeBSD 5.0 code.
>I jumped from using 4.4 to 5.0 and a couple of things
>have changed. Here is my question:
>
>in /sys/cam/scsi/scsi_da.c the dastrategy()
>function takes as an argument "struct bio* bp"
>Now I need to get to the "struct *buf" that bp
>belongs to.

You can't do that, there may not be any struct buf.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-hackers mailing list