On Apr 14, 2010, at 5:18 PM, John Baldwin wrote: > On Wednesday 14 April 2010 9:08:50 am Sam Robb wrote: >> In the kernel, given a struct disk, is there a way to turn that into > something that can be used to read/write from the disk? Or is my best bet in > this situation to figure out the device path for the disk, and just use > kern_open() to access it? > > You can use dp->d_geom as the target of a bio via GEOM I think. However, I > don't have experience with sending bio's to a specific GEOM directly. File > systems usually use geom_vfs to feed requests from bread(), etc. to a mounted > disk device using a devfs vnode for the associated disk device.
Thanks, John. I've found another way around my problem in user space; if I revisit the kernel solution, I'll take a look at using bio. -Samrobb_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"