[sheepdog] [PATCH 2/7] sheep: update object list cache in default_create_and_write()
Liu Yuan
namei.unix at gmail.com
Sun Oct 13 13:43:07 CEST 2013
No need to call it everywhere else.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
sheep/ops.c | 3 ---
sheep/plain_store.c | 1 +
sheep/recovery.c | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/sheep/ops.c b/sheep/ops.c
index d754e9b..d46d10e 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -991,9 +991,6 @@ static int peer_create_and_write_obj(struct request *req)
ret = do_create_and_write_obj(&iocb, &cow_hdr, epoch, buf);
} else
ret = do_create_and_write_obj(&iocb, hdr, epoch, req->data);
-
- if (SD_RES_SUCCESS == ret)
- objlist_cache_insert(oid);
out:
if (buf)
free(buf);
diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index 1d7740f..eb00be0 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -401,6 +401,7 @@ int default_create_and_write(uint64_t oid, const struct siocb *iocb)
goto out;
}
ret = SD_RES_SUCCESS;
+ objlist_cache_insert(oid);
out:
if (ret != SD_RES_SUCCESS)
unlink(tmp_path);
diff --git a/sheep/recovery.c b/sheep/recovery.c
index ac13871..29c5d05 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -240,7 +240,6 @@ static int recover_object_from_replica(struct recovery_obj_work *row,
case SD_RES_SUCCESS:
sd_debug("recovered oid %"PRIx64" from %d to epoch %d",
oid, tgt_epoch, epoch);
- objlist_cache_insert(oid);
return ret;
case SD_RES_OLD_NODE_VER:
/* move to the next epoch recovery */
--
1.7.9.5
More information about the sheepdog
mailing list