mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Fix gcc c90 compliance warnings
Fix non-c90 compliant code, for the most part these changes simply deal with where a particular variable is declared. Under c90 it must alway be done at the very start of a block. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -85,11 +85,13 @@ parent_delta(dsl_dataset_t *ds, int64_t delta)
|
||||
void
|
||||
dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx)
|
||||
{
|
||||
int used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
int compressed = BP_GET_PSIZE(bp);
|
||||
int uncompressed = BP_GET_UCSIZE(bp);
|
||||
int used, compressed, uncompressed;
|
||||
int64_t delta;
|
||||
|
||||
used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
compressed = BP_GET_PSIZE(bp);
|
||||
uncompressed = BP_GET_UCSIZE(bp);
|
||||
|
||||
dprintf_bp(bp, "ds=%p", ds);
|
||||
|
||||
ASSERT(dmu_tx_is_syncing(tx));
|
||||
@@ -130,15 +132,17 @@ int
|
||||
dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
|
||||
boolean_t async)
|
||||
{
|
||||
int used, compressed, uncompressed;
|
||||
|
||||
if (BP_IS_HOLE(bp))
|
||||
return (0);
|
||||
|
||||
ASSERT(dmu_tx_is_syncing(tx));
|
||||
ASSERT(bp->blk_birth <= tx->tx_txg);
|
||||
|
||||
int used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
int compressed = BP_GET_PSIZE(bp);
|
||||
int uncompressed = BP_GET_UCSIZE(bp);
|
||||
used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
compressed = BP_GET_PSIZE(bp);
|
||||
uncompressed = BP_GET_UCSIZE(bp);
|
||||
|
||||
ASSERT(used > 0);
|
||||
if (ds == NULL) {
|
||||
@@ -1772,6 +1776,7 @@ dsl_dataset_destroy_sync(void *arg1, void *tag, dmu_tx_t *tx)
|
||||
|
||||
if (dsl_dataset_is_snapshot(ds_next)) {
|
||||
dsl_dataset_t *ds_nextnext;
|
||||
dsl_dataset_t *hds;
|
||||
|
||||
/*
|
||||
* Update next's unique to include blocks which
|
||||
@@ -1794,7 +1799,6 @@ dsl_dataset_destroy_sync(void *arg1, void *tag, dmu_tx_t *tx)
|
||||
ASSERT3P(ds_next->ds_prev, ==, NULL);
|
||||
|
||||
/* Collapse range in this head. */
|
||||
dsl_dataset_t *hds;
|
||||
VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
|
||||
ds->ds_dir->dd_phys->dd_head_dataset_obj,
|
||||
FTAG, &hds));
|
||||
|
||||
Reference in New Issue
Block a user