Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
| Show First 20 Lines • Show All 640 Lines • ▼ Show 20 Lines | zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct) | ||||
| zfsvfs_t *zfsvfs = zp->z_zfsvfs; | zfsvfs_t *zfsvfs = zp->z_zfsvfs; | ||||
| ssize_t n, nbytes; | ssize_t n, nbytes; | ||||
| int error = 0; | int error = 0; | ||||
| xuio_t *xuio = NULL; | xuio_t *xuio = NULL; | ||||
| ZFS_ENTER(zfsvfs); | ZFS_ENTER(zfsvfs); | ||||
| ZFS_VERIFY_ZP(zp); | ZFS_VERIFY_ZP(zp); | ||||
| /* We don't copy out anything useful for directories. */ | |||||
kevans: I'm going to send a patch for this to OpenZFS. This is arguably internal consistency for… | |||||
| if (vp->v_type == VDIR) { | |||||
| ZFS_EXIT(zfsvfs); | |||||
| return (SET_ERROR(EISDIR)); | |||||
| } | |||||
| if (zp->z_pflags & ZFS_AV_QUARANTINED) { | if (zp->z_pflags & ZFS_AV_QUARANTINED) { | ||||
| ZFS_EXIT(zfsvfs); | ZFS_EXIT(zfsvfs); | ||||
| return (SET_ERROR(EACCES)); | return (SET_ERROR(EACCES)); | ||||
| } | } | ||||
| /* | /* | ||||
| * Validate file offset | * Validate file offset | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 5,397 Lines • Show Last 20 Lines | |||||
I'm going to send a patch for this to OpenZFS. This is arguably internal consistency for OpenZFS, as the Linux implementation will reject directories with EISDIR.