mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Illumos #3104: eliminate empty bpobjs
3104 eliminate empty bpobjs Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Christopher Siden <chris.siden@delphix.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Eric Schrock <eric.schrock@delphix.com> References: illumos/illumos-gate@f174573681 illumos changeset: 13782:8f78aae28a63 https://www.illumos.org/issues/3104 Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
91579709fc
commit
753c38392d
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_BPOBJ_H
|
||||
@@ -67,7 +68,9 @@ typedef struct bpobj {
|
||||
typedef int bpobj_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx);
|
||||
|
||||
uint64_t bpobj_alloc(objset_t *mos, int blocksize, dmu_tx_t *tx);
|
||||
uint64_t bpobj_alloc_empty(objset_t *os, int blocksize, dmu_tx_t *tx);
|
||||
void bpobj_free(objset_t *os, uint64_t obj, dmu_tx_t *tx);
|
||||
void bpobj_decr_empty(objset_t *os, dmu_tx_t *tx);
|
||||
|
||||
int bpobj_open(bpobj_t *bpo, objset_t *mos, uint64_t object);
|
||||
void bpobj_close(bpobj_t *bpo);
|
||||
|
||||
@@ -309,6 +309,7 @@ typedef void dmu_buf_evict_func_t(struct dmu_buf *db, void *user_ptr);
|
||||
#define DMU_POOL_SCAN "scan"
|
||||
#define DMU_POOL_FREE_BPOBJ "free_bpobj"
|
||||
#define DMU_POOL_BPTREE_OBJ "bptree_obj"
|
||||
#define DMU_POOL_EMPTY_BPOBJ "empty_bpobj"
|
||||
|
||||
/*
|
||||
* Allocate an object from this objset. The range of object numbers
|
||||
|
||||
@@ -96,6 +96,7 @@ typedef struct dsl_pool {
|
||||
uint64_t dp_tmp_userrefs_obj;
|
||||
bpobj_t dp_free_bpobj;
|
||||
uint64_t dp_bptree_obj;
|
||||
uint64_t dp_empty_bpobj;
|
||||
|
||||
struct dsl_scan *dp_scan;
|
||||
|
||||
|
||||
@@ -300,6 +300,8 @@ int zap_increment_int(objset_t *os, uint64_t obj, uint64_t key, int64_t delta,
|
||||
/* Here the key is an int and the value is a different int. */
|
||||
int zap_add_int_key(objset_t *os, uint64_t obj,
|
||||
uint64_t key, uint64_t value, dmu_tx_t *tx);
|
||||
int zap_update_int_key(objset_t *os, uint64_t obj,
|
||||
uint64_t key, uint64_t value, dmu_tx_t *tx);
|
||||
int zap_lookup_int_key(objset_t *os, uint64_t obj,
|
||||
uint64_t key, uint64_t *valuep);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user