Make DIOCGATTR in device mode handle "GEOM::candelete".

MFC after:	3 days
This commit is contained in:
Alexander Motin 2015-03-12 16:19:18 +00:00
parent e5a31fce25
commit 0d45c37cb6

View File

@ -3130,7 +3130,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;