d775209
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
d775209
index e204726..df0033a 100644
d775209
--- a/xlators/cluster/dht/src/dht-common.c
d775209
+++ b/xlators/cluster/dht/src/dht-common.c
d775209
@@ -2068,6 +2068,50 @@ err:
d775209
 	return 0;
d775209
 }
d775209
 
d775209
+int
d775209
+dht_fsetxattr (call_frame_t *frame, xlator_t *this,
d775209
+	      fd_t *fd, dict_t *xattr, int flags)
d775209
+{
d775209
+	xlator_t     *subvol   = NULL;
d775209
+	dht_local_t  *local    = NULL;
d775209
+        int           op_errno = EINVAL;
d775209
+
d775209
+        VALIDATE_OR_GOTO (frame, err);
d775209
+        VALIDATE_OR_GOTO (this, err);
d775209
+        VALIDATE_OR_GOTO (fd, err);
d775209
+        VALIDATE_OR_GOTO (fd->inode, err);
d775209
+
d775209
+	subvol = dht_subvol_get_cached (this, fd->inode);
d775209
+	if (!subvol) {
d775209
+		gf_log (this->name, GF_LOG_DEBUG,
d775209
+			"no cached subvolume for fd=%p", fd);
d775209
+		op_errno = EINVAL;
d775209
+		goto err;
d775209
+	}
d775209
+
d775209
+	local = dht_local_init (frame);
d775209
+	if (!local) {
d775209
+		op_errno = ENOMEM;
d775209
+		gf_log (this->name, GF_LOG_ERROR,
d775209
+			"Out of memory");
d775209
+		goto err;
d775209
+	}
d775209
+
d775209
+	local->inode = inode_ref (fd->inode);
d775209
+	local->call_cnt = 1;
d775209
+
d775209
+	STACK_WIND (frame, dht_err_cbk, subvol, subvol->fops->fsetxattr,
d775209
+		    fd, xattr, flags);
d775209
+
d775209
+	return 0;
d775209
+
d775209
+err:
d775209
+	op_errno = (op_errno == -1) ? errno : op_errno;
d775209
+	DHT_STACK_UNWIND (fsetxattr, frame, -1, op_errno);
d775209
+
d775209
+	return 0;
d775209
+}
d775209
+
d775209
 
d775209
 int
d775209
 dht_removexattr (call_frame_t *frame, xlator_t *this,
d775209
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c
d775209
index 93d01f1..3f81ba7 100644
d775209
--- a/xlators/cluster/dht/src/dht.c
d775209
+++ b/xlators/cluster/dht/src/dht.c
d775209
@@ -491,6 +491,7 @@ struct xlator_fops fops = {
d775209
 	.access      = dht_access,
d775209
 	.readlink    = dht_readlink,
d775209
 	.setxattr    = dht_setxattr,
d775209
+	.fsetxattr   = dht_fsetxattr,
d775209
 	.getxattr    = dht_getxattr,
d775209
 	.removexattr = dht_removexattr,
d775209
 	.open        = dht_open,