mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-06 12:06:26 +00:00
Promote userspace btree block initialization
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
#include "leaf_item_hash.h"
|
#include "leaf_item_hash.h"
|
||||||
#include "btree.h"
|
#include "btree.h"
|
||||||
|
|
||||||
static void init_block(struct scoutfs_btree_block *bt, int level)
|
void btree_init_block(struct scoutfs_btree_block *bt, int level)
|
||||||
{
|
{
|
||||||
int free;
|
int free;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ void btree_init_root_single(struct scoutfs_btree_root *root,
|
|||||||
|
|
||||||
memset(bt, 0, SCOUTFS_BLOCK_LG_SIZE);
|
memset(bt, 0, SCOUTFS_BLOCK_LG_SIZE);
|
||||||
|
|
||||||
init_block(bt, 0);
|
btree_init_block(bt, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *alloc_val(struct scoutfs_btree_block *bt, int len)
|
static void *alloc_val(struct scoutfs_btree_block *bt, int len)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef _BTREE_H_
|
#ifndef _BTREE_H_
|
||||||
#define _BTREE_H_
|
#define _BTREE_H_
|
||||||
|
|
||||||
|
void btree_init_block(struct scoutfs_btree_block *bt, int level);
|
||||||
void btree_init_root_single(struct scoutfs_btree_root *root,
|
void btree_init_root_single(struct scoutfs_btree_root *root,
|
||||||
struct scoutfs_btree_block *bt,
|
struct scoutfs_btree_block *bt,
|
||||||
u64 seq, u64 blkno);
|
u64 seq, u64 blkno);
|
||||||
|
|||||||
Reference in New Issue
Block a user