summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2013-07-31 23:58:04 +0530
committerAnand Avati <avati@redhat.com>2013-08-21 12:13:16 -0700
commitdf9bfff8ea08176a3874fb0cdec8fd4b988d3ffa (patch)
tree47a4bd23277bd45a96e666bcd9da531d0166e520 /xlators/storage
parent271804a26ca73c2eab706eff4b3be9a62bec2b13 (diff)
core: changes to support gfid-access
Change-Id: I38d2fdc47e4b805deafca6805e54807976ffdb7e Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 952029 Reviewed-on: http://review.gluster.org/5496 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 3c7816cfb8c..fc7c259e948 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -842,6 +842,7 @@ posix_mknod (call_frame_t *frame, xlator_t *this,
struct iatt preparent = {0,};
struct iatt postparent = {0,};
void * uuid_req = NULL;
+ mode_t st_mode = 0;
DECLARE_OLD_FS_ID_VAR;
@@ -917,6 +918,19 @@ real_op:
strerror (op_errno));
goto out;
}
+ } else {
+ op_ret = dict_get_uint32 (xdata, GLUSTERFS_CREATE_MODE_KEY,
+ &st_mode);
+
+ if (op_ret >= 0) {
+ op_ret = chmod (real_path, st_mode);
+ if (op_ret < 0) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "chmod failed (%s)", strerror (errno));
+ }
+
+ dict_del (xdata, GLUSTERFS_CREATE_MODE_KEY);
+ }
}
op_ret = posix_gfid_set (this, real_path, loc, xdata);