summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-05-19 23:31:38 -0700
committerVijay Bellur <vbellur@redhat.com>2013-05-25 11:39:20 -0700
commited11e88b77fe45acd1181728435bb644607a2b22 (patch)
treeb4dbaffba0e7692266d4e8b26d1002dd0345aebc /api/src/glfs.c
parent05aaec645a6262d431486eb5ac7cd702646cfcfb (diff)
gfapi: provide stable st_dev in stat structure
Samba depends on st_dev being unique and stable for different filesystems (it uses st_dev+st_ino as key to store metadata of a file). Change-Id: Ia022fabadfb5ef3fc9724c1b1ca86f1a20f98af9 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5045 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'api/src/glfs.c')
-rw-r--r--api/src/glfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index ac55628bd..3962a39da 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -52,6 +52,7 @@
#include "glfs.h"
#include "glfs-internal.h"
+#include "hashfn.h"
static gf_boolean_t
@@ -577,6 +578,7 @@ glfs_init_common (struct glfs *fs)
if (ret)
return ret;
+ fs->dev_id = gf_dm_hashfn (fs->volname, strlen (fs->volname));
return ret;
}