equal
deleted
inserted
replaced
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 /* |
21 /* |
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. |
23 * Use is subject to license terms. |
24 */ |
24 */ |
25 |
25 |
26 #ifndef _SYS_DNODE_H |
26 #ifndef _SYS_DNODE_H |
27 #define _SYS_DNODE_H |
27 #define _SYS_DNODE_H |
39 #ifdef __cplusplus |
39 #ifdef __cplusplus |
40 extern "C" { |
40 extern "C" { |
41 #endif |
41 #endif |
42 |
42 |
43 /* |
43 /* |
44 * Flags. |
44 * dnode_hold() flags. |
45 */ |
45 */ |
46 #define DNODE_MUST_BE_ALLOCATED 1 |
46 #define DNODE_MUST_BE_ALLOCATED 1 |
47 #define DNODE_MUST_BE_FREE 2 |
47 #define DNODE_MUST_BE_FREE 2 |
|
48 |
|
49 /* |
|
50 * dnode_next_offset() flags. |
|
51 */ |
|
52 #define DNODE_FIND_HOLE 1 |
|
53 #define DNODE_FIND_BACKWARDS 2 |
|
54 #define DNODE_FIND_HAVELOCK 4 |
48 |
55 |
49 /* |
56 /* |
50 * Fixed constants. |
57 * Fixed constants. |
51 */ |
58 */ |
52 #define DNODE_SHIFT 9 /* 512 bytes */ |
59 #define DNODE_SHIFT 9 /* 512 bytes */ |
225 void dnode_willuse_space(dnode_t *dn, int64_t space, dmu_tx_t *tx); |
232 void dnode_willuse_space(dnode_t *dn, int64_t space, dmu_tx_t *tx); |
226 void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx); |
233 void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx); |
227 uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid); |
234 uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid); |
228 void dnode_init(void); |
235 void dnode_init(void); |
229 void dnode_fini(void); |
236 void dnode_fini(void); |
230 int dnode_next_offset(dnode_t *dn, boolean_t hole, uint64_t *off, int minlvl, |
237 int dnode_next_offset(dnode_t *dn, int flags, uint64_t *off, |
231 uint64_t blkfill, uint64_t txg); |
238 int minlvl, uint64_t blkfill, uint64_t txg); |
232 void dnode_evict_dbufs(dnode_t *dn); |
239 void dnode_evict_dbufs(dnode_t *dn); |
233 |
240 |
234 #ifdef ZFS_DEBUG |
241 #ifdef ZFS_DEBUG |
235 |
242 |
236 /* |
243 /* |