summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd/src/bd-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/bd/src/bd-helper.c')
-rw-r--r--xlators/storage/bd/src/bd-helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c
index 15f83d3f834..21e7bed9159 100644
--- a/xlators/storage/bd/src/bd-helper.c
+++ b/xlators/storage/bd/src/bd-helper.c
@@ -903,7 +903,12 @@ bd_do_ioctl_zerofill (bd_priv_t *priv, bd_attr_t *bdatt, int fd, char *vg,
uuid_utoa_r (bdatt->iatt.ia_gfid, uuid);
sprintf (lvname, "/dev/%s/%s", vg, uuid);
- sys_readlink (lvname, dmname, sizeof (dmname) - 1);
+ if (sys_readlink(lvname, dmname, sizeof(dmname)-1) < 0) {
+ gf_log("bd", GF_LOG_DEBUG,
+ "Failed to read symbolic link '%s': %s",
+ lvname, strerror(errno));
+ goto skip;
+ }
p = strrchr (dmname, '/');
if (p)