diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-04-21 05:03:56 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-21 07:38:27 -0700 |
commit | 2c12b90a84c544343e384e1d60d03b10be9fc45b (patch) | |
tree | 90be0489d187c268ecb488d2102c77191d5030ea /xlators/features/marker/src/marker.c | |
parent | 14f9c126c1237410bd9ef159e746afd7ff8c2753 (diff) |
features/marker-quota: handle creation of regular files using mknod.
- Add the disk-used to parents' size.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2649 (Quota: size field is not getting updated properly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2649
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r-- | xlators/features/marker/src/marker.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 862c0a464..8ab66f46e 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1267,6 +1267,10 @@ marker_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, priv = this->private; + if ((priv->feature_enabled & GF_QUOTA) && (S_ISREG (local->mode))) { + inspect_file_xattr (this, &local->loc, NULL, *buf); + } + if (priv->feature_enabled & GF_XTIME) marker_xtime_update_marks (this, local); out: @@ -1294,6 +1298,8 @@ marker_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, ret = loc_copy (&local->loc, loc); + local->mode = mode; + if (ret == -1) goto err; wind: |