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.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
25 * Copyright (c) 2015 by Chunwei Chen. All rights reserved.
26 * Copyright 2017 Nexenta Systems, Inc.
29 /* Portions Copyright 2007 Jeremy Teo */
30 /* Portions Copyright 2010 Robert Milkowski */
32 #include <sys/types.h>
33 #include <sys/param.h>
35 #include <sys/sysmacros.h>
37 #include <sys/uio_impl.h>
41 #include <sys/cmn_err.h>
42 #include <sys/errno.h>
43 #include <sys/zfs_dir.h>
44 #include <sys/zfs_acl.h>
45 #include <sys/zfs_ioctl.h>
46 #include <sys/fs/zfs.h>
48 #include <sys/dmu_objset.h>
52 #include <sys/policy.h>
53 #include <sys/zfs_vnops.h>
54 #include <sys/zfs_quota.h>
55 #include <sys/zfs_vfsops.h>
56 #include <sys/zfs_znode.h>
59 static ulong_t zfs_fsync_sync_cnt = 4;
62 zfs_fsync(znode_t *zp, int syncflag, cred_t *cr)
64 zfsvfs_t *zfsvfs = ZTOZSB(zp);
66 (void) tsd_set(zfs_fsyncer_key, (void *)zfs_fsync_sync_cnt);
68 if (zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) {
71 zil_commit(zfsvfs->z_log, zp->z_id);
74 tsd_set(zfs_fsyncer_key, NULL);
80 #if defined(SEEK_HOLE) && defined(SEEK_DATA)
82 * Lseek support for finding holes (cmd == SEEK_HOLE) and
83 * data (cmd == SEEK_DATA). "off" is an in/out parameter.
86 zfs_holey_common(znode_t *zp, ulong_t cmd, loff_t *off)
88 uint64_t noff = (uint64_t)*off; /* new offset */
94 if (noff >= file_sz) {
95 return (SET_ERROR(ENXIO));
98 if (cmd == F_SEEK_HOLE)
103 error = dmu_offset_next(ZTOZSB(zp)->z_os, zp->z_id, hole, &noff);
106 return (SET_ERROR(ENXIO));
108 /* file was dirty, so fall back to using generic logic */
109 if (error == EBUSY) {
117 * We could find a hole that begins after the logical end-of-file,
118 * because dmu_offset_next() only works on whole blocks. If the
119 * EOF falls mid-block, then indicate that the "virtual hole"
120 * at the end of the file begins at the logical EOF, rather than
121 * at the end of the last block.
123 if (noff > file_sz) {
135 zfs_holey(znode_t *zp, ulong_t cmd, loff_t *off)
137 zfsvfs_t *zfsvfs = ZTOZSB(zp);
143 error = zfs_holey_common(zp, cmd, off);
148 #endif /* SEEK_HOLE && SEEK_DATA */
152 zfs_access(znode_t *zp, int mode, int flag, cred_t *cr)
154 zfsvfs_t *zfsvfs = ZTOZSB(zp);
160 if (flag & V_ACE_MASK)
161 error = zfs_zaccess(zp, mode, flag, B_FALSE, cr);
163 error = zfs_zaccess_rwx(zp, mode, flag, cr);
169 static unsigned long zfs_vnops_read_chunk_size = 1024 * 1024; /* Tunable */
172 * Read bytes from specified file into supplied buffer.
174 * IN: zp - inode of file to be read from.
175 * uio - structure supplying read location, range info,
177 * ioflag - O_SYNC flags; used to provide FRSYNC semantics.
178 * O_DIRECT flag; used to bypass page cache.
179 * cr - credentials of caller.
181 * OUT: uio - updated offset and range, buffer filled.
183 * RETURN: 0 on success, error code on failure.
186 * inode - atime updated if byte count > 0
190 zfs_read(struct znode *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
193 boolean_t frsync = B_FALSE;
195 zfsvfs_t *zfsvfs = ZTOZSB(zp);
199 if (zp->z_pflags & ZFS_AV_QUARANTINED) {
201 return (SET_ERROR(EACCES));
204 /* We don't copy out anything useful for directories. */
205 if (Z_ISDIR(ZTOTYPE(zp))) {
207 return (SET_ERROR(EISDIR));
211 * Validate file offset
213 if (zfs_uio_offset(uio) < (offset_t)0) {
215 return (SET_ERROR(EINVAL));
219 * Fasttrack empty reads
221 if (zfs_uio_resid(uio) == 0) {
228 * If we're in FRSYNC mode, sync out this znode before reading it.
229 * Only do this for non-snapshots.
231 * Some platforms do not support FRSYNC and instead map it
232 * to O_SYNC, which results in unnecessary calls to zil_commit. We
233 * only honor FRSYNC requests on platforms which support it.
235 frsync = !!(ioflag & FRSYNC);
238 (frsync || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS))
239 zil_commit(zfsvfs->z_log, zp->z_id);
242 * Lock the range against changes.
244 zfs_locked_range_t *lr = zfs_rangelock_enter(&zp->z_rangelock,
245 zfs_uio_offset(uio), zfs_uio_resid(uio), RL_READER);
248 * If we are reading past end-of-file we can skip
249 * to the end; but we might still need to set atime.
251 if (zfs_uio_offset(uio) >= zp->z_size) {
256 ASSERT(zfs_uio_offset(uio) < zp->z_size);
257 #if defined(__linux__)
258 ssize_t start_offset = zfs_uio_offset(uio);
260 ssize_t n = MIN(zfs_uio_resid(uio), zp->z_size - zfs_uio_offset(uio));
261 ssize_t start_resid = n;
264 ssize_t nbytes = MIN(n, zfs_vnops_read_chunk_size -
265 P2PHASE(zfs_uio_offset(uio), zfs_vnops_read_chunk_size));
267 if (zfs_uio_segflg(uio) == UIO_NOCOPY)
268 error = mappedread_sf(zp, nbytes, uio);
271 if (zn_has_cached_data(zp) && !(ioflag & O_DIRECT)) {
272 error = mappedread(zp, nbytes, uio);
274 error = dmu_read_uio_dbuf(sa_get_db(zp->z_sa_hdl),
279 /* convert checksum errors into IO errors */
281 error = SET_ERROR(EIO);
283 #if defined(__linux__)
285 * if we actually read some bytes, bubbling EFAULT
286 * up to become EAGAIN isn't what we want here...
288 * ...on Linux, at least. On FBSD, doing this breaks.
290 if (error == EFAULT &&
291 (zfs_uio_offset(uio) - start_offset) != 0)
300 int64_t nread = start_resid - n;
301 dataset_kstats_update_read_kstats(&zfsvfs->z_kstat, nread);
302 task_io_account_read(nread);
304 zfs_rangelock_exit(lr);
306 ZFS_ACCESSTIME_STAMP(zfsvfs, zp);
312 * Write the bytes to a file.
314 * IN: zp - znode of file to be written to.
315 * uio - structure supplying write location, range info,
317 * ioflag - O_APPEND flag set if in append mode.
318 * O_DIRECT flag; used to bypass page cache.
319 * cr - credentials of caller.
321 * OUT: uio - updated offset and range.
323 * RETURN: 0 if success
324 * error code if failure
327 * ip - ctime|mtime updated if byte count > 0
332 zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
335 ssize_t start_resid = zfs_uio_resid(uio);
338 * Fasttrack empty write
340 ssize_t n = start_resid;
344 zfsvfs_t *zfsvfs = ZTOZSB(zp);
348 sa_bulk_attr_t bulk[4];
350 uint64_t mtime[2], ctime[2];
351 SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, &mtime, 16);
352 SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16);
353 SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_SIZE(zfsvfs), NULL,
355 SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_FLAGS(zfsvfs), NULL,
359 * Callers might not be able to detect properly that we are read-only,
360 * so check it explicitly here.
362 if (zfs_is_readonly(zfsvfs)) {
364 return (SET_ERROR(EROFS));
368 * If immutable or not appending then return EPERM.
369 * Intentionally allow ZFS_READONLY through here.
370 * See zfs_zaccess_common()
372 if ((zp->z_pflags & ZFS_IMMUTABLE) ||
373 ((zp->z_pflags & ZFS_APPENDONLY) && !(ioflag & O_APPEND) &&
374 (zfs_uio_offset(uio) < zp->z_size))) {
376 return (SET_ERROR(EPERM));
380 * Validate file offset
382 offset_t woff = ioflag & O_APPEND ? zp->z_size : zfs_uio_offset(uio);
385 return (SET_ERROR(EINVAL));
388 const uint64_t max_blksz = zfsvfs->z_max_blksz;
391 * Pre-fault the pages to ensure slow (eg NFS) pages
393 * Skip this if uio contains loaned arc_buf.
395 if (zfs_uio_prefaultpages(MIN(n, max_blksz), uio)) {
397 return (SET_ERROR(EFAULT));
401 * If in append mode, set the io offset pointer to eof.
403 zfs_locked_range_t *lr;
404 if (ioflag & O_APPEND) {
406 * Obtain an appending range lock to guarantee file append
407 * semantics. We reset the write offset once we have the lock.
409 lr = zfs_rangelock_enter(&zp->z_rangelock, 0, n, RL_APPEND);
410 woff = lr->lr_offset;
411 if (lr->lr_length == UINT64_MAX) {
413 * We overlocked the file because this write will cause
414 * the file block size to increase.
415 * Note that zp_size cannot change with this lock held.
419 zfs_uio_setoffset(uio, woff);
422 * Note that if the file block size will change as a result of
423 * this write, then this range lock will lock the entire file
424 * so that we can re-write the block safely.
426 lr = zfs_rangelock_enter(&zp->z_rangelock, woff, n, RL_WRITER);
429 if (zn_rlimit_fsize(zp, uio)) {
430 zfs_rangelock_exit(lr);
432 return (SET_ERROR(EFBIG));
435 const rlim64_t limit = MAXOFFSET_T;
438 zfs_rangelock_exit(lr);
440 return (SET_ERROR(EFBIG));
443 if (n > limit - woff)
446 uint64_t end_size = MAX(zp->z_size, woff + n);
447 zilog_t *zilog = zfsvfs->z_log;
449 const uint64_t uid = KUID_TO_SUID(ZTOUID(zp));
450 const uint64_t gid = KGID_TO_SGID(ZTOGID(zp));
451 const uint64_t projid = zp->z_projid;
454 * Write the file in reasonable size chunks. Each chunk is written
455 * in a separate transaction; this keeps the intent log records small
456 * and allows us to do more fine-grained space accounting.
459 woff = zfs_uio_offset(uio);
461 if (zfs_id_overblockquota(zfsvfs, DMU_USERUSED_OBJECT, uid) ||
462 zfs_id_overblockquota(zfsvfs, DMU_GROUPUSED_OBJECT, gid) ||
463 (projid != ZFS_DEFAULT_PROJID &&
464 zfs_id_overblockquota(zfsvfs, DMU_PROJECTUSED_OBJECT,
466 error = SET_ERROR(EDQUOT);
470 arc_buf_t *abuf = NULL;
471 if (n >= max_blksz && woff >= zp->z_size &&
472 P2PHASE(woff, max_blksz) == 0 &&
473 zp->z_blksz == max_blksz) {
475 * This write covers a full block. "Borrow" a buffer
476 * from the dmu so that we can fill it before we enter
477 * a transaction. This avoids the possibility of
478 * holding up the transaction if the data copy hangs
479 * up on a pagefault (e.g., from an NFS server mapping).
483 abuf = dmu_request_arcbuf(sa_get_db(zp->z_sa_hdl),
485 ASSERT(abuf != NULL);
486 ASSERT(arc_buf_size(abuf) == max_blksz);
487 if ((error = zfs_uiocopy(abuf->b_data, max_blksz,
488 UIO_WRITE, uio, &cbytes))) {
489 dmu_return_arcbuf(abuf);
492 ASSERT3S(cbytes, ==, max_blksz);
496 * Start a transaction.
498 dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os);
499 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
500 dmu_buf_impl_t *db = (dmu_buf_impl_t *)sa_get_db(zp->z_sa_hdl);
502 dmu_tx_hold_write_by_dnode(tx, DB_DNODE(db), woff,
505 zfs_sa_upgrade_txholds(tx, zp);
506 error = dmu_tx_assign(tx, TXG_WAIT);
510 dmu_return_arcbuf(abuf);
515 * If rangelock_enter() over-locked we grow the blocksize
516 * and then reduce the lock range. This will only happen
517 * on the first iteration since rangelock_reduce() will
518 * shrink down lr_length to the appropriate size.
520 if (lr->lr_length == UINT64_MAX) {
523 if (zp->z_blksz > max_blksz) {
525 * File's blocksize is already larger than the
526 * "recordsize" property. Only let it grow to
527 * the next power of 2.
529 ASSERT(!ISP2(zp->z_blksz));
530 new_blksz = MIN(end_size,
531 1 << highbit64(zp->z_blksz));
533 new_blksz = MIN(end_size, max_blksz);
535 zfs_grow_blocksize(zp, new_blksz, tx);
536 zfs_rangelock_reduce(lr, woff, n);
540 * XXX - should we really limit each write to z_max_blksz?
541 * Perhaps we should use SPA_MAXBLOCKSIZE chunks?
543 const ssize_t nbytes =
544 MIN(n, max_blksz - P2PHASE(woff, max_blksz));
548 tx_bytes = zfs_uio_resid(uio);
549 zfs_uio_fault_disable(uio, B_TRUE);
550 error = dmu_write_uio_dbuf(sa_get_db(zp->z_sa_hdl),
552 zfs_uio_fault_disable(uio, B_FALSE);
554 if (error == EFAULT) {
557 * Account for partial writes before
558 * continuing the loop.
559 * Update needs to occur before the next
560 * zfs_uio_prefaultpages, or prefaultpages may
561 * error, and we may break the loop early.
563 if (tx_bytes != zfs_uio_resid(uio))
564 n -= tx_bytes - zfs_uio_resid(uio);
565 if (zfs_uio_prefaultpages(MIN(n, max_blksz),
576 tx_bytes -= zfs_uio_resid(uio);
578 /* Implied by abuf != NULL: */
579 ASSERT3S(n, >=, max_blksz);
580 ASSERT0(P2PHASE(woff, max_blksz));
582 * We can simplify nbytes to MIN(n, max_blksz) since
583 * P2PHASE(woff, max_blksz) is 0, and knowing
584 * n >= max_blksz lets us simplify further:
586 ASSERT3S(nbytes, ==, max_blksz);
588 * Thus, we're writing a full block at a block-aligned
589 * offset and extending the file past EOF.
591 * dmu_assign_arcbuf_by_dbuf() will directly assign the
592 * arc buffer to a dbuf.
594 error = dmu_assign_arcbuf_by_dbuf(
595 sa_get_db(zp->z_sa_hdl), woff, abuf, tx);
597 dmu_return_arcbuf(abuf);
601 ASSERT3S(nbytes, <=, zfs_uio_resid(uio));
602 zfs_uioskip(uio, nbytes);
605 if (tx_bytes && zn_has_cached_data(zp) &&
606 !(ioflag & O_DIRECT)) {
607 update_pages(zp, woff, tx_bytes, zfsvfs->z_os);
611 * If we made no progress, we're done. If we made even
612 * partial progress, update the znode and ZIL accordingly.
615 (void) sa_update(zp->z_sa_hdl, SA_ZPL_SIZE(zfsvfs),
616 (void *)&zp->z_size, sizeof (uint64_t), tx);
623 * Clear Set-UID/Set-GID bits on successful write if not
624 * privileged and at least one of the execute bits is set.
626 * It would be nice to do this after all writes have
627 * been done, but that would still expose the ISUID/ISGID
628 * to another app after the partial write is committed.
630 * Note: we don't call zfs_fuid_map_id() here because
631 * user 0 is not an ephemeral uid.
633 mutex_enter(&zp->z_acl_lock);
634 if ((zp->z_mode & (S_IXUSR | (S_IXUSR >> 3) |
635 (S_IXUSR >> 6))) != 0 &&
636 (zp->z_mode & (S_ISUID | S_ISGID)) != 0 &&
637 secpolicy_vnode_setid_retain(zp, cr,
638 ((zp->z_mode & S_ISUID) != 0 && uid == 0)) != 0) {
640 zp->z_mode &= ~(S_ISUID | S_ISGID);
641 newmode = zp->z_mode;
642 (void) sa_update(zp->z_sa_hdl, SA_ZPL_MODE(zfsvfs),
643 (void *)&newmode, sizeof (uint64_t), tx);
645 mutex_exit(&zp->z_acl_lock);
647 zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime);
650 * Update the file size (zp_size) if it has changed;
651 * account for possible concurrent updates.
653 while ((end_size = zp->z_size) < zfs_uio_offset(uio)) {
654 (void) atomic_cas_64(&zp->z_size, end_size,
655 zfs_uio_offset(uio));
659 * If we are replaying and eof is non zero then force
660 * the file size to the specified eof. Note, there's no
661 * concurrency during replay.
663 if (zfsvfs->z_replay && zfsvfs->z_replay_eof != 0)
664 zp->z_size = zfsvfs->z_replay_eof;
666 error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
668 zfs_log_write(zilog, tx, TX_WRITE, zp, woff, tx_bytes, ioflag,
674 ASSERT3S(tx_bytes, ==, nbytes);
678 if (zfs_uio_prefaultpages(MIN(n, max_blksz), uio)) {
679 error = SET_ERROR(EFAULT);
685 zfs_znode_update_vfs(zp);
686 zfs_rangelock_exit(lr);
689 * If we're in replay mode, or we made no progress, or the
690 * uio data is inaccessible return an error. Otherwise, it's
691 * at least a partial write, so it's successful.
693 if (zfsvfs->z_replay || zfs_uio_resid(uio) == start_resid ||
699 if (ioflag & (O_SYNC | O_DSYNC) ||
700 zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
701 zil_commit(zilog, zp->z_id);
703 const int64_t nwritten = start_resid - zfs_uio_resid(uio);
704 dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, nwritten);
705 task_io_account_write(nwritten);
713 zfs_getsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr)
715 zfsvfs_t *zfsvfs = ZTOZSB(zp);
717 boolean_t skipaclchk = (flag & ATTR_NOACLCHECK) ? B_TRUE : B_FALSE;
721 error = zfs_getacl(zp, vsecp, skipaclchk, cr);
729 zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr)
731 zfsvfs_t *zfsvfs = ZTOZSB(zp);
733 boolean_t skipaclchk = (flag & ATTR_NOACLCHECK) ? B_TRUE : B_FALSE;
734 zilog_t *zilog = zfsvfs->z_log;
739 error = zfs_setacl(zp, vsecp, skipaclchk, cr);
741 if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
742 zil_commit(zilog, 0);
749 static int zil_fault_io = 0;
752 static void zfs_get_done(zgd_t *zgd, int error);
755 * Get data to generate a TX_WRITE intent log record.
758 zfs_get_data(void *arg, uint64_t gen, lr_write_t *lr, char *buf,
759 struct lwb *lwb, zio_t *zio)
761 zfsvfs_t *zfsvfs = arg;
762 objset_t *os = zfsvfs->z_os;
764 uint64_t object = lr->lr_foid;
765 uint64_t offset = lr->lr_offset;
766 uint64_t size = lr->lr_length;
772 ASSERT3P(lwb, !=, NULL);
773 ASSERT3P(zio, !=, NULL);
774 ASSERT3U(size, !=, 0);
777 * Nothing to do if the file has been removed
779 if (zfs_zget(zfsvfs, object, &zp) != 0)
780 return (SET_ERROR(ENOENT));
781 if (zp->z_unlinked) {
783 * Release the vnode asynchronously as we currently have the
784 * txg stopped from syncing.
787 return (SET_ERROR(ENOENT));
789 /* check if generation number matches */
790 if (sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(zfsvfs), &zp_gen,
791 sizeof (zp_gen)) != 0) {
793 return (SET_ERROR(EIO));
797 return (SET_ERROR(ENOENT));
800 zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_SLEEP);
802 zgd->zgd_private = zp;
805 * Write records come in two flavors: immediate and indirect.
806 * For small writes it's cheaper to store the data with the
807 * log record (immediate); for large writes it's cheaper to
808 * sync the data and get a pointer to it (indirect) so that
809 * we don't have to write the data twice.
811 if (buf != NULL) { /* immediate write */
812 zgd->zgd_lr = zfs_rangelock_enter(&zp->z_rangelock,
813 offset, size, RL_READER);
814 /* test for truncation needs to be done while range locked */
815 if (offset >= zp->z_size) {
816 error = SET_ERROR(ENOENT);
818 error = dmu_read(os, object, offset, size, buf,
819 DMU_READ_NO_PREFETCH);
821 ASSERT(error == 0 || error == ENOENT);
822 } else { /* indirect write */
824 * Have to lock the whole block to ensure when it's
825 * written out and its checksum is being calculated
826 * that no one can change the data. We need to re-check
827 * blocksize after we get the lock in case it's changed!
832 blkoff = ISP2(size) ? P2PHASE(offset, size) : offset;
834 zgd->zgd_lr = zfs_rangelock_enter(&zp->z_rangelock,
835 offset, size, RL_READER);
836 if (zp->z_blksz == size)
839 zfs_rangelock_exit(zgd->zgd_lr);
841 /* test for truncation needs to be done while range locked */
842 if (lr->lr_offset >= zp->z_size)
843 error = SET_ERROR(ENOENT);
846 error = SET_ERROR(EIO);
851 error = dmu_buf_hold(os, object, offset, zgd, &db,
852 DMU_READ_NO_PREFETCH);
855 blkptr_t *bp = &lr->lr_blkptr;
860 ASSERT(db->db_offset == offset);
861 ASSERT(db->db_size == size);
863 error = dmu_sync(zio, lr->lr_common.lrc_txg,
865 ASSERT(error || lr->lr_length <= size);
868 * On success, we need to wait for the write I/O
869 * initiated by dmu_sync() to complete before we can
870 * release this dbuf. We will finish everything up
871 * in the zfs_get_done() callback.
876 if (error == EALREADY) {
877 lr->lr_common.lrc_txtype = TX_WRITE2;
879 * TX_WRITE2 relies on the data previously
880 * written by the TX_WRITE that caused
881 * EALREADY. We zero out the BP because
882 * it is the old, currently-on-disk BP.
891 zfs_get_done(zgd, error);
899 zfs_get_done(zgd_t *zgd, int error)
901 znode_t *zp = zgd->zgd_private;
904 dmu_buf_rele(zgd->zgd_db, zgd);
906 zfs_rangelock_exit(zgd->zgd_lr);
909 * Release the vnode asynchronously as we currently have the
910 * txg stopped from syncing.
914 kmem_free(zgd, sizeof (zgd_t));
917 EXPORT_SYMBOL(zfs_access);
918 EXPORT_SYMBOL(zfs_fsync);
919 EXPORT_SYMBOL(zfs_holey);
920 EXPORT_SYMBOL(zfs_read);
921 EXPORT_SYMBOL(zfs_write);
922 EXPORT_SYMBOL(zfs_getsecattr);
923 EXPORT_SYMBOL(zfs_setsecattr);
925 ZFS_MODULE_PARAM(zfs_vnops, zfs_vnops_, read_chunk_size, ULONG, ZMOD_RW,
926 "Bytes to read per chunk");