summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_ccd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-08-22 10:28:19 +0000
committerphk <phk@FreeBSD.org>2003-08-22 10:28:19 +0000
commit09553313704418ab61211c92251b2af374d2e362 (patch)
tree78ee15bcf7c3bc2cd79c5506967d2c7a9d8833bf /sys/geom/geom_ccd.c
parentd2368e58de1fa7b28a311922714f7a8d39abcac9 (diff)
downloadFreeBSD-src-09553313704418ab61211c92251b2af374d2e362.zip
FreeBSD-src-09553313704418ab61211c92251b2af374d2e362.tar.gz
Block all GETATTR calls hitting the CCD, we wouldn't know which child
device should handle them. This prevents for instance GEOM::ioctl requests from reaching a lower BSDlabel node, which ps@ found would confuse newfs(8).
Diffstat (limited to 'sys/geom/geom_ccd.c')
-rw-r--r--sys/geom/geom_ccd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index c2f309a..f296ee3 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -425,6 +425,16 @@ g_ccd_start(struct bio *bp)
cs = bp->bio_to->geom->softc;
/*
+ * Block all GETATTR requests, we wouldn't know which of our
+ * subdevices we should ship it off to.
+ * XXX: this may not be the right policy.
+ */
+ if(bp->bio_cmd == BIO_GETATTR) {
+ g_io_deliver(bp, EINVAL);
+ return;
+ }
+
+ /*
* Translate the partition-relative block number to an absolute.
*/
bn = bp->bio_offset / cs->sc_secsize;
OpenPOWER on IntegriCloud