vdev_file.c (249195) | vdev_file.c (254591) |
---|---|
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 --- 35 unchanged lines hidden (view full) --- 44static void 45vdev_file_rele(vdev_t *vd) 46{ 47 ASSERT(vd->vdev_path != NULL); 48} 49 50static int 51vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, | 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 --- 35 unchanged lines hidden (view full) --- 44static void 45vdev_file_rele(vdev_t *vd) 46{ 47 ASSERT(vd->vdev_path != NULL); 48} 49 50static int 51vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, |
52 uint64_t *ashift) | 52 uint64_t *logical_ashift, uint64_t *physical_ashift) |
53{ 54 vdev_file_t *vf; 55 vnode_t *vp; 56 vattr_t vattr; 57 int error; 58 59 /* 60 * We must have a pathname, and it must be absolute. --- 64 unchanged lines hidden (view full) --- 125 (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); 126 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; 127 kmem_free(vd->vdev_tsd, sizeof (vdev_file_t)); 128 vd->vdev_tsd = NULL; 129 return (error); 130 } 131 132 *max_psize = *psize = vattr.va_size; | 53{ 54 vdev_file_t *vf; 55 vnode_t *vp; 56 vattr_t vattr; 57 int error; 58 59 /* 60 * We must have a pathname, and it must be absolute. --- 64 unchanged lines hidden (view full) --- 125 (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); 126 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; 127 kmem_free(vd->vdev_tsd, sizeof (vdev_file_t)); 128 vd->vdev_tsd = NULL; 129 return (error); 130 } 131 132 *max_psize = *psize = vattr.va_size; |
133 *ashift = SPA_MINBLOCKSHIFT; | 133 *logical_ashift = SPA_MINBLOCKSHIFT; 134 *physical_ashift = SPA_MINBLOCKSHIFT; |
134 135 return (0); 136} 137 138static void 139vdev_file_close(vdev_t *vd) 140{ 141 vdev_file_t *vf = vd->vdev_tsd; --- 93 unchanged lines hidden --- | 135 136 return (0); 137} 138 139static void 140vdev_file_close(vdev_t *vd) 141{ 142 vdev_file_t *vf = vd->vdev_tsd; --- 93 unchanged lines hidden --- |