From: YAMADA Hideki <yamada.hideki@lab.ntt.co.jp>
To: stgt@vger.kernel.org
Cc: YAMADA Hideki <yamada.hideki@lab.ntt.co.jp>
Subject: [PATCH] sheepdog: fix to clear create flag when reloading inode
Date: Wed, 5 Nov 2014 14:31:20 +0900 [thread overview]
Message-ID: <1415165480-15541-1-git-send-email-yamada.hideki@lab.ntt.co.jp> (raw)
This bug causes duplicated CREATE_AND_WRITE requests
in case of iSCSI multipath failover.
Signed-off-by: YAMADA Hideki <yamada.hideki@lab.ntt.co.jp>
---
usr/bs_sheepdog.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c
index ba5b099..2941803 100644
--- a/usr/bs_sheepdog.c
+++ b/usr/bs_sheepdog.c
@@ -858,7 +858,7 @@ static int sd_io(struct sheepdog_access_info *ai, int write, char *buf, int len,
(offset + len + (SD_DATA_OBJ_SIZE - 1)) / SD_DATA_OBJ_SIZE;
unsigned obj_offset = offset % SD_DATA_OBJ_SIZE;
size_t orig_size, size, rest = len;
- int ret = 0, create = 0;
+ int ret = 0, create;
uint64_t oid, old_oid;
uint16_t flags = 0;
int need_update_inode = 0, need_reload_inode;
@@ -899,6 +899,7 @@ retry:
* always turn on cache of sheep layer
*/
flags = SD_FLAG_CMD_CACHE;
+ create = 0;
if (ai->inode.data_vdi_id[idx] != vid) {
create = 1;
--
1.7.1
next reply other threads:[~2014-11-05 5:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 5:31 YAMADA Hideki [this message]
2014-11-05 6:03 ` [PATCH] sheepdog: fix to clear create flag when reloading inode Hitoshi Mitake
2014-11-05 7:21 ` FUJITA Tomonori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415165480-15541-1-git-send-email-yamada.hideki@lab.ntt.co.jp \
--to=yamada.hideki@lab.ntt.co.jp \
--cc=stgt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).