vfs_glusterfs: Set connectpath as snapdir-entry-path.
authorraghavendra talur <raghavendra.talur@gmail.com>
Wed, 10 Dec 2014 07:00:10 +0000 (12:30 +0530)
committerGünther Deschner <gd@samba.org>
Wed, 10 Dec 2014 15:38:27 +0000 (16:38 +0100)
snapview client in gluster would require connectpath
in order add snapdir entry to readdir result.

Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec 10 16:38:27 CET 2014 on sn-devel-104

source3/modules/vfs_glusterfs.c

index 2dd9d716676fad26552c31cc3c37d8f035bfa024..c22216478f93d16c00962a3cd9f4b757932dba4e 100644 (file)
@@ -210,6 +210,17 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
                goto done;
        }
 
+
+       ret = glfs_set_xlator_option(fs, "*-snapview-client",
+                                    "snapdir-entry-path",
+                                    handle->conn->connectpath);
+       if (ret < 0) {
+               DEBUG(0, ("%s: Failed to set xlator option:"
+                         " snapdir-entry-path\n", volume));
+               glfs_fini(fs);
+               return -1;
+       }
+
        ret = glfs_set_logging(fs, logfile, loglevel);
        if (ret < 0) {
                DEBUG(0, ("%s: Failed to set logfile %s loglevel %d\n",