diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-04-21 04:10:17 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-21 03:35:51 -0700 |
commit | 1f074563ecdaf92b2ecf12d7ea79b2b5d8f50c2d (patch) | |
tree | 0d080401f590a695d83d40c6acdc9601f527dfd8 /xlators | |
parent | c1b2279adcc3b3a311221f247c6ee563214cf32c (diff) |
features/marker-quota: Add the disk space used to parent sizes during creation of new-files or symlinks.
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')
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 2 | ||||
-rw-r--r-- | xlators/features/marker/src/marker-quota.h | 3 | ||||
-rw-r--r-- | xlators/features/marker/src/marker.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index acc13dfee38..8a56dcbbc5a 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -912,7 +912,7 @@ quota_inodelk_cbk (call_frame_t *frame, void *cookie, if (op_ret == -1 || local->err) { gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : GF_LOG_INFO), - "lock setting failed"); + "lock setting failed (%s)", strerror (op_errno)); xattr_updation_done (frame, NULL, this, 0, 0, NULL); return 0; diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h index 2eecd83e8e1..0011a28b677 100644 --- a/xlators/features/marker/src/marker-quota.h +++ b/xlators/features/marker/src/marker-quota.h @@ -165,5 +165,8 @@ int32_t quota_rename_update_newpath (xlator_t *, loc_t *); int32_t +inspect_file_xattr (xlator_t *this, loc_t *loc, dict_t *dict, struct iatt buf); + +int32_t quota_forget (xlator_t *, quota_inode_ctx_t *); #endif diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 940dc43f4a2..7b339748bf4 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -533,7 +533,7 @@ marker_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, priv = this->private; if (priv->feature_enabled & GF_QUOTA) - quota_set_inode_xattr (this, &local->loc); + inspect_file_xattr (this, &local->loc, NULL, *buf); if (priv->feature_enabled & GF_XTIME) marker_xtime_update_marks (this, local); @@ -1199,7 +1199,7 @@ marker_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, priv = this->private; if (priv->feature_enabled & GF_QUOTA) - initiate_quota_txn (this, &local->loc); + inspect_file_xattr (this, &local->loc, NULL, *buf); if (priv->feature_enabled & GF_XTIME) marker_xtime_update_marks (this, local); |