From: Liu Yuan <[email protected]>
Signed-off-by: Liu Yuan <[email protected]>
---
sbd/sheep.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sbd/sheep.c b/sbd/sheep.c
index b1cbbfb..56b6e23 100644
--- a/sbd/sheep.c
+++ b/sbd/sheep.c
@@ -255,6 +255,14 @@ int sheep_setup_vdi(struct sbd_device *dev)
pr_err("Cannot read inode for %s, %d\n", dev->vdi.name, ret);
goto out_release;
}
+
+ if (vdi_is_snapshot(inode)) {
+ pr_err("%s: don't support to add snapshot %s\n", DRV_NAME,
+ dev->vdi.name);
+ ret = -EINVAL;
+ goto out_release;
+ }
+
dev->vdi.inode = inode;
pr_info("%s: Associated to %s\n", DRV_NAME, inode->name);
return 0;
--
1.8.1.2
--
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog