[sheepdog] [PATCH 2/2] sheep/plain: set offset correctly in create_and_write

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Sep 20 21:33:53 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/plain_store.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index 8e3bd3e..ac73938 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -345,7 +345,7 @@ int default_create_and_write(uint64_t oid, struct siocb *iocb)
 			goto out;
 	}
 
-	ret = xwrite(fd, iocb->buf, len);
+	ret = xpwrite(fd, iocb->buf, len, iocb->offset);
 	if (ret != len) {
 		eprintf("failed to write object. %m\n");
 		ret = err_to_sderr(oid, errno);
-- 
1.7.2.5




More information about the sheepdog mailing list