X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vnops.c;h=5b47cba7f6cd6a05644b0bc267cb15ce7fa92d86;hb=da88a7fbe8876437c25f1006f91ca5595659b8d2;hp=00534d845ca6cd9e8ad8ee5f4373cd8ed9c54c39;hpb=17c37660a14cc5e26cc668fdb285933fee4b6cf4;p=zfs.git diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 00534d8..5b47cba 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -220,7 +220,11 @@ zfs_close(struct inode *ip, int flag, cred_t *cr) ZFS_ENTER(zsb); ZFS_VERIFY_ZP(zp); - /* Decrement the synchronous opens in the znode */ + /* + * Zero the synchronous opens in the znode. Under Linux the + * zfs_close() hook is not symmetric with zfs_open(), it is + * only called once when the last reference is dropped. + */ if (flag & O_SYNC) zp->z_sync_cnt = 0; @@ -335,7 +339,7 @@ mappedread(struct inode *ip, int nbytes, uio_t *uio) } #endif /* _KERNEL */ -offset_t zfs_read_chunk_size = 1024 * 1024; /* Tunable */ +unsigned long zfs_read_chunk_size = 1024 * 1024; /* Tunable */ /* * Read bytes from specified file into supplied buffer. @@ -4716,3 +4720,8 @@ zfs_retzcbuf(struct inode *ip, xuio_t *xuio, cred_t *cr) return (0); } #endif /* HAVE_UIO_ZEROCOPY */ + +#if defined(_KERNEL) && defined(HAVE_SPL) +module_param(zfs_read_chunk_size, long, 0644); +MODULE_PARM_DESC(zfs_read_chunk_size, "Bytes to read per chunk"); +#endif