[Sheepdog] [PATCH] fix calculation of data object id
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu Apr 8 22:09:15 CEST 2010
We need to mask VDI_BIT to calculate data object id.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
include/meta.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/meta.h b/include/meta.h
index 338f660..208b2e1 100644
--- a/include/meta.h
+++ b/include/meta.h
@@ -54,7 +54,7 @@ struct sheepdog_inode {
static inline int is_data_obj_writeable(struct sheepdog_inode *inode, int idx)
{
- return (inode->oid >> VDI_SPACE_SHIFT) ==
+ return ((inode->oid & ~VDI_BIT) >> VDI_SPACE_SHIFT) ==
(inode->data_oid[idx] >> VDI_SPACE_SHIFT);
}
--
1.5.6.5
More information about the sheepdog
mailing list