[Sheepdog] [PATCH 7/9] sheep: remove a journal directory in remove_epoch()
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Sat Jan 1 20:53:18 CET 2011
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/store.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sheep/store.c b/sheep/store.c
index 471f9c4..a989d0a 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -959,6 +959,13 @@ int remove_epoch(int epoch)
eprintf("failed to remove %s, %s\n", path, strerror(-ret));
return SD_RES_EIO;
}
+
+ snprintf(path, sizeof(path), "%s%08u/", jrnl_path, epoch);
+ ret = rmdir_r(path);
+ if (ret && ret != -ENOENT) {
+ eprintf("failed to remove %s, %s\n", path, strerror(-ret));
+ return SD_RES_EIO;
+ }
return 0;
}
--
1.5.6.5
More information about the sheepdog
mailing list