diff options
author | mav <mav@FreeBSD.org> | 2014-11-20 01:55:12 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-11-20 01:55:12 +0000 |
commit | 6414b04c27c11b1fb58b7605fde9797ffe3dfa32 (patch) | |
tree | b3e695871eabeae5b0f9c125f54622c300f3baf5 /sys/geom | |
parent | 3f382b8a2d8301dde56a5e8b9bde1a25c1bcca19 (diff) | |
download | FreeBSD-src-6414b04c27c11b1fb58b7605fde9797ffe3dfa32.zip FreeBSD-src-6414b04c27c11b1fb58b7605fde9797ffe3dfa32.tar.gz |
MFC r274154, r274163:
Add to CTL support for logical block provisioning threshold notifications.
For ZVOL-backed LUNs this allows to inform initiators if storage's used or
available spaces get above/below the configured thresholds.
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_dev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index c051ea7..6d02ccb 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -508,6 +508,16 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread if (error == 0 && *(char *)data == '\0') error = ENOENT; break; + case DIOCGATTR: { + struct diocgattr_arg *arg = (struct diocgattr_arg *)data; + + if (arg->len > sizeof(arg->value)) { + error = EINVAL; + break; + } + error = g_io_getattr(arg->name, cp, &arg->len, &arg->value); + break; + } default: if (cp->provider->geom->ioctl != NULL) { error = cp->provider->geom->ioctl(cp->provider, cmd, data, fflag, td); |