[Sheepdog] [PATCH] collie: remove atomic vdi object update support
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Sat May 8 04:07:11 CEST 2010
We need to update vdi objects atomically to have tolerance against
total node failure. However, adding checksum for all object update
causes too bad performance. I think we should take another approach
such as logging .
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
collie/store.c | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/collie/store.c b/collie/store.c
index 3277ad9..c5d3edf 100644
--- a/collie/store.c
+++ b/collie/store.c
@@ -702,24 +702,26 @@ static int store_queue_request_local(struct request *req, char *buf, uint32_t ep
rsp->copies = copies;
if (!is_data_obj(oid)) {
- ret = verify_object(fd, NULL, 0, 0);
- if (ret < 0) {
- eprintf("verification failed, %lx\n", oid);
- ret = SD_RES_EIO;
- goto out;
- }
+ /* FIXME: need to check whether the object is valid or not */
+/* ret = verify_object(fd, NULL, 0, 0); */
+/* if (ret < 0) { */
+/* eprintf("verification failed, %lx\n", oid); */
+/* ret = SD_RES_EIO; */
+/* goto out; */
+/* } */
}
ret = SD_RES_SUCCESS;
break;
case SD_OP_WRITE_OBJ:
if (!is_data_obj(oid)) {
- ret = verify_object(fd, NULL, 0, 0);
- if (ret < 0) {
- eprintf("verification failed, %lx\n", oid);
- ret = SD_RES_EIO;
- goto out;
- }
+ /* FIXME: need to check whether the object is valid or not */
+/* ret = verify_object(fd, NULL, 0, 0); */
+/* if (ret < 0) { */
+/* eprintf("verification failed, %lx\n", oid); */
+/* ret = SD_RES_EIO; */
+/* goto out; */
+/* } */
}
/* fall through */
case SD_OP_CREATE_AND_WRITE_OBJ:
@@ -730,12 +732,13 @@ static int store_queue_request_local(struct request *req, char *buf, uint32_t ep
}
if (!is_data_obj(oid)) {
- ret = verify_object(fd, NULL, 0, 1);
- if (ret < 0) {
- eprintf("failed to set checksum, %lx\n", oid);
- ret = SD_RES_EIO;
- goto out;
- }
+ /* FIXME: need to update atomically */
+/* ret = verify_object(fd, NULL, 0, 1); */
+/* if (ret < 0) { */
+/* eprintf("failed to set checksum, %lx\n", oid); */
+/* ret = SD_RES_EIO; */
+/* goto out; */
+/* } */
}
ret = SD_RES_SUCCESS;
--
1.5.6.5
More information about the sheepdog
mailing list