Date: Sun, 26 Jan 2003 13:54:36 -0800 (PST) From: Poul-Henning Kamp <phk@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/geom geom_bsd.c Message-ID: <200301262154.h0QLsaBZ022623@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2003/01/26 13:54:36 PST Modified files: sys/geom geom_bsd.c Log: Implement DIOCBSDBB ioctl which overwrites first BBSIZE bytes of BSD labeled disk. This is complicated by the fact that BBSIZE is greater than the PAGE_SIZE limit ioctl inflicts on arguments which are automatically copied in. As long as we don't need access to userland memory (copyin/out) we can deal with the ioctl using g_callme() which executes it from the GEOM event thread. Once we need copyin/out, we need to return the bio with EDIRIOCTL in order to make geom_dev call us back in the original process context where copyin will work. Unfortunately, that results in us getting called with Giant, so we have to DROP_GIANT/PICKUP_GIANT around the code where we diddle GEOMs internals. Sometimes you just can't win... ... But it does make geom_bsd.c an almost complete example of the GEOM beastiarium. Revision Changes Path 1.38 +62 -0 src/sys/geom/geom_bsd.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301262154.h0QLsaBZ022623>