summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-27 09:28:30 +0000
committermav <mav@FreeBSD.org>2015-03-27 09:28:30 +0000
commitbfc574567f2010a7a3e2486ee3c7e25d62772917 (patch)
tree9dce01cc5e3f80b0ed9b612e7b057f517a40ce52 /sys/cddl
parent713a1f945de08c9c2a38c23fbef74671ec53b4fa (diff)
downloadFreeBSD-src-bfc574567f2010a7a3e2486ee3c7e25d62772917.zip
FreeBSD-src-bfc574567f2010a7a3e2486ee3c7e25d62772917.tar.gz
MFC r279927: Make DIOCGATTR in device mode handle "GEOM::candelete".
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
index fe12bd9..234e13e 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
@@ -3131,7 +3131,9 @@ zvol_d_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct threa
struct diocgattr_arg *arg = (struct diocgattr_arg *)data;
uint64_t refd, avail, usedobjs, availobjs;
- if (strcmp(arg->name, "blocksavail") == 0) {
+ if (strcmp(arg->name, "GEOM::candelete") == 0)
+ arg->value.i = 1;
+ else if (strcmp(arg->name, "blocksavail") == 0) {
dmu_objset_space(zv->zv_objset, &refd, &avail,
&usedobjs, &availobjs);
arg->value.off = avail / DEV_BSIZE;
OpenPOWER on IntegriCloud