xfs_btree.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it would be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write the Free Software Foundation,
  16. * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef __XFS_BTREE_H__
  19. #define __XFS_BTREE_H__
  20. struct xfs_buf;
  21. struct xfs_bmap_free;
  22. struct xfs_inode;
  23. struct xfs_mount;
  24. struct xfs_trans;
  25. extern kmem_zone_t *xfs_btree_cur_zone;
  26. /*
  27. * Generic key, ptr and record wrapper structures.
  28. *
  29. * These are disk format structures, and are converted where necessary
  30. * by the btree specific code that needs to interpret them.
  31. */
  32. union xfs_btree_ptr {
  33. __be32 s; /* short form ptr */
  34. __be64 l; /* long form ptr */
  35. };
  36. union xfs_btree_key {
  37. xfs_bmbt_key_t bmbt;
  38. xfs_bmdr_key_t bmbr; /* bmbt root block */
  39. xfs_alloc_key_t alloc;
  40. xfs_inobt_key_t inobt;
  41. };
  42. /*
  43. * In-core key that holds both low and high keys for overlapped btrees.
  44. * The two keys are packed next to each other on disk, so do the same
  45. * in memory. Preserve the existing xfs_btree_key as a single key to
  46. * avoid the mental model breakage that would happen if we passed a
  47. * bigkey into a function that operates on a single key.
  48. */
  49. union xfs_btree_bigkey {
  50. struct xfs_bmbt_key bmbt;
  51. xfs_bmdr_key_t bmbr; /* bmbt root block */
  52. xfs_alloc_key_t alloc;
  53. struct xfs_inobt_key inobt;
  54. };
  55. union xfs_btree_rec {
  56. xfs_bmbt_rec_t bmbt;
  57. xfs_bmdr_rec_t bmbr; /* bmbt root block */
  58. xfs_alloc_rec_t alloc;
  59. xfs_inobt_rec_t inobt;
  60. };
  61. /*
  62. * This nonsense is to make -wlint happy.
  63. */
  64. #define XFS_LOOKUP_EQ ((xfs_lookup_t)XFS_LOOKUP_EQi)
  65. #define XFS_LOOKUP_LE ((xfs_lookup_t)XFS_LOOKUP_LEi)
  66. #define XFS_LOOKUP_GE ((xfs_lookup_t)XFS_LOOKUP_GEi)
  67. #define XFS_BTNUM_BNO ((xfs_btnum_t)XFS_BTNUM_BNOi)
  68. #define XFS_BTNUM_CNT ((xfs_btnum_t)XFS_BTNUM_CNTi)
  69. #define XFS_BTNUM_BMAP ((xfs_btnum_t)XFS_BTNUM_BMAPi)
  70. #define XFS_BTNUM_INO ((xfs_btnum_t)XFS_BTNUM_INOi)
  71. #define XFS_BTNUM_FINO ((xfs_btnum_t)XFS_BTNUM_FINOi)
  72. /*
  73. * For logging record fields.
  74. */
  75. #define XFS_BB_MAGIC (1 << 0)
  76. #define XFS_BB_LEVEL (1 << 1)
  77. #define XFS_BB_NUMRECS (1 << 2)
  78. #define XFS_BB_LEFTSIB (1 << 3)
  79. #define XFS_BB_RIGHTSIB (1 << 4)
  80. #define XFS_BB_BLKNO (1 << 5)
  81. #define XFS_BB_LSN (1 << 6)
  82. #define XFS_BB_UUID (1 << 7)
  83. #define XFS_BB_OWNER (1 << 8)
  84. #define XFS_BB_NUM_BITS 5
  85. #define XFS_BB_ALL_BITS ((1 << XFS_BB_NUM_BITS) - 1)
  86. #define XFS_BB_NUM_BITS_CRC 9
  87. #define XFS_BB_ALL_BITS_CRC ((1 << XFS_BB_NUM_BITS_CRC) - 1)
  88. /*
  89. * Generic stats interface
  90. */
  91. #define __XFS_BTREE_STATS_INC(mp, type, stat) \
  92. XFS_STATS_INC(mp, xs_ ## type ## _2_ ## stat)
  93. #define XFS_BTREE_STATS_INC(cur, stat) \
  94. do { \
  95. struct xfs_mount *__mp = cur->bc_mp; \
  96. switch (cur->bc_btnum) { \
  97. case XFS_BTNUM_BNO: __XFS_BTREE_STATS_INC(__mp, abtb, stat); break; \
  98. case XFS_BTNUM_CNT: __XFS_BTREE_STATS_INC(__mp, abtc, stat); break; \
  99. case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_INC(__mp, bmbt, stat); break; \
  100. case XFS_BTNUM_INO: __XFS_BTREE_STATS_INC(__mp, ibt, stat); break; \
  101. case XFS_BTNUM_FINO: __XFS_BTREE_STATS_INC(__mp, fibt, stat); break; \
  102. case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \
  103. } \
  104. } while (0)
  105. #define __XFS_BTREE_STATS_ADD(mp, type, stat, val) \
  106. XFS_STATS_ADD(mp, xs_ ## type ## _2_ ## stat, val)
  107. #define XFS_BTREE_STATS_ADD(cur, stat, val) \
  108. do { \
  109. struct xfs_mount *__mp = cur->bc_mp; \
  110. switch (cur->bc_btnum) { \
  111. case XFS_BTNUM_BNO: \
  112. __XFS_BTREE_STATS_ADD(__mp, abtb, stat, val); break; \
  113. case XFS_BTNUM_CNT: \
  114. __XFS_BTREE_STATS_ADD(__mp, abtc, stat, val); break; \
  115. case XFS_BTNUM_BMAP: \
  116. __XFS_BTREE_STATS_ADD(__mp, bmbt, stat, val); break; \
  117. case XFS_BTNUM_INO: \
  118. __XFS_BTREE_STATS_ADD(__mp, ibt, stat, val); break; \
  119. case XFS_BTNUM_FINO: \
  120. __XFS_BTREE_STATS_ADD(__mp, fibt, stat, val); break; \
  121. case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \
  122. } \
  123. } while (0)
  124. #define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */
  125. struct xfs_btree_ops {
  126. /* size of the key and record structures */
  127. size_t key_len;
  128. size_t rec_len;
  129. /* cursor operations */
  130. struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *);
  131. void (*update_cursor)(struct xfs_btree_cur *src,
  132. struct xfs_btree_cur *dst);
  133. /* update btree root pointer */
  134. void (*set_root)(struct xfs_btree_cur *cur,
  135. union xfs_btree_ptr *nptr, int level_change);
  136. /* block allocation / freeing */
  137. int (*alloc_block)(struct xfs_btree_cur *cur,
  138. union xfs_btree_ptr *start_bno,
  139. union xfs_btree_ptr *new_bno,
  140. int *stat);
  141. int (*free_block)(struct xfs_btree_cur *cur, struct xfs_buf *bp);
  142. /* update last record information */
  143. void (*update_lastrec)(struct xfs_btree_cur *cur,
  144. struct xfs_btree_block *block,
  145. union xfs_btree_rec *rec,
  146. int ptr, int reason);
  147. /* records in block/level */
  148. int (*get_minrecs)(struct xfs_btree_cur *cur, int level);
  149. int (*get_maxrecs)(struct xfs_btree_cur *cur, int level);
  150. /* records on disk. Matter for the root in inode case. */
  151. int (*get_dmaxrecs)(struct xfs_btree_cur *cur, int level);
  152. /* init values of btree structures */
  153. void (*init_key_from_rec)(union xfs_btree_key *key,
  154. union xfs_btree_rec *rec);
  155. void (*init_rec_from_cur)(struct xfs_btree_cur *cur,
  156. union xfs_btree_rec *rec);
  157. void (*init_ptr_from_cur)(struct xfs_btree_cur *cur,
  158. union xfs_btree_ptr *ptr);
  159. void (*init_high_key_from_rec)(union xfs_btree_key *key,
  160. union xfs_btree_rec *rec);
  161. /* difference between key value and cursor value */
  162. __int64_t (*key_diff)(struct xfs_btree_cur *cur,
  163. union xfs_btree_key *key);
  164. /*
  165. * Difference between key2 and key1 -- positive if key1 > key2,
  166. * negative if key1 < key2, and zero if equal.
  167. */
  168. __int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
  169. union xfs_btree_key *key1,
  170. union xfs_btree_key *key2);
  171. const struct xfs_buf_ops *buf_ops;
  172. #if defined(DEBUG) || defined(XFS_WARN)
  173. /* check that k1 is lower than k2 */
  174. int (*keys_inorder)(struct xfs_btree_cur *cur,
  175. union xfs_btree_key *k1,
  176. union xfs_btree_key *k2);
  177. /* check that r1 is lower than r2 */
  178. int (*recs_inorder)(struct xfs_btree_cur *cur,
  179. union xfs_btree_rec *r1,
  180. union xfs_btree_rec *r2);
  181. #endif
  182. /* derive the low & high keys from the records in a leaf block */
  183. void (*get_leaf_keys)(struct xfs_btree_cur *cur,
  184. struct xfs_btree_block *block,
  185. union xfs_btree_key *key);
  186. /* derive the low & high keys from the keys in a node block */
  187. void (*get_node_keys)(struct xfs_btree_cur *cur,
  188. struct xfs_btree_block *block,
  189. union xfs_btree_key *key);
  190. /* update the parent keys of given btree level */
  191. int (*update_keys)(struct xfs_btree_cur *cur, int level);
  192. };
  193. /*
  194. * Reasons for the update_lastrec method to be called.
  195. */
  196. #define LASTREC_UPDATE 0
  197. #define LASTREC_INSREC 1
  198. #define LASTREC_DELREC 2
  199. /*
  200. * Btree cursor structure.
  201. * This collects all information needed by the btree code in one place.
  202. */
  203. typedef struct xfs_btree_cur
  204. {
  205. struct xfs_trans *bc_tp; /* transaction we're in, if any */
  206. struct xfs_mount *bc_mp; /* file system mount struct */
  207. const struct xfs_btree_ops *bc_ops;
  208. uint bc_flags; /* btree features - below */
  209. union {
  210. xfs_alloc_rec_incore_t a;
  211. xfs_bmbt_irec_t b;
  212. xfs_inobt_rec_incore_t i;
  213. } bc_rec; /* current insert/search record value */
  214. struct xfs_buf *bc_bufs[XFS_BTREE_MAXLEVELS]; /* buf ptr per level */
  215. int bc_ptrs[XFS_BTREE_MAXLEVELS]; /* key/record # */
  216. __uint8_t bc_ra[XFS_BTREE_MAXLEVELS]; /* readahead bits */
  217. #define XFS_BTCUR_LEFTRA 1 /* left sibling has been read-ahead */
  218. #define XFS_BTCUR_RIGHTRA 2 /* right sibling has been read-ahead */
  219. __uint8_t bc_nlevels; /* number of levels in the tree */
  220. __uint8_t bc_blocklog; /* log2(blocksize) of btree blocks */
  221. xfs_btnum_t bc_btnum; /* identifies which btree type */
  222. union {
  223. struct { /* needed for BNO, CNT, INO */
  224. struct xfs_buf *agbp; /* agf/agi buffer pointer */
  225. xfs_agnumber_t agno; /* ag number */
  226. } a;
  227. struct { /* needed for BMAP */
  228. struct xfs_inode *ip; /* pointer to our inode */
  229. struct xfs_bmap_free *flist; /* list to free after */
  230. xfs_fsblock_t firstblock; /* 1st blk allocated */
  231. int allocated; /* count of alloced */
  232. short forksize; /* fork's inode space */
  233. char whichfork; /* data or attr fork */
  234. char flags; /* flags */
  235. #define XFS_BTCUR_BPRV_WASDEL 1 /* was delayed */
  236. } b;
  237. } bc_private; /* per-btree type data */
  238. } xfs_btree_cur_t;
  239. /* cursor flags */
  240. #define XFS_BTREE_LONG_PTRS (1<<0) /* pointers are 64bits long */
  241. #define XFS_BTREE_ROOT_IN_INODE (1<<1) /* root may be variable size */
  242. #define XFS_BTREE_LASTREC_UPDATE (1<<2) /* track last rec externally */
  243. #define XFS_BTREE_CRC_BLOCKS (1<<3) /* uses extended btree blocks */
  244. #define XFS_BTREE_OVERLAPPING (1<<4) /* overlapping intervals */
  245. #define XFS_BTREE_NOERROR 0
  246. #define XFS_BTREE_ERROR 1
  247. /*
  248. * Convert from buffer to btree block header.
  249. */
  250. #define XFS_BUF_TO_BLOCK(bp) ((struct xfs_btree_block *)((bp)->b_addr))
  251. /*
  252. * Check that block header is ok.
  253. */
  254. int
  255. xfs_btree_check_block(
  256. struct xfs_btree_cur *cur, /* btree cursor */
  257. struct xfs_btree_block *block, /* generic btree block pointer */
  258. int level, /* level of the btree block */
  259. struct xfs_buf *bp); /* buffer containing block, if any */
  260. /*
  261. * Check that (long) pointer is ok.
  262. */
  263. int /* error (0 or EFSCORRUPTED) */
  264. xfs_btree_check_lptr(
  265. struct xfs_btree_cur *cur, /* btree cursor */
  266. xfs_fsblock_t ptr, /* btree block disk address */
  267. int level); /* btree block level */
  268. /*
  269. * Delete the btree cursor.
  270. */
  271. void
  272. xfs_btree_del_cursor(
  273. xfs_btree_cur_t *cur, /* btree cursor */
  274. int error); /* del because of error */
  275. /*
  276. * Duplicate the btree cursor.
  277. * Allocate a new one, copy the record, re-get the buffers.
  278. */
  279. int /* error */
  280. xfs_btree_dup_cursor(
  281. xfs_btree_cur_t *cur, /* input cursor */
  282. xfs_btree_cur_t **ncur);/* output cursor */
  283. /*
  284. * Get a buffer for the block, return it with no data read.
  285. * Long-form addressing.
  286. */
  287. struct xfs_buf * /* buffer for fsbno */
  288. xfs_btree_get_bufl(
  289. struct xfs_mount *mp, /* file system mount point */
  290. struct xfs_trans *tp, /* transaction pointer */
  291. xfs_fsblock_t fsbno, /* file system block number */
  292. uint lock); /* lock flags for get_buf */
  293. /*
  294. * Get a buffer for the block, return it with no data read.
  295. * Short-form addressing.
  296. */
  297. struct xfs_buf * /* buffer for agno/agbno */
  298. xfs_btree_get_bufs(
  299. struct xfs_mount *mp, /* file system mount point */
  300. struct xfs_trans *tp, /* transaction pointer */
  301. xfs_agnumber_t agno, /* allocation group number */
  302. xfs_agblock_t agbno, /* allocation group block number */
  303. uint lock); /* lock flags for get_buf */
  304. /*
  305. * Check for the cursor referring to the last block at the given level.
  306. */
  307. int /* 1=is last block, 0=not last block */
  308. xfs_btree_islastblock(
  309. xfs_btree_cur_t *cur, /* btree cursor */
  310. int level); /* level to check */
  311. /*
  312. * Compute first and last byte offsets for the fields given.
  313. * Interprets the offsets table, which contains struct field offsets.
  314. */
  315. void
  316. xfs_btree_offsets(
  317. __int64_t fields, /* bitmask of fields */
  318. const short *offsets,/* table of field offsets */
  319. int nbits, /* number of bits to inspect */
  320. int *first, /* output: first byte offset */
  321. int *last); /* output: last byte offset */
  322. /*
  323. * Get a buffer for the block, return it read in.
  324. * Long-form addressing.
  325. */
  326. int /* error */
  327. xfs_btree_read_bufl(
  328. struct xfs_mount *mp, /* file system mount point */
  329. struct xfs_trans *tp, /* transaction pointer */
  330. xfs_fsblock_t fsbno, /* file system block number */
  331. uint lock, /* lock flags for read_buf */
  332. struct xfs_buf **bpp, /* buffer for fsbno */
  333. int refval, /* ref count value for buffer */
  334. const struct xfs_buf_ops *ops);
  335. /*
  336. * Read-ahead the block, don't wait for it, don't return a buffer.
  337. * Long-form addressing.
  338. */
  339. void /* error */
  340. xfs_btree_reada_bufl(
  341. struct xfs_mount *mp, /* file system mount point */
  342. xfs_fsblock_t fsbno, /* file system block number */
  343. xfs_extlen_t count, /* count of filesystem blocks */
  344. const struct xfs_buf_ops *ops);
  345. /*
  346. * Read-ahead the block, don't wait for it, don't return a buffer.
  347. * Short-form addressing.
  348. */
  349. void /* error */
  350. xfs_btree_reada_bufs(
  351. struct xfs_mount *mp, /* file system mount point */
  352. xfs_agnumber_t agno, /* allocation group number */
  353. xfs_agblock_t agbno, /* allocation group block number */
  354. xfs_extlen_t count, /* count of filesystem blocks */
  355. const struct xfs_buf_ops *ops);
  356. /*
  357. * Initialise a new btree block header
  358. */
  359. void
  360. xfs_btree_init_block(
  361. struct xfs_mount *mp,
  362. struct xfs_buf *bp,
  363. __u32 magic,
  364. __u16 level,
  365. __u16 numrecs,
  366. __u64 owner,
  367. unsigned int flags);
  368. void
  369. xfs_btree_init_block_int(
  370. struct xfs_mount *mp,
  371. struct xfs_btree_block *buf,
  372. xfs_daddr_t blkno,
  373. __u32 magic,
  374. __u16 level,
  375. __u16 numrecs,
  376. __u64 owner,
  377. unsigned int flags);
  378. /*
  379. * Common btree core entry points.
  380. */
  381. int xfs_btree_increment(struct xfs_btree_cur *, int, int *);
  382. int xfs_btree_decrement(struct xfs_btree_cur *, int, int *);
  383. int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *);
  384. int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *);
  385. int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
  386. int xfs_btree_insert(struct xfs_btree_cur *, int *);
  387. int xfs_btree_delete(struct xfs_btree_cur *, int *);
  388. int xfs_btree_get_rec(struct xfs_btree_cur *, union xfs_btree_rec **, int *);
  389. int xfs_btree_change_owner(struct xfs_btree_cur *cur, __uint64_t new_owner,
  390. struct list_head *buffer_list);
  391. /*
  392. * btree block CRC helpers
  393. */
  394. void xfs_btree_lblock_calc_crc(struct xfs_buf *);
  395. bool xfs_btree_lblock_verify_crc(struct xfs_buf *);
  396. void xfs_btree_sblock_calc_crc(struct xfs_buf *);
  397. bool xfs_btree_sblock_verify_crc(struct xfs_buf *);
  398. /*
  399. * Internal btree helpers also used by xfs_bmap.c.
  400. */
  401. void xfs_btree_log_block(struct xfs_btree_cur *, struct xfs_buf *, int);
  402. void xfs_btree_log_recs(struct xfs_btree_cur *, struct xfs_buf *, int, int);
  403. /*
  404. * Helpers.
  405. */
  406. static inline int xfs_btree_get_numrecs(struct xfs_btree_block *block)
  407. {
  408. return be16_to_cpu(block->bb_numrecs);
  409. }
  410. static inline void xfs_btree_set_numrecs(struct xfs_btree_block *block,
  411. __uint16_t numrecs)
  412. {
  413. block->bb_numrecs = cpu_to_be16(numrecs);
  414. }
  415. static inline int xfs_btree_get_level(struct xfs_btree_block *block)
  416. {
  417. return be16_to_cpu(block->bb_level);
  418. }
  419. /*
  420. * Min and max functions for extlen, agblock, fileoff, and filblks types.
  421. */
  422. #define XFS_EXTLEN_MIN(a,b) min_t(xfs_extlen_t, (a), (b))
  423. #define XFS_EXTLEN_MAX(a,b) max_t(xfs_extlen_t, (a), (b))
  424. #define XFS_AGBLOCK_MIN(a,b) min_t(xfs_agblock_t, (a), (b))
  425. #define XFS_AGBLOCK_MAX(a,b) max_t(xfs_agblock_t, (a), (b))
  426. #define XFS_FILEOFF_MIN(a,b) min_t(xfs_fileoff_t, (a), (b))
  427. #define XFS_FILEOFF_MAX(a,b) max_t(xfs_fileoff_t, (a), (b))
  428. #define XFS_FILBLKS_MIN(a,b) min_t(xfs_filblks_t, (a), (b))
  429. #define XFS_FILBLKS_MAX(a,b) max_t(xfs_filblks_t, (a), (b))
  430. #define XFS_FSB_SANITY_CHECK(mp,fsb) \
  431. (XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \
  432. XFS_FSB_TO_AGBNO(mp, fsb) < mp->m_sb.sb_agblocks)
  433. /*
  434. * Trace hooks. Currently not implemented as they need to be ported
  435. * over to the generic tracing functionality, which is some effort.
  436. *
  437. * i,j = integer (32 bit)
  438. * b = btree block buffer (xfs_buf_t)
  439. * p = btree ptr
  440. * r = btree record
  441. * k = btree key
  442. */
  443. #define XFS_BTREE_TRACE_ARGBI(c, b, i)
  444. #define XFS_BTREE_TRACE_ARGBII(c, b, i, j)
  445. #define XFS_BTREE_TRACE_ARGI(c, i)
  446. #define XFS_BTREE_TRACE_ARGIPK(c, i, p, s)
  447. #define XFS_BTREE_TRACE_ARGIPR(c, i, p, r)
  448. #define XFS_BTREE_TRACE_ARGIK(c, i, k)
  449. #define XFS_BTREE_TRACE_ARGR(c, r)
  450. #define XFS_BTREE_TRACE_CURSOR(c, t)
  451. bool xfs_btree_sblock_v5hdr_verify(struct xfs_buf *bp);
  452. bool xfs_btree_sblock_verify(struct xfs_buf *bp, unsigned int max_recs);
  453. uint xfs_btree_compute_maxlevels(struct xfs_mount *mp, uint *limits,
  454. unsigned long len);
  455. void xfs_btree_get_leaf_keys(struct xfs_btree_cur *cur,
  456. struct xfs_btree_block *block, union xfs_btree_key *key);
  457. void xfs_btree_get_node_keys(struct xfs_btree_cur *cur,
  458. struct xfs_btree_block *block, union xfs_btree_key *key);
  459. int xfs_btree_update_keys(struct xfs_btree_cur *cur, int level);
  460. void xfs_btree_get_leaf_keys_overlapped(struct xfs_btree_cur *cur,
  461. struct xfs_btree_block *block, union xfs_btree_key *key);
  462. void xfs_btree_get_node_keys_overlapped(struct xfs_btree_cur *cur,
  463. struct xfs_btree_block *block, union xfs_btree_key *key);
  464. int xfs_btree_update_keys_overlapped(struct xfs_btree_cur *cur, int level);
  465. #endif /* __XFS_BTREE_H__ */