[stgt] [PATCH 1/3] sheepdog: turn on cache flag of write request
Hitoshi Mitake
mitake.hitoshi at gmail.com
Sun Jul 6 16:30:30 CEST 2014
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 at 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
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list