zvol.c (274337) | zvol.c (275474) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 77 unchanged lines hidden (view full) --- 86#include <sys/vdev_impl.h> 87#include <sys/vdev_raidz.h> 88#include <sys/zvol.h> 89#include <sys/zil_impl.h> 90#include <sys/dbuf.h> 91#include <sys/dmu_tx.h> 92#include <sys/zfeature.h> 93#include <sys/zio_checksum.h> | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 77 unchanged lines hidden (view full) --- 86#include <sys/vdev_impl.h> 87#include <sys/vdev_raidz.h> 88#include <sys/zvol.h> 89#include <sys/zil_impl.h> 90#include <sys/dbuf.h> 91#include <sys/dmu_tx.h> 92#include <sys/zfeature.h> 93#include <sys/zio_checksum.h> |
94#include <sys/filio.h> |
|
94 95#include <geom/geom.h> 96 97#include "zfs_namecheck.h" 98 99struct g_class zfs_zvol_class = { 100 .name = "ZFS::ZVOL", 101 .version = G_VERSION, --- 2807 unchanged lines hidden (view full) --- 2909 arg->value.off = avail / DEV_BSIZE; 2910 } else if (strcmp(arg->name, "poolblocksused") == 0) { 2911 refd = metaslab_class_get_alloc(spa_normal_class(spa)); 2912 arg->value.off = refd / DEV_BSIZE; 2913 } else 2914 error = ENOIOCTL; 2915 break; 2916 } | 95 96#include <geom/geom.h> 97 98#include "zfs_namecheck.h" 99 100struct g_class zfs_zvol_class = { 101 .name = "ZFS::ZVOL", 102 .version = G_VERSION, --- 2807 unchanged lines hidden (view full) --- 2910 arg->value.off = avail / DEV_BSIZE; 2911 } else if (strcmp(arg->name, "poolblocksused") == 0) { 2912 refd = metaslab_class_get_alloc(spa_normal_class(spa)); 2913 arg->value.off = refd / DEV_BSIZE; 2914 } else 2915 error = ENOIOCTL; 2916 break; 2917 } |
2918 case FIOSEEKHOLE: 2919 case FIOSEEKDATA: { 2920 off_t *off = (off_t *)data; 2921 uint64_t noff; 2922 boolean_t hole; 2923 2924 hole = (cmd == FIOSEEKHOLE); 2925 noff = *off; 2926 error = dmu_offset_next(zv->zv_objset, ZVOL_OBJ, hole, &noff); 2927 *off = noff; 2928 break; 2929 } |
|
2917 default: 2918 error = ENOIOCTL; 2919 } 2920 2921 return (error); 2922} | 2930 default: 2931 error = ENOIOCTL; 2932 } 2933 2934 return (error); 2935} |