Deleted Added
full compact
vdev_file.c (219089) vdev_file.c (226617)
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

--- 139 unchanged lines hidden (view full) ---

148 kmem_free(vf, sizeof (vdev_file_t));
149 vd->vdev_tsd = NULL;
150}
151
152static int
153vdev_file_io_start(zio_t *zio)
154{
155 vdev_t *vd = zio->io_vd;
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

--- 139 unchanged lines hidden (view full) ---

148 kmem_free(vf, sizeof (vdev_file_t));
149 vd->vdev_tsd = NULL;
150}
151
152static int
153vdev_file_io_start(zio_t *zio)
154{
155 vdev_t *vd = zio->io_vd;
156 vdev_file_t *vf = vd->vdev_tsd;
157 vnode_t *vp = vf->vf_vnode;
156 vdev_file_t *vf;
157 vnode_t *vp;
158 ssize_t resid;
159
158 ssize_t resid;
159
160 if (zio->io_type == ZIO_TYPE_IOCTL) {
161 /* XXPOLICY */
162 if (!vdev_readable(vd)) {
163 zio->io_error = ENXIO;
164 return (ZIO_PIPELINE_CONTINUE);
165 }
160 if (!vdev_readable(vd)) {
161 zio->io_error = ENXIO;
162 return (ZIO_PIPELINE_CONTINUE);
163 }
166
164
165 vf = vd->vdev_tsd;
166 vp = vf->vf_vnode;
167
168 if (zio->io_type == ZIO_TYPE_IOCTL) {
167 switch (zio->io_cmd) {
168 case DKIOCFLUSHWRITECACHE:
169 zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC,
170 kcred, NULL);
171 break;
172 default:
173 zio->io_error = ENOTSUP;
174 }

--- 54 unchanged lines hidden ---
169 switch (zio->io_cmd) {
170 case DKIOCFLUSHWRITECACHE:
171 zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC,
172 kcred, NULL);
173 break;
174 default:
175 zio->io_error = ENOTSUP;
176 }

--- 54 unchanged lines hidden ---