In message <[EMAIL PROTECTED]>, Eno Thereska writes:

> >>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.
>
>How can a bio exist on it's own, unrelated to any buf?
>Would that be a special case or does that happen all the
>time? A concrete example would help.

struct buf represents a block in the cache/VM system.

struct bio represents a disk I/O request.

For historical reasons, a buf contains a bio, but that is by
no means the only way to create a bio.

Throughout geom bio's are created a destroyed which have no
relation to any specific buf, for instance to read the key
sectors in gbde.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to