From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: stgt@vger.kernel.org
Cc: sheepdog@lists.wpkg.org,
Hitoshi Mitake <mitake.hitoshi@gmail.com>,
Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Subject: [PATCH 1/3] sheepdog: turn on cache flag of write request
Date: Sun, 6 Jul 2014 23:30:30 +0900 [thread overview]
Message-ID: <1404657032-17629-2-git-send-email-mitake.hitoshi@gmail.com> (raw)
In-Reply-To: <1404657032-17629-1-git-send-email-mitake.hitoshi@gmail.com>
tgtd doesn't affect semantics of caching, so we can always turn on
cache feature of sheepdog layer.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
---
usr/bs_sheepdog.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c
index 6d60bd6..a333675 100644
--- a/usr/bs_sheepdog.c
+++ b/usr/bs_sheepdog.c
@@ -795,13 +795,19 @@ retry:
old_oid = 0;
if (write) {
+ /*
+ * tgt doesn't affect semantics of caching, so we can
+ * always turn on cache of sheep layer
+ */
+ flags = SD_FLAG_CMD_CACHE;
+
if (ai->inode.data_vdi_id[idx] != vid) {
create = 1;
if (ai->inode.data_vdi_id[idx]) {
/* COW */
old_oid = oid;
- flags = SD_FLAG_CMD_COW;
+ flags |= SD_FLAG_CMD_COW;
}
oid = vid_to_data_oid(ai->inode.vdi_id, idx);
--
1.9.1
next prev parent reply other threads:[~2014-07-06 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 14:30 [PATCH 0/3] various update for sheepdog driver Hitoshi Mitake
2014-07-06 14:28 ` FUJITA Tomonori
2014-07-06 14:30 ` Hitoshi Mitake [this message]
2014-07-06 14:30 ` [PATCH 2/3] sheepdog: update layout of inode object header Hitoshi Mitake
2014-07-06 14:30 ` [PATCH 3/3] sheepdog: add documentation Hitoshi Mitake
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=1404657032-17629-2-git-send-email-mitake.hitoshi@gmail.com \
--to=mitake.hitoshi@gmail.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=sheepdog@lists.wpkg.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.