From 74e487f3a925cbe6867491ef27a71767826cb7ff Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 13 May 2024 01:49:00 +0200 Subject: [PATCH] label: make scan_bcache local Seems there are no users of scan_bcache, so make it local. TODO: such variable should be ideally in cmd_context. --- lib/label/label.c | 3 ++- lib/label/label.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/label/label.c b/lib/label/label.c index 500a43364..b107bb681 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -253,7 +253,8 @@ struct label *label_create(struct labeller *labeller) /* global variable for accessing the bcache populated by label scan */ -struct bcache *scan_bcache; +/* FIXME/TODO convert to cmd_context */ +static struct bcache *scan_bcache; #define BCACHE_BLOCK_SIZE_IN_SECTORS 256 /* 256*512 = 128K */ diff --git a/lib/label/label.h b/lib/label/label.h index be193f915..4c224dc50 100644 --- a/lib/label/label.h +++ b/lib/label/label.h @@ -100,8 +100,6 @@ int label_write(struct device *dev, struct label *label); struct label *label_create(struct labeller *labeller); void label_destroy(struct label *label); -extern struct bcache *scan_bcache; - int label_scan(struct cmd_context *cmd); int label_scan_devs(struct cmd_context *cmd, struct dev_filter *f, struct dm_list *devs); int label_scan_devs_cached(struct cmd_context *cmd, struct dev_filter *f, struct dm_list *devs);