lib/blobfs: remove legacy config support
This patch removes legacy config support in blobfs library. Mostly reverting patch: (97f3104) blobfs: Add conf parse for blobfs. CacheBufferShift option in legacy config is not tested in CI, and never received corresponding RPC. If required the RPC can always be added later on. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I54e39f069047a243b2186ae5ea225ed452180488 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4668 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
d3e99f4891
commit
ceea308887
@ -34,7 +34,6 @@
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include "spdk/blobfs.h"
|
||||
#include "spdk/conf.h"
|
||||
#include "tree.h"
|
||||
|
||||
#include "spdk/queue.h"
|
||||
@ -550,26 +549,6 @@ init_cb(void *ctx, struct spdk_blob_store *bs, int bserrno)
|
||||
free_fs_request(req);
|
||||
}
|
||||
|
||||
static void
|
||||
fs_conf_parse(void)
|
||||
{
|
||||
struct spdk_conf_section *sp;
|
||||
int cache_buffer_shift;
|
||||
|
||||
sp = spdk_conf_find_section(NULL, "Blobfs");
|
||||
if (sp == NULL) {
|
||||
g_fs_cache_buffer_shift = CACHE_BUFFER_SHIFT_DEFAULT;
|
||||
return;
|
||||
}
|
||||
|
||||
cache_buffer_shift = spdk_conf_section_get_intval(sp, "CacheBufferShift");
|
||||
if (cache_buffer_shift <= 0) {
|
||||
g_fs_cache_buffer_shift = CACHE_BUFFER_SHIFT_DEFAULT;
|
||||
} else {
|
||||
g_fs_cache_buffer_shift = cache_buffer_shift;
|
||||
}
|
||||
}
|
||||
|
||||
static struct spdk_filesystem *
|
||||
fs_alloc(struct spdk_bs_dev *dev, fs_send_request_fn send_request_fn)
|
||||
{
|
||||
@ -631,8 +610,6 @@ spdk_fs_init(struct spdk_bs_dev *dev, struct spdk_blobfs_opts *opt,
|
||||
return;
|
||||
}
|
||||
|
||||
fs_conf_parse();
|
||||
|
||||
req = alloc_fs_request(fs->md_target.md_fs_channel);
|
||||
if (req == NULL) {
|
||||
fs_free_io_channels(fs);
|
||||
@ -875,8 +852,6 @@ spdk_fs_load(struct spdk_bs_dev *dev, fs_send_request_fn send_request_fn,
|
||||
return;
|
||||
}
|
||||
|
||||
fs_conf_parse();
|
||||
|
||||
req = alloc_fs_request(fs->md_target.md_fs_channel);
|
||||
if (req == NULL) {
|
||||
fs_free_io_channels(fs);
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include "spdk/env.h"
|
||||
#include "spdk/log.h"
|
||||
|
||||
uint32_t g_fs_cache_buffer_shift = CACHE_BUFFER_SHIFT_DEFAULT;
|
||||
|
||||
struct cache_buffer *
|
||||
tree_find_buffer(struct cache_tree *tree, uint64_t offset)
|
||||
{
|
||||
|
@ -43,16 +43,14 @@ struct cache_buffer {
|
||||
bool in_progress;
|
||||
};
|
||||
|
||||
extern uint32_t g_fs_cache_buffer_shift;
|
||||
|
||||
#define CACHE_BUFFER_SHIFT_DEFAULT 18
|
||||
#define CACHE_BUFFER_SIZE (1U << g_fs_cache_buffer_shift)
|
||||
#define CACHE_BUFFER_SHIFT (18)
|
||||
#define CACHE_BUFFER_SIZE (1U << CACHE_BUFFER_SHIFT)
|
||||
#define NEXT_CACHE_BUFFER_OFFSET(offset) \
|
||||
(((offset + CACHE_BUFFER_SIZE) >> g_fs_cache_buffer_shift) << g_fs_cache_buffer_shift)
|
||||
(((offset + CACHE_BUFFER_SIZE) >> CACHE_BUFFER_SHIFT) << CACHE_BUFFER_SHIFT)
|
||||
|
||||
#define CACHE_TREE_SHIFT 6
|
||||
#define CACHE_TREE_WIDTH (1U << CACHE_TREE_SHIFT)
|
||||
#define CACHE_TREE_LEVEL_SHIFT(level) (g_fs_cache_buffer_shift + (level) * CACHE_TREE_SHIFT)
|
||||
#define CACHE_TREE_LEVEL_SHIFT(level) (CACHE_BUFFER_SHIFT + (level) * CACHE_TREE_SHIFT)
|
||||
#define CACHE_TREE_LEVEL_SIZE(level) (1ULL << CACHE_TREE_LEVEL_SHIFT(level))
|
||||
#define CACHE_TREE_LEVEL_MASK(level) (CACHE_TREE_LEVEL_SIZE(level) - 1)
|
||||
#define CACHE_TREE_INDEX(level, offset) ((offset >> CACHE_TREE_LEVEL_SHIFT(level)) & (CACHE_TREE_WIDTH - 1))
|
||||
|
@ -74,7 +74,7 @@ DEPDIRS-notify := log util $(JSON_LIBS)
|
||||
DEPDIRS-trace := log util $(JSON_LIBS)
|
||||
|
||||
DEPDIRS-bdev := log util conf thread $(JSON_LIBS) notify trace
|
||||
DEPDIRS-blobfs := log conf thread blob trace
|
||||
DEPDIRS-blobfs := log thread blob trace
|
||||
DEPDIRS-event := log util conf thread $(JSON_LIBS) trace
|
||||
|
||||
DEPDIRS-ftl := log util thread trace bdev
|
||||
|
@ -58,20 +58,6 @@ DEFINE_STUB_V(spdk_trace_register_description, (const char *name,
|
||||
DEFINE_STUB_V(_spdk_trace_record, (uint64_t tsc, uint16_t tpoint_id, uint16_t poller_id,
|
||||
uint32_t size, uint64_t object_id, uint64_t arg1));
|
||||
|
||||
/* Return NULL to test hardcoded defaults. */
|
||||
struct spdk_conf_section *
|
||||
spdk_conf_find_section(struct spdk_conf *cp, const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Return -1 to test hardcoded defaults. */
|
||||
int
|
||||
spdk_conf_section_get_intval(struct spdk_conf_section *sp, const char *key)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
fs_op_complete(void *ctx, int fserrno)
|
||||
{
|
||||
|
@ -59,20 +59,6 @@ DEFINE_STUB_V(spdk_trace_register_description, (const char *name,
|
||||
DEFINE_STUB_V(_spdk_trace_record, (uint64_t tsc, uint16_t tpoint_id, uint16_t poller_id,
|
||||
uint32_t size, uint64_t object_id, uint64_t arg1));
|
||||
|
||||
/* Return NULL to test hardcoded defaults. */
|
||||
struct spdk_conf_section *
|
||||
spdk_conf_find_section(struct spdk_conf *cp, const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Return -1 to test hardcoded defaults. */
|
||||
int
|
||||
spdk_conf_section_get_intval(struct spdk_conf_section *sp, const char *key)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct ut_request {
|
||||
fs_request_fn fn;
|
||||
void *arg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user