diff options
author | kib <kib@FreeBSD.org> | 2010-12-29 12:11:07 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-12-29 12:11:07 +0000 |
commit | cbd7f9d93119559fe8dad982bbdf95ca468381da (patch) | |
tree | 54df4f93483cbf1cdcaf76e9fcbe38728c166257 /sys/dev/md/md.c | |
parent | 41c444747f81b148ec5714017fd6303d6163611f (diff) | |
download | FreeBSD-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.c | 5 |
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; |