|
20 | 20 | */
|
21 | 21 | /*
|
22 | 22 | * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
23 |
| - * Copyright (c) 2013 by Delphix. All rights reserved. |
| 23 | + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. |
24 | 24 | */
|
25 | 25 |
|
26 | 26 | /* Portions Copyright 2007 Jeremy Teo */
|
@@ -1425,7 +1425,7 @@ zfs_grow_blocksize(znode_t *zp, uint64_t size, dmu_tx_t *tx)
|
1425 | 1425 | * IN: zp - znode of file to free data in.
|
1426 | 1426 | * end - new end-of-file
|
1427 | 1427 | *
|
1428 |
| - * RETURN: 0 on success, error code on failure |
| 1428 | + * RETURN: 0 on success, error code on failure |
1429 | 1429 | */
|
1430 | 1430 | static int
|
1431 | 1431 | zfs_extend(znode_t *zp, uint64_t end)
|
@@ -1545,7 +1545,7 @@ zfs_zero_partial_page(znode_t *zp, uint64_t start, uint64_t len)
|
1545 | 1545 | * off - start of section to free.
|
1546 | 1546 | * len - length of section to free.
|
1547 | 1547 | *
|
1548 |
| - * RETURN: 0 on success, error code on failure |
| 1548 | + * RETURN: 0 on success, error code on failure |
1549 | 1549 | */
|
1550 | 1550 | static int
|
1551 | 1551 | zfs_free_range(znode_t *zp, uint64_t off, uint64_t len)
|
@@ -1624,7 +1624,7 @@ zfs_free_range(znode_t *zp, uint64_t off, uint64_t len)
|
1624 | 1624 | * IN: zp - znode of file to free data in.
|
1625 | 1625 | * end - new end-of-file.
|
1626 | 1626 | *
|
1627 |
| - * RETURN: 0 on success, error code on failure |
| 1627 | + * RETURN: 0 on success, error code on failure |
1628 | 1628 | */
|
1629 | 1629 | static int
|
1630 | 1630 | zfs_trunc(znode_t *zp, uint64_t end)
|
@@ -1657,6 +1657,7 @@ zfs_trunc(znode_t *zp, uint64_t end)
|
1657 | 1657 | tx = dmu_tx_create(zsb->z_os);
|
1658 | 1658 | dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
|
1659 | 1659 | zfs_sa_upgrade_txholds(tx, zp);
|
| 1660 | + dmu_tx_mark_netfree(tx); |
1660 | 1661 | error = dmu_tx_assign(tx, TXG_WAIT);
|
1661 | 1662 | if (error) {
|
1662 | 1663 | dmu_tx_abort(tx);
|
@@ -1691,7 +1692,7 @@ zfs_trunc(znode_t *zp, uint64_t end)
|
1691 | 1692 | * flag - current file open mode flags.
|
1692 | 1693 | * log - TRUE if this action should be logged
|
1693 | 1694 | *
|
1694 |
| - * RETURN: 0 on success, error code on failure |
| 1695 | + * RETURN: 0 on success, error code on failure |
1695 | 1696 | */
|
1696 | 1697 | int
|
1697 | 1698 | zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
|
|
0 commit comments