summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 8001f238614..ae08adcc8e0 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3882,6 +3882,18 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
goto done;
}
+ if (loc->inode && name
+ && (strncmp (name, GLUSTERFS_GET_OBJECT_SIGNATURE,
+ strlen (GLUSTERFS_GET_OBJECT_SIGNATURE)) == 0)) {
+ op_ret = posix_get_objectsignature (real_path, dict);
+ if (op_ret < 0) {
+ op_errno = -op_ret;
+ op_ret = -1;
+ }
+
+ goto done;
+ }
+
if (name) {
strcpy (keybuffer, name);
char *key = keybuffer;
@@ -4316,6 +4328,17 @@ posix_fsetxattr (call_frame_t *frame, xlator_t *this,
op_ret = -1;
}
+ if (!ret && xdata && dict_get (xdata, GLUSTERFS_DURABLE_OP)) {
+ op_ret = fsync (_fd);
+ if (op_ret < 0) {
+ op_ret = -1;
+ op_errno = errno;
+ gf_log (this->name, GF_LOG_WARNING,
+ "could not satisfy durability request: "
+ "reason (%s)", strerror (errno));
+ }
+ }
+
out:
SET_TO_OLD_FS_ID ();