summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-12-29 12:11:07 +0000
committerkib <kib@FreeBSD.org>2010-12-29 12:11:07 +0000
commitcbd7f9d93119559fe8dad982bbdf95ca468381da (patch)
tree54df4f93483cbf1cdcaf76e9fcbe38728c166257 /sys/dev/md/md.c
parent41c444747f81b148ec5714017fd6303d6163611f (diff)
downloadFreeBSD-src-cbd7f9d93119559fe8dad982bbdf95ca468381da.zip
FreeBSD-src-cbd7f9d93119559fe8dad982bbdf95ca468381da.tar.gz
Add reporting of GEOM::candelete BIO_GETATTR for md(4) and geom_disk(4).
Non-zero value of attribute means that device supports BIO_DELETE. Suggested and reviewed by: pjd Tested by: pho MFC after: 1 week
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 314e289..ccd9039 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -717,11 +717,12 @@ md_kthread(void *arg)
}
mtx_unlock(&sc->queue_mtx);
if (bp->bio_cmd == BIO_GETATTR) {
- if (sc->fwsectors && sc->fwheads &&
+ if ((sc->fwsectors && sc->fwheads &&
(g_handleattr_int(bp, "GEOM::fwsectors",
sc->fwsectors) ||
g_handleattr_int(bp, "GEOM::fwheads",
- sc->fwheads)))
+ sc->fwheads))) ||
+ g_handleattr_int(bp, "GEOM::candelete", 1))
error = -1;
else
error = EOPNOTSUPP;
OpenPOWER on IntegriCloud