diff options
author | phk <phk@FreeBSD.org> | 2003-01-26 21:54:36 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-26 21:54:36 +0000 |
commit | f71e2dab31370e0325052fc73b068e52032e831e (patch) | |
tree | 70afd612269d511d30366eccb8b10b03b5585207 /lib/libc | |
parent | 0d45de23ba9e63ea3cdc543dd8676df4151503cd (diff) | |
download | FreeBSD-src-f71e2dab31370e0325052fc73b068e52032e831e.zip FreeBSD-src-f71e2dab31370e0325052fc73b068e52032e831e.tar.gz |
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.
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions