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;
}
#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.
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