[sheepdog] [PATCH 1/2] sheep: change a condition of refreshing inode for read requests
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Jul 20 08:56:56 CEST 2015
Current condition of refreshing inode for read requests cannot handle
a case of reading readonly objects from snapshot. In such a case,
immediate refreshing isn't required.
(A case of reading from obsolete snapshot inode is handled in tgtd.)
Cc: Teruaki Ishizaki <ishizaki.teruaki at lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/gateway.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sheep/gateway.c b/sheep/gateway.c
index af7fce4..5037101 100644
--- a/sheep/gateway.c
+++ b/sheep/gateway.c
@@ -626,7 +626,7 @@ int gateway_read_obj(struct request *req)
if ((req->rq.flags & SD_FLAG_CMD_TGT) &&
!is_inode_refresh_req(req) &&
- is_refresh_required(oid_to_vid(oid))) {
+ is_vdi_obj(oid) && is_refresh_required(oid_to_vid(oid))) {
sd_debug("refresh is required: %"PRIx64, oid);
return SD_RES_INODE_INVALIDATED;
}
--
1.9.1
More information about the sheepdog
mailing list