mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-20 14:16:49 +00:00
scoutfs: remove unused radix code
Remove the radix allocator that was added as we expermented with packed extent items. It didn't work out. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -31,7 +31,6 @@ scoutfs-y += \
|
||||
options.o \
|
||||
per_task.o \
|
||||
quorum.o \
|
||||
radix.o \
|
||||
scoutfs_trace.o \
|
||||
server.o \
|
||||
spbm.o \
|
||||
|
||||
@@ -147,24 +147,6 @@
|
||||
EXPAND_COUNTER(quorum_write_block) \
|
||||
EXPAND_COUNTER(quorum_write_block_error) \
|
||||
EXPAND_COUNTER(quorum_fenced) \
|
||||
EXPAND_COUNTER(radix_alloc) \
|
||||
EXPAND_COUNTER(radix_alloc_data) \
|
||||
EXPAND_COUNTER(radix_block_cow) \
|
||||
EXPAND_COUNTER(radix_block_read) \
|
||||
EXPAND_COUNTER(radix_complete_dirty_block) \
|
||||
EXPAND_COUNTER(radix_create_synth) \
|
||||
EXPAND_COUNTER(radix_free) \
|
||||
EXPAND_COUNTER(radix_free_data) \
|
||||
EXPAND_COUNTER(radix_enospc_data) \
|
||||
EXPAND_COUNTER(radix_enospc_meta) \
|
||||
EXPAND_COUNTER(radix_enospc_synth) \
|
||||
EXPAND_COUNTER(radix_inconsistent_eio) \
|
||||
EXPAND_COUNTER(radix_inconsistent_ref) \
|
||||
EXPAND_COUNTER(radix_merge) \
|
||||
EXPAND_COUNTER(radix_merge_bad_clean_input) \
|
||||
EXPAND_COUNTER(radix_merge_empty) \
|
||||
EXPAND_COUNTER(radix_undo_ref) \
|
||||
EXPAND_COUNTER(radix_walk) \
|
||||
EXPAND_COUNTER(server_commit_hold) \
|
||||
EXPAND_COUNTER(server_commit_queue) \
|
||||
EXPAND_COUNTER(server_commit_worker) \
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#define SCOUTFS_BLOCK_MAGIC_SUPER 0x103c428b
|
||||
#define SCOUTFS_BLOCK_MAGIC_BTREE 0xe597f96d
|
||||
#define SCOUTFS_BLOCK_MAGIC_BLOOM 0x31995604
|
||||
#define SCOUTFS_BLOCK_MAGIC_RADIX 0xebeb5e65
|
||||
#define SCOUTFS_BLOCK_MAGIC_SRCH_BLOCK 0x897e4a7d
|
||||
#define SCOUTFS_BLOCK_MAGIC_SRCH_PARENT 0xb23a2a05
|
||||
#define SCOUTFS_BLOCK_MAGIC_ALLOC_LIST 0x8a93ac83
|
||||
@@ -183,29 +182,6 @@ struct scoutfs_radix_block {
|
||||
} __packed;
|
||||
} __packed;
|
||||
|
||||
struct scoutfs_radix_root {
|
||||
__u8 height;
|
||||
__le64 next_find_bit;
|
||||
struct scoutfs_radix_ref ref;
|
||||
} __packed;
|
||||
|
||||
#define SCOUTFS_RADIX_REFS \
|
||||
((SCOUTFS_BLOCK_LG_SIZE - \
|
||||
offsetof(struct scoutfs_radix_block, refs[0])) / \
|
||||
sizeof(struct scoutfs_radix_ref))
|
||||
|
||||
/* 8 meg regions with 4k data blocks */
|
||||
#define SCOUTFS_RADIX_LG_SHIFT 11
|
||||
#define SCOUTFS_RADIX_LG_BITS (1 << SCOUTFS_RADIX_LG_SHIFT)
|
||||
#define SCOUTFS_RADIX_LG_MASK (SCOUTFS_RADIX_LG_BITS - 1)
|
||||
|
||||
/* round block bits down to a multiple of large ranges */
|
||||
#define SCOUTFS_RADIX_BITS \
|
||||
(((SCOUTFS_BLOCK_LG_SIZE - \
|
||||
offsetof(struct scoutfs_radix_block, bits[0])) * 8) & \
|
||||
~(__u64)SCOUTFS_RADIX_LG_MASK)
|
||||
#define SCOUTFS_RADIX_BITS_BYTES (SCOUTFS_RADIX_BITS / 8)
|
||||
|
||||
struct scoutfs_avl_root {
|
||||
__le16 node;
|
||||
} __packed;
|
||||
|
||||
-1514
File diff suppressed because it is too large
Load Diff
@@ -1,45 +0,0 @@
|
||||
#ifndef _SCOUTFS_RADIX_H_
|
||||
#define _SCOUTFS_RADIX_H_
|
||||
|
||||
#include "per_task.h"
|
||||
|
||||
struct scoutfs_block_writer;
|
||||
|
||||
struct scoutfs_radix_allocator {
|
||||
struct mutex mutex;
|
||||
struct scoutfs_radix_root avail;
|
||||
struct scoutfs_radix_root freed;
|
||||
};
|
||||
|
||||
int scoutfs_radix_alloc(struct super_block *sb,
|
||||
struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_block_writer *wri, u64 *blkno);
|
||||
int scoutfs_radix_alloc_data(struct super_block *sb,
|
||||
struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_block_writer *wri,
|
||||
struct scoutfs_radix_root *root,
|
||||
int count, u64 *blkno_ret, int *count_ret);
|
||||
int scoutfs_radix_free(struct super_block *sb,
|
||||
struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_block_writer *wri, u64 blkno);
|
||||
int scoutfs_radix_free_data(struct super_block *sb,
|
||||
struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_block_writer *wri,
|
||||
struct scoutfs_radix_root *root,
|
||||
u64 blkno, int count);
|
||||
int scoutfs_radix_merge(struct super_block *sb,
|
||||
struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_block_writer *wri,
|
||||
struct scoutfs_radix_root *dst,
|
||||
struct scoutfs_radix_root *src,
|
||||
struct scoutfs_radix_root *inp, bool meta, u64 count);
|
||||
void scoutfs_radix_init_alloc(struct scoutfs_radix_allocator *alloc,
|
||||
struct scoutfs_radix_root *avail,
|
||||
struct scoutfs_radix_root *freed);
|
||||
void scoutfs_radix_root_init(struct super_block *sb,
|
||||
struct scoutfs_radix_root *root, bool meta);
|
||||
u64 scoutfs_radix_root_free_blocks(struct super_block *sb,
|
||||
struct scoutfs_radix_root *root);
|
||||
u64 scoutfs_radix_bit_leaf_nr(u64 bit);
|
||||
|
||||
#endif
|
||||
@@ -2223,174 +2223,6 @@ DEFINE_EVENT(scoutfs_block_class, scoutfs_block_shrink,
|
||||
TP_ARGS(sb, bp, blkno, refcount, io_count, bits, lru_moved)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_radix_get_block,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_radix_root *root,
|
||||
int glf, int level, u64 par_blkno, u64 ref_blkno, u64 blkno),
|
||||
TP_ARGS(sb, root, glf, level, par_blkno, ref_blkno, blkno),
|
||||
TP_STRUCT__entry(
|
||||
SCSB_TRACE_FIELDS
|
||||
__field(__u64, root_blkno)
|
||||
__field(int, glf)
|
||||
__field(int, level)
|
||||
__field(__u64, par_blkno)
|
||||
__field(__u64, ref_blkno)
|
||||
__field(__u64, blkno)
|
||||
),
|
||||
TP_fast_assign(
|
||||
SCSB_TRACE_ASSIGN(sb);
|
||||
__entry->root_blkno = le64_to_cpu(root->ref.blkno);
|
||||
__entry->glf = glf;
|
||||
__entry->level = level;
|
||||
__entry->par_blkno = par_blkno;
|
||||
__entry->ref_blkno = ref_blkno;
|
||||
__entry->blkno = blkno;
|
||||
),
|
||||
TP_printk(SCSBF" root_blkno %llu glf 0x%x level %u par_blkno %llu ref_blkno %llu blkno %llu",
|
||||
SCSB_TRACE_ARGS, __entry->root_blkno, __entry->glf,
|
||||
__entry->level, __entry->par_blkno, __entry->ref_blkno,
|
||||
__entry->blkno)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_radix_walk,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_radix_root *root,
|
||||
int glf, int level, u64 blkno, int ind, u64 bit),
|
||||
TP_ARGS(sb, root, glf, level, blkno, ind, bit),
|
||||
TP_STRUCT__entry(
|
||||
SCSB_TRACE_FIELDS
|
||||
__field(__u64, root_blkno)
|
||||
__field(unsigned int, glf)
|
||||
__field(__u64, blkno)
|
||||
__field(int, level)
|
||||
__field(int, ind)
|
||||
__field(__u64, bit)
|
||||
),
|
||||
TP_fast_assign(
|
||||
SCSB_TRACE_ASSIGN(sb);
|
||||
__entry->root_blkno = le64_to_cpu(root->ref.blkno);
|
||||
__entry->glf = glf;
|
||||
__entry->blkno = blkno;
|
||||
__entry->level = level;
|
||||
__entry->ind = ind;
|
||||
__entry->bit = bit;
|
||||
),
|
||||
TP_printk(SCSBF" root_blkno %llu glf 0x%x blkno %llu level %d par_ind %d bit %llu",
|
||||
SCSB_TRACE_ARGS, __entry->root_blkno, __entry->glf,
|
||||
__entry->blkno, __entry->level, __entry->ind, __entry->bit)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(scoutfs_radix_bitop,
|
||||
TP_PROTO(struct super_block *sb, u64 blkno, u64 leaf_bit, int ind,
|
||||
int nbits),
|
||||
TP_ARGS(sb, blkno, leaf_bit, ind, nbits),
|
||||
TP_STRUCT__entry(
|
||||
SCSB_TRACE_FIELDS
|
||||
__field(__u64, blkno)
|
||||
__field(__u64, leaf_bit)
|
||||
__field(int, ind)
|
||||
__field(int, nbits)
|
||||
),
|
||||
TP_fast_assign(
|
||||
SCSB_TRACE_ASSIGN(sb);
|
||||
__entry->blkno = blkno;
|
||||
__entry->leaf_bit = leaf_bit;
|
||||
__entry->ind = ind;
|
||||
__entry->nbits = nbits;
|
||||
),
|
||||
TP_printk(SCSBF" blkno %llu leaf_bit %llu ind %d nbits %d",
|
||||
SCSB_TRACE_ARGS, __entry->blkno, __entry->leaf_bit,
|
||||
__entry->ind, __entry->nbits)
|
||||
);
|
||||
DEFINE_EVENT(scoutfs_radix_bitop, scoutfs_radix_clear_bits,
|
||||
TP_PROTO(struct super_block *sb, u64 blkno, u64 leaf_bit, int ind,
|
||||
int nbits),
|
||||
TP_ARGS(sb, blkno, leaf_bit, ind, nbits)
|
||||
);
|
||||
DEFINE_EVENT(scoutfs_radix_bitop, scoutfs_radix_set_bits,
|
||||
TP_PROTO(struct super_block *sb, u64 blkno, u64 leaf_bit, int ind,
|
||||
int nbits),
|
||||
TP_ARGS(sb, blkno, leaf_bit, ind, nbits)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_radix_merge,
|
||||
TP_PROTO(struct super_block *sb, u64 dst_blkno, u64 dst_sm_tot,
|
||||
u64 src_blkno, u64 src_sm_tot, u64 inp_blkno, u64 inp_sm_tot,
|
||||
u64 count),
|
||||
TP_ARGS(sb, dst_blkno, dst_sm_tot, src_blkno, src_sm_tot, inp_blkno,
|
||||
inp_sm_tot, count),
|
||||
TP_STRUCT__entry(
|
||||
SCSB_TRACE_FIELDS
|
||||
__field(__u64, dst_blkno)
|
||||
__field(__u64, dst_sm_tot)
|
||||
__field(__u64, src_blkno)
|
||||
__field(__u64, src_sm_tot)
|
||||
__field(__u64, inp_blkno)
|
||||
__field(__u64, inp_sm_tot)
|
||||
__field(__u64, count)
|
||||
),
|
||||
TP_fast_assign(
|
||||
SCSB_TRACE_ASSIGN(sb);
|
||||
__entry->dst_blkno = dst_blkno;
|
||||
__entry->dst_sm_tot = dst_sm_tot;
|
||||
__entry->src_blkno = src_blkno;
|
||||
__entry->src_sm_tot = src_sm_tot;
|
||||
__entry->inp_blkno = inp_blkno;
|
||||
__entry->inp_sm_tot = inp_sm_tot;
|
||||
__entry->count = count;
|
||||
),
|
||||
TP_printk(SCSBF" d_blkno %llu d_sm_tot %llu s_blkno %llu s_sm_tot %llu i_blkno %llu i_sm_tot %llu count %llu",
|
||||
SCSB_TRACE_ARGS, __entry->dst_blkno, __entry->dst_sm_tot,
|
||||
__entry->src_blkno, __entry->src_sm_tot, __entry->inp_blkno,
|
||||
__entry->inp_sm_tot, __entry->count)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_radix_merged_blocks,
|
||||
TP_PROTO(struct super_block *sb,
|
||||
struct scoutfs_radix_root *inp, u64 inp_blkno,
|
||||
struct scoutfs_radix_root *src, u64 src_blkno,
|
||||
struct scoutfs_radix_root *dst, u64 dst_blkno,
|
||||
u64 count, u64 leaf_bit, int ind, int sm_delta,
|
||||
int src_lg_delta, int dst_lg_delta),
|
||||
TP_ARGS(sb, inp, inp_blkno, src, src_blkno, dst, dst_blkno, count,
|
||||
leaf_bit, ind, sm_delta, src_lg_delta, dst_lg_delta),
|
||||
TP_STRUCT__entry(
|
||||
SCSB_TRACE_FIELDS
|
||||
__field(__u64, inp_root_blkno)
|
||||
__field(__u64, inp_blkno)
|
||||
__field(__u64, src_root_blkno)
|
||||
__field(__u64, src_blkno)
|
||||
__field(__u64, dst_root_blkno)
|
||||
__field(__u64, dst_blkno)
|
||||
__field(__u64, count)
|
||||
__field(__u64, leaf_bit)
|
||||
__field(int, ind)
|
||||
__field(int, sm_delta)
|
||||
__field(int, src_lg_delta)
|
||||
__field(int, dst_lg_delta)
|
||||
),
|
||||
TP_fast_assign(
|
||||
SCSB_TRACE_ASSIGN(sb);
|
||||
__entry->inp_root_blkno = le64_to_cpu(inp->ref.blkno);
|
||||
__entry->inp_blkno = inp_blkno;
|
||||
__entry->src_root_blkno = le64_to_cpu(src->ref.blkno);
|
||||
__entry->src_blkno = src_blkno;
|
||||
__entry->dst_root_blkno = le64_to_cpu(dst->ref.blkno);
|
||||
__entry->dst_blkno = dst_blkno;
|
||||
__entry->count = count;
|
||||
__entry->leaf_bit = leaf_bit;
|
||||
__entry->ind = ind;
|
||||
__entry->sm_delta = sm_delta;
|
||||
__entry->src_lg_delta = src_lg_delta;
|
||||
__entry->dst_lg_delta = dst_lg_delta;
|
||||
),
|
||||
TP_printk(SCSBF" irb %llu ib %llu srb %llu sb %llu drb %llu db %llu cnt %llu lb %llu ind %u smd %d sld %d dld %d",
|
||||
SCSB_TRACE_ARGS, __entry->inp_root_blkno, __entry->inp_blkno,
|
||||
__entry->src_root_blkno, __entry->src_blkno,
|
||||
__entry->dst_root_blkno, __entry->dst_blkno,
|
||||
__entry->count, __entry->leaf_bit, __entry->ind,
|
||||
__entry->sm_delta, __entry->src_lg_delta,
|
||||
__entry->dst_lg_delta)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(scoutfs_ext_next_class,
|
||||
TP_PROTO(struct super_block *sb, u64 start, u64 len,
|
||||
struct scoutfs_extent *ext, int ret),
|
||||
|
||||
Reference in New Issue
Block a user