Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 213440
Collapse All | Expand All

(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzfscommon/include/sys/dbuf.h (-3 / +3 lines)
Lines 216-233 Link Here
216
dmu_buf_impl_t *dbuf_create_tlib(struct dnode *dn, char *data);
216
dmu_buf_impl_t *dbuf_create_tlib(struct dnode *dn, char *data);
217
dmu_buf_impl_t *dbuf_create_bonus(struct dnode *dn);
217
dmu_buf_impl_t *dbuf_create_bonus(struct dnode *dn);
218
218
219
dmu_buf_impl_t *dbuf_hold(struct dnode *dn, uint64_t blkid, void *tag);
219
dmu_buf_impl_t *dbuf_hold(struct dnode *dn, uint64_t blkid, const void *tag);
220
dmu_buf_impl_t *dbuf_hold_level(struct dnode *dn, int level, uint64_t blkid,
220
dmu_buf_impl_t *dbuf_hold_level(struct dnode *dn, int level, uint64_t blkid,
221
    void *tag);
221
    void *tag);
222
int dbuf_hold_impl(struct dnode *dn, uint8_t level, uint64_t blkid, int create,
222
int dbuf_hold_impl(struct dnode *dn, uint8_t level, uint64_t blkid, int create,
223
    void *tag, dmu_buf_impl_t **dbp);
223
    const void *tag, dmu_buf_impl_t **dbp);
224
224
225
void dbuf_prefetch(struct dnode *dn, uint64_t blkid);
225
void dbuf_prefetch(struct dnode *dn, uint64_t blkid);
226
226
227
void dbuf_add_ref(dmu_buf_impl_t *db, void *tag);
227
void dbuf_add_ref(dmu_buf_impl_t *db, void *tag);
228
uint64_t dbuf_refcount(dmu_buf_impl_t *db);
228
uint64_t dbuf_refcount(dmu_buf_impl_t *db);
229
229
230
void dbuf_rele(dmu_buf_impl_t *db, void *tag);
230
void dbuf_rele(dmu_buf_impl_t *db, const void *tag);
231
231
232
dmu_buf_impl_t *dbuf_find(struct dnode *dn, uint8_t level, uint64_t blkid);
232
dmu_buf_impl_t *dbuf_find(struct dnode *dn, uint8_t level, uint64_t blkid);
233
233
(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzfscommon/include/sys/dmu.h (-2 / +2 lines)
Lines 326-333 Link Here
326
 * individually with dmu_buf_rele.
326
 * individually with dmu_buf_rele.
327
 */
327
 */
328
int dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
328
int dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
329
    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp);
329
    uint64_t length, int read, const void *tag, int *numbufsp, dmu_buf_t ***dbpp);
330
void dmu_buf_rele_array(dmu_buf_t **, int numbufs, void *tag);
330
void dmu_buf_rele_array(dmu_buf_t **, int numbufs, const void *tag);
331
331
332
/*
332
/*
333
 * Returns NULL on success, or the existing user ptr if it's already
333
 * Returns NULL on success, or the existing user ptr if it's already
(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzfscommon/include/sys/refcount.h (-5 / +5 lines)
Lines 46-52 Link Here
46
#if defined(DEBUG) || !defined(_KERNEL)
46
#if defined(DEBUG) || !defined(_KERNEL)
47
typedef struct reference {
47
typedef struct reference {
48
	list_node_t ref_link;
48
	list_node_t ref_link;
49
	void *ref_holder;
49
	const void *ref_holder;
50
	uint64_t ref_number;
50
	uint64_t ref_number;
51
	uint8_t *ref_removed;
51
	uint8_t *ref_removed;
52
} reference_t;
52
} reference_t;
Lines 66-75 Link Here
66
void refcount_destroy_many(refcount_t *rc, uint64_t number);
66
void refcount_destroy_many(refcount_t *rc, uint64_t number);
67
int refcount_is_zero(refcount_t *rc);
67
int refcount_is_zero(refcount_t *rc);
68
int64_t refcount_count(refcount_t *rc);
68
int64_t refcount_count(refcount_t *rc);
69
int64_t refcount_add(refcount_t *rc, void *holder_tag);
69
int64_t refcount_add(refcount_t *rc, const const void *holder_tag);
70
int64_t refcount_remove(refcount_t *rc, void *holder_tag);
70
int64_t refcount_remove(refcount_t *rc, const void *holder_tag);
71
int64_t refcount_add_many(refcount_t *rc, uint64_t number, void *holder_tag);
71
int64_t refcount_add_many(refcount_t *rc, uint64_t number, const void *holder_tag);
72
int64_t refcount_remove_many(refcount_t *rc, uint64_t number, void *holder_tag);
72
int64_t refcount_remove_many(refcount_t *rc, uint64_t number, const void *holder_tag);
73
73
74
void refcount_init(void);
74
void refcount_init(void);
75
void refcount_fini(void);
75
void refcount_fini(void);
(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzpool/dbuf.c (-3 / +3 lines)
Lines 1535-1541 Link Here
1535
 */
1535
 */
1536
int
1536
int
1537
dbuf_hold_impl(dnode_t *dn, uint8_t level, uint64_t blkid, int fail_sparse,
1537
dbuf_hold_impl(dnode_t *dn, uint8_t level, uint64_t blkid, int fail_sparse,
1538
    void *tag, dmu_buf_impl_t **dbp)
1538
    const void *tag, dmu_buf_impl_t **dbp)
1539
{
1539
{
1540
	dmu_buf_impl_t *db, *parent = NULL;
1540
	dmu_buf_impl_t *db, *parent = NULL;
1541
1541
Lines 1620-1626 Link Here
1620
}
1620
}
1621
1621
1622
dmu_buf_impl_t *
1622
dmu_buf_impl_t *
1623
dbuf_hold(dnode_t *dn, uint64_t blkid, void *tag)
1623
dbuf_hold(dnode_t *dn, uint64_t blkid, const void *tag)
1624
{
1624
{
1625
	dmu_buf_impl_t *db;
1625
	dmu_buf_impl_t *db;
1626
	int err = dbuf_hold_impl(dn, 0, blkid, FALSE, tag, &db);
1626
	int err = dbuf_hold_impl(dn, 0, blkid, FALSE, tag, &db);
Lines 1657-1663 Link Here
1657
1657
1658
#pragma weak dmu_buf_rele = dbuf_rele
1658
#pragma weak dmu_buf_rele = dbuf_rele
1659
void
1659
void
1660
dbuf_rele(dmu_buf_impl_t *db, void *tag)
1660
dbuf_rele(dmu_buf_impl_t *db, const void *tag)
1661
{
1661
{
1662
	int64_t holds;
1662
	int64_t holds;
1663
1663
(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzpool/dmu.c (-4 / +4 lines)
Lines 161-167 Link Here
161
 */
161
 */
162
static int
162
static int
163
dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
163
dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
164
    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
164
    uint64_t length, int read, const void *tag, int *numbufsp, dmu_buf_t ***dbpp)
165
{
165
{
166
	dmu_buf_t **dbp;
166
	dmu_buf_t **dbp;
167
	uint64_t blkid, nblks, i;
167
	uint64_t blkid, nblks, i;
Lines 238-244 Link Here
238
238
239
static int
239
static int
240
dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
240
dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
241
    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
241
    uint64_t length, int read, const void *tag, int *numbufsp, dmu_buf_t ***dbpp)
242
{
242
{
243
	dnode_t *dn;
243
	dnode_t *dn;
244
	int err;
244
	int err;
Lines 257-263 Link Here
257
257
258
int
258
int
259
dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
259
dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
260
    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
260
    uint64_t length, int read, const void *tag, int *numbufsp, dmu_buf_t ***dbpp)
261
{
261
{
262
	dnode_t *dn = ((dmu_buf_impl_t *)db)->db_dnode;
262
	dnode_t *dn = ((dmu_buf_impl_t *)db)->db_dnode;
263
	int err;
263
	int err;
Lines 269-275 Link Here
269
}
269
}
270
270
271
void
271
void
272
dmu_buf_rele_array(dmu_buf_t **dbp_fake, int numbufs, void *tag)
272
dmu_buf_rele_array(dmu_buf_t **dbp_fake, int numbufs, const void *tag)
273
{
273
{
274
	int i;
274
	int i;
275
	dmu_buf_impl_t **dbp = (dmu_buf_impl_t **)dbp_fake;
275
	dmu_buf_impl_t **dbp = (dmu_buf_impl_t **)dbp_fake;
(-)zfs-fuse-0.4.0_beta1.orig/src/lib/libzpool/refcount.c (-4 / +4 lines)
Lines 110-116 Link Here
110
}
110
}
111
111
112
int64_t
112
int64_t
113
refcount_add_many(refcount_t *rc, uint64_t number, void *holder)
113
refcount_add_many(refcount_t *rc, uint64_t number, const void *holder)
114
{
114
{
115
	reference_t *ref;
115
	reference_t *ref;
116
	int64_t count;
116
	int64_t count;
Lines 132-144 Link Here
132
}
132
}
133
133
134
int64_t
134
int64_t
135
refcount_add(refcount_t *rc, void *holder)
135
refcount_add(refcount_t *rc, const void *holder)
136
{
136
{
137
	return (refcount_add_many(rc, 1, holder));
137
	return (refcount_add_many(rc, 1, holder));
138
}
138
}
139
139
140
int64_t
140
int64_t
141
refcount_remove_many(refcount_t *rc, uint64_t number, void *holder)
141
refcount_remove_many(refcount_t *rc, uint64_t number, const void *holder)
142
{
142
{
143
	reference_t *ref;
143
	reference_t *ref;
144
	int64_t count;
144
	int64_t count;
Lines 186-192 Link Here
186
}
186
}
187
187
188
int64_t
188
int64_t
189
refcount_remove(refcount_t *rc, void *holder)
189
refcount_remove(refcount_t *rc, const void *holder)
190
{
190
{
191
	return (refcount_remove_many(rc, 1, holder));
191
	return (refcount_remove_many(rc, 1, holder));
192
}
192
}

Return to bug 213440