diff options
author | mav <mav@FreeBSD.org> | 2011-03-24 08:37:48 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-03-24 08:37:48 +0000 |
commit | ad433c09b32c442209795217720d42efac493286 (patch) | |
tree | 055755d318b2a54215757a1de7d027bed661d375 /sys/geom/geom_dev.c | |
parent | 7750aaa40d1f06323ed27a2db069f660c1f245ba (diff) | |
download | FreeBSD-src-ad433c09b32c442209795217720d42efac493286.zip FreeBSD-src-ad433c09b32c442209795217720d42efac493286.tar.gz |
MFgraid/head r217827:
Change BIO_GETATTR("GEOM::kerneldump") API to make set_dumper() called by
consumer (geom_dev) instead of provider (geom_disk). This allows any geom
insert it's code into the dump call chain, implementing more sophisticated
functionality then just disk partitioning.
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r-- | sys/geom/geom_dev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index e4cbbe3..6ae4201 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -289,8 +289,11 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread kd.length = OFF_MAX; i = sizeof kd; error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd); - if (!error) - dev->si_flags |= SI_DUMPDEV; + if (!error) { + error = set_dumper(&kd.di); + if (!error) + dev->si_flags |= SI_DUMPDEV; + } break; case DIOCGFLUSH: error = g_io_flush(cp); |