diff --git a/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 5d9b9fca038aa2e480832dcba9b6668e7057bf91..dc9eebaf467665e9c8af9f81cddcf757920eba42 100644 --- a/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -478,6 +478,7 @@ offset_t zfs_read_chunk_size = 1024 * 1024; /* Tunable */ * Read bytes from specified file into supplied buffer. * * IN: vp - vnode of file to be read from. + * fp - file to be read from. * uio - structure supplying read location, range info, * and return buffer. * ioflag - SYNC flags; used to provide FRSYNC semantics. @@ -494,7 +495,7 @@ offset_t zfs_read_chunk_size = 1024 * 1024; /* Tunable */ */ /* ARGSUSED */ static int -zfs_read(vnode_t *vp, uio_t *uio, int ioflag) +zfs_read(vnode_t *vp, struct file* fp, uio_t *uio, int ioflag) { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; diff --git a/fs/devfs/devfs_vnops.cc b/fs/devfs/devfs_vnops.cc index 6345451f3e9acf5e55c2aa52bdf3bd8be6002453..8a9d488c2c73f67b2f7ec7af275545aaf16be550 100644 --- a/fs/devfs/devfs_vnops.cc +++ b/fs/devfs/devfs_vnops.cc @@ -102,7 +102,7 @@ devfs_close(struct vnode *vp, struct file *fp) } static int -devfs_read(struct vnode *vp, struct uio *uio, int ioflags) +devfs_read(struct vnode *vp, struct file *fp, struct uio *uio, int ioflags) { return device_read((device*)vp->v_data, uio, ioflags); } diff --git a/fs/ramfs/ramfs_vnops.cc b/fs/ramfs/ramfs_vnops.cc index 27dbbeca5da39d08a137466a8409ffbdd950828a..8d8d454e103141aae0cf0c3d6ebc1b52ae8821bd 100644 --- a/fs/ramfs/ramfs_vnops.cc +++ b/fs/ramfs/ramfs_vnops.cc @@ -295,7 +295,7 @@ ramfs_create(struct vnode *dvp, char *name, mode_t mode) } static int -ramfs_read(struct vnode *vp, struct uio *uio, int ioflag) +ramfs_read(struct vnode *vp, struct file *fp, struct uio *uio, int ioflag) { struct ramfs_node *np = (ramfs_node*)vp->v_data; size_t len; diff --git a/fs/vfs/vfs_fops.cc b/fs/vfs/vfs_fops.cc index f44cff4627e9820d594341c71270e858805c0ad2..52d3297ba1be9c4bc9a85520553aac74cfa2f797 100644 --- a/fs/vfs/vfs_fops.cc +++ b/fs/vfs/vfs_fops.cc @@ -49,7 +49,7 @@ int vfs_file::read(struct uio *uio, int flags) if ((flags & FOF_OFFSET) == 0) uio->uio_offset = fp->f_offset; - error = VOP_READ(vp, uio, 0); + error = VOP_READ(vp, fp, uio, 0); if (!error) { count = bytes - uio->uio_resid; if ((flags & FOF_OFFSET) == 0) diff --git a/include/osv/vnode.h b/include/osv/vnode.h index 35544d182e606b0b3ed965db4209449c28a8aae1..0ee5d335fc8039ea328a6b0f7d48f1e477a562b4 100755 --- a/include/osv/vnode.h +++ b/include/osv/vnode.h @@ -120,7 +120,7 @@ struct vattr { typedef int (*vnop_open_t) (struct file *); typedef int (*vnop_close_t) (struct vnode *, struct file *); -typedef int (*vnop_read_t) (struct vnode *, struct uio *, int); +typedef int (*vnop_read_t) (struct vnode *, struct file *, struct uio *, int); typedef int (*vnop_write_t) (struct vnode *, struct uio *, int); typedef int (*vnop_seek_t) (struct vnode *, struct file *, off_t, off_t); typedef int (*vnop_ioctl_t) (struct vnode *, struct file *, u_long, void *); @@ -169,7 +169,7 @@ struct vnops { */ #define VOP_OPEN(VP, FP) ((VP)->v_op->vop_open)(FP) #define VOP_CLOSE(VP, FP) ((VP)->v_op->vop_close)(VP, FP) -#define VOP_READ(VP, U, F) ((VP)->v_op->vop_read)(VP, U, F) +#define VOP_READ(VP, FP, U, F) ((VP)->v_op->vop_read)(VP, FP, U, F) #define VOP_WRITE(VP, U, F) ((VP)->v_op->vop_write)(VP, U, F) #define VOP_SEEK(VP, FP, OLD, NEW) ((VP)->v_op->vop_seek)(VP, FP, OLD, NEW) #define VOP_IOCTL(VP, FP, C, A) ((VP)->v_op->vop_ioctl)(VP, FP, C, A)