diff options
author | mav <mav@FreeBSD.org> | 2009-12-24 11:05:23 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-12-24 11:05:23 +0000 |
commit | f90d8324367d5d579faf67e2a84261d958916058 (patch) | |
tree | a2fd3264b860fd9b4d26648a1c3776d37606a4b0 /sys/geom/geom_dev.c | |
parent | 5908bf1b9fa686f7864c16aae75e08714dc56192 (diff) | |
download | FreeBSD-src-f90d8324367d5d579faf67e2a84261d958916058.zip FreeBSD-src-f90d8324367d5d579faf67e2a84261d958916058.tar.gz |
Add two disk ioctls, giving user-level tools information about disk/array
stripe (optimal access block) size and offset.
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r-- | sys/geom/geom_dev.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 8b560ab..af05618 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -323,7 +323,12 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread return (ENOENT); strlcpy(data, pp->name, i); break; - + case DIOCGSTRIPESIZE: + *(off_t *)data = cp->provider->stripesize; + break; + case DIOCGSTRIPEOFFSET: + *(off_t *)data = cp->provider->stripeoffset; + break; default: if (cp->provider->geom->ioctl != NULL) { error = cp->provider->geom->ioctl(cp->provider, cmd, data, fflag, td); |