Users may run 'collie cluster format -b ?' to get the store driver list. In such cases, we shouldn't update sd_store. Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> --- sheep/ops.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sheep/ops.c b/sheep/ops.c index 1b35552..b4df70f 100644 --- a/sheep/ops.c +++ b/sheep/ops.c @@ -218,11 +218,13 @@ static int cluster_make_fs(const struct sd_req *req, struct sd_rsp *rsp, uint32_t latest_epoch; uint64_t created_time; struct siocb iocb = { 0 }; + struct store_driver *driver; - sd_store = find_store_driver(data); - if (!sd_store) + driver = find_store_driver(data); + if (!driver) return SD_RES_NO_STORE; + sd_store = driver; latest_epoch = get_latest_epoch(); iocb.epoch = latest_epoch; sd_store->format(&iocb); -- 1.7.2.5 |