mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 19:39:35 +03:00
Fix TXG_MASK cstyle
Fix style issue for 'tx->tx_txg&TXG_MASK'. There should be white space around the '&' character. Split the dnode_reallocate() ASSERT to make it more readable to clearly separate the checks. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8606
This commit is contained in:
parent
9e3485abfc
commit
3fa93bb8d3
@ -1280,7 +1280,6 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
|
|||||||
return (err);
|
return (err);
|
||||||
|
|
||||||
err = dmu_free_long_object(rwa->os, slot);
|
err = dmu_free_long_object(rwa->os, slot);
|
||||||
|
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
return (err);
|
return (err);
|
||||||
|
|
||||||
@ -1316,6 +1315,7 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
|
|||||||
drro->drr_bonustype, drro->drr_bonuslen,
|
drro->drr_bonustype, drro->drr_bonuslen,
|
||||||
dn_slots << DNODE_SHIFT, tx);
|
dn_slots << DNODE_SHIFT, tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
dmu_tx_commit(tx);
|
dmu_tx_commit(tx);
|
||||||
return (SET_ERROR(EINVAL));
|
return (SET_ERROR(EINVAL));
|
||||||
|
@ -690,9 +690,10 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
|
|||||||
dnode_setdirty(dn, tx);
|
dnode_setdirty(dn, tx);
|
||||||
if (dn->dn_datablksz != blocksize) {
|
if (dn->dn_datablksz != blocksize) {
|
||||||
/* change blocksize */
|
/* change blocksize */
|
||||||
ASSERT(dn->dn_maxblkid == 0 &&
|
ASSERT0(dn->dn_maxblkid);
|
||||||
(BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
|
ASSERT(BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
|
||||||
dnode_block_freed(dn, 0)));
|
dnode_block_freed(dn, 0));
|
||||||
|
|
||||||
dnode_setdblksz(dn, blocksize);
|
dnode_setdblksz(dn, blocksize);
|
||||||
dn->dn_next_blksz[tx->tx_txg & TXG_MASK] = blocksize;
|
dn->dn_next_blksz[tx->tx_txg & TXG_MASK] = blocksize;
|
||||||
}
|
}
|
||||||
@ -713,6 +714,7 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
|
|||||||
dbuf_rm_spill(dn, tx);
|
dbuf_rm_spill(dn, tx);
|
||||||
dnode_rm_spill(dn, tx);
|
dnode_rm_spill(dn, tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
rw_exit(&dn->dn_struct_rwlock);
|
rw_exit(&dn->dn_struct_rwlock);
|
||||||
|
|
||||||
/* change type */
|
/* change type */
|
||||||
|
Loading…
Reference in New Issue
Block a user