summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: Upgrade steps for quotaupstream_on_quotaKrutika Dhananjay2013-09-251-0/+79
| | | | | Change-Id: I2c45fd47b0e433fac4f0aa0dce3a5eb2cf6ba1fc Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* Merge "Add upgrade scripts for quota" into upstream_on_quotaKrishnan Parthasarathi2013-09-242-0/+79
|\
| * Add upgrade scripts for quotaKrutika Dhananjay2013-09-182-0/+79
| | | | | | | | | | | | | | The doc for this will be updated in another patch Change-Id: Iff3eeb6c82157af388eddd98dab4d59bac4c1081 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* | Merge "quota-enforcer: initialize enforcer rpc iff quota is enabled" into ↵Krishnan Parthasarathi2013-09-242-7/+40
|\ \ | | | | | | | | | upstream_on_quota
| * | quota-enforcer: initialize enforcer rpc iff quota is enabledKrishnan Parthasarathi2013-09-242-8/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Details: -------- In init, we should create an rpc only when quota is enabled on the volume. In reconfigure, we should reuse the enforcer rpc, if any, on enable. On disable, we should disable the enforcer rpc, if present. Change-Id: I03e9f7b2b6dfecd1e8d97f0fb2df3db717e4ad50 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
* | features/marker: don't filter quota limit xattr in getxattrVarun Shastry2013-09-243-7/+35
| | | | | | | | | | | | | | Change-Id: Ib903ec47739a80168981b3c38ef6ea36ca3ab29a BUG: 969461 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Varun Shastry <vshastry@redhat.com>
* | storage/posix: check the return value of readlink before building the ancestryVarun Shastry2013-09-241-3/+10
| | | | | | | | | | | | | | | | | | | | * Also collect the return value of readlink in a signed entity intead of an unsigned entity, in which case failures cannot be detected. Change-Id: Ia73b97c15a1e9be518193fd57598e7c6eadca05c BUG: 969461 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Varun Shastry <vshastry@redhat.com>
* | posix, quota, glusterd, dht: Modification to the pgfid xattr handlingVarun Shastry2013-09-197-79/+260
|/ | | | | | | | | | | | | | | Commit makes the following changes to the source. i. Updating hard link count for parent dir should be configurable. Starts working only when the quota is enabled. ii. Heal nlinks of pgfid xattr in lookup. iii. Start quota crawler without readdirp optimization. iv. Rename: Handle the internal fops properly. Use GLUSTERFS_INTERNAL_FOP_KEY for representing the internal fops. Change-Id: Ic6586a82a8bb6eb4329eb6cbd5430da11418e753 BUG: 969461 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Varun Shastry <vshastry@redhat.com>
* Merge "features/quota: Quota related changes to statfs fop" into ↵Krishnan Parthasarathi2013-09-172-29/+208
|\ | | | | | | upstream_on_quota
| * features/quota: Quota related changes to statfs fopVarun Shastry2013-09-162-29/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code adjusts the statvfs values if the quota-deem-statfs option is enabled. i. Adjust statvfs based on limit configured on root. ii. If limit is set on the inode passed, use size/limits on that inode to populate statvfs. Otherwise, use size/limits configured on root. iii. Upon statvfs, update the ctx->size on the inode. iv. Don't let DHT aggregate, instead take the maximum of the usages from the subvols of the DHT, since each of it contains the complete information. Change-Id: Id43c5432be56b70c22c040a9b7f674ddddc9f930 BUG: 969461 Signed-off-by: Varun Shastry <vshastry@redhat.com>
* | Merge "features/marker: check on gfid instead for pargfid while skipping ↵Krishnan Parthasarathi2013-09-171-14/+16
|\ \ | | | | | | | | | contribution node creation for root" into upstream_on_quota
| * | features/marker: check on gfid instead for pargfid while skipping ↵Raghavendra G2013-09-131-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | contribution node creation for root Change-Id: I201a6dddab2258ae3f536281bb0fd17040d8c54e BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | | Revert "glusterd: Relax op-version check in quota command"Krutika Dhananjay2013-09-161-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 34ffc3b71ad96b9be6fa34cad44f92eceb56f5e7. Reverting this patch because quota command in glusterd only reads (but NOT modify) the op-version and therefore can never bump up the op-version of the cluster. As of today, that kind of intelligence rests only with 'volume set' operation. Hence 'volume set' interface is going to be used in the post upgrade script to explicitly trigger an increment in the cluster's op-version. Change-Id: Id38bbc044429ebb1349772f37b637925032618bc Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* | | Merge "glusterd: Validate timeout options during volume quota stage op" into ↵Krishnan Parthasarathi2013-09-161-7/+68
|\ \ \ | | | | | | | | | | | | upstream_on_quota
| * | | glusterd: Validate timeout options during volume quota stage opKrutika Dhananjay2013-09-121-7/+68
| |/ / | | | | | | | | | | | | Change-Id: If9ae015ab189f57f3a3f9a56cbb38a5e8491fe6f Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* | | Merge "glusterd: Relax op-version check in quota command" into upstream_on_quotaKrishnan Parthasarathi2013-09-161-32/+0
|\ \ \
| * | | glusterd: Relax op-version check in quota commandKrutika Dhananjay2013-09-131-32/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | This is to set default-soft-limit as a way of bumping up the op-version, as part of post-upgrade script before setting limits. Change-Id: I6693bf6a6d7f761c55f83120cf686ffa0951bd50 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* / | glusterd: Ignore "features.limit-usage" in glusterd's (re)start pathKrutika Dhananjay2013-09-131-0/+8
|/ / | | | | | | | | Change-Id: I08f919e0bf3f014c553070dbd7710ba5db9fd2b4 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* / cli: Add missing files cli-quotad-client.{c,h}Krutika Dhananjay2013-09-122-0/+187
|/ | | | | Change-Id: I146b28279241802393bb4e6528089b0deebfe8af Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* quotad: compare the entire volume_uuid with xlator name.Raghavendra G2013-09-101-1/+1
| | | | | | | | | | Current code compared only the first strlen (xlator_name) characters with volume_uuid. This can result in picking up a wrong subvol which has the first strlen (xlator_name) characters same as volume_uuid. Change-Id: I81bf251c0603ccfe2bd60b75d2e040f13b135669 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota: Don't error out if ctx is not set in inode.Raghavendra G2013-09-101-86/+129
| | | | | | | | | | | This patch addresses the issues we might run into in the time-window between crawler starts to build quota state and the crawler actually reaches the inode. In this time-window, quota is enabled but context of the inode in question is not populated. Change-Id: I10ba66d9aa3680e6c46f8f599e77fc39cc9601c5 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* storage/posix: fill GET_ANCESTRY_PATH in lookup xdata when asked forKrutika Dhananjay2013-09-063-6/+15
| | | | | | | Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: I0a68cb52f6d97da91782120af04b8dacb0c9ccc5 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: set soft-limit as -1, if not specified in quota-limit-usageKrutika Dhananjay2013-09-062-22/+23
| | | | | | | Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: I07d7f01af597cbec836972fd06076dcee82eff7d Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: Conditionally aggregate peer responses for quota subcommandsKrutika Dhananjay2013-09-062-16/+32
| | | | | | | | | | | | | | | | | In the function _gd_syncop_stage_op_cbk (), aggregate rsp dicts only during REPLACE_BRICK and QUOTA commands. Similarly, in the function _gd_syncop_stage_op_cbk (), aggregate the rsp dict from the peers only for quota sub-command 'list' and for all other commands unconditionally. This is the cause of the log messages seen in the bug 1001432. Also, read interim 'count' from op_ctx before aggregating it with rsp_dict_count Change-Id: I9ecb832e83354d62a8f841db2ce6b2377920abad Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: Destroy volinfo->quota_conf_shandle during 'volume delete'Krutika Dhananjay2013-09-064-39/+48
| | | | | | | ... and also remove auxiliary mount, if it exists. Change-Id: I91ac3f434df3e03ea914051d1d6890e7a05a3cad Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: probe quota.conf format changesKrutika Dhananjay2013-09-063-56/+93
| | | | | | | Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: Iff4ea98276ffdba5b39cadceff63739107eafd77 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: Add cksum file (quota.cksum) for quota.conf fileKrutika Dhananjay2013-09-0610-165/+742
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. and use quota checksum and version to validate one's own quota store config cli: cleanup quota-list-all implementation Also, change the format in which we store the directory quota configurations. We store the list of gfids as 16 byte unsigned chars, in binary mode. Original-author: Krishnan Parthasarathi <kparthas@redhat.com> glusterd: Store quota checksum and version in quota.cksum Quota version is incremented AND quota checksum is computed everytime quota.conf is modified. The checksum and versions are also retrieved from store into memory whenever glusterd is restarted. glusterd: Unlink quota.conf and quota.cksum on quota disable Also destroy volinfo->quota_conf_shandle and reset it to NULL, and reset volinfo->quota_conf_version to 0 in memory. Change-Id: Ie71da3a75bc80e1ffddf4f2e38a99a48ad4de164 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: add quota conf to probe payloadKrutika Dhananjay2013-09-064-9/+205
| | | | | | | | | also fix FILE* leak in cli Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: Icb9b58ef065ce1a150d98b4c26bbcddeeb390e44 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* cli: implement quota-list-all using quota.conf and quotad GETLIMIT rpcKrutika Dhananjay2013-09-0610-21/+438
| | | | | | | Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: I07797fb5402dba89f81a7d2b8b20a11db74f69c9 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* volgen: use volname instead of volume-idKrutika Dhananjay2013-09-061-2/+2
| | | | | | | | | | | | | | | As part of volume-quota-list command implementation, the gluster cli process makes an RPC to quotad, querying for quota related information of a gfid in a volume. Prior to this patch, we used the volume-id for quotad to uniquely identify a volume. Since cli doesn't have a way (today) to fetch the volume-id for a given volname, we had to use a (nearly) unique key to identify a volume" Original-author: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: I49b66f46fc7bb8dc4075cc855a1d854166d0e89c Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* Merge "features/quota: Read the time option in its native format" into ↵Vijay Bellur2013-09-022-8/+9
|\ | | | | | | upstream_on_quota
| * features/quota: Read the time option in its native formatVarun Shastry2013-08-262-8/+9
| | | | | | | | | | Change-Id: Ibe7de155bb5be21ab2da2beed75eec86e9a2f001 Signed-off-by: Varun Shastry <vshastry@redhat.com>
* | features/quota: log only if soft limit is set.Raghavendra G2013-09-031-3/+3
| | | | | | | | | | | | Change-Id: I60f93727f04f1d16edfc7efdcb4e1c501ec760fa BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/marker: Do proper check before logging in marker/quota.Raghavendra G2013-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | For correct functioning of marker we need a parent/pargfid. Change-Id: Ie1a0fb3a5b9b12091e1ea749cbf15342a5f933db BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/11947 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* | features/quota: remove spurious logs about inode ctx being NULL.Raghavendra G2013-09-031-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | Its valid that directories on which limit is not set, to not have inode ctx NULL, since it servers no purpose. Change-Id: I0e31de7ffbfcb65cddf590833756ff11bab64434 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/11830 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* | features/quota: Check quota on all parents after building ancestry.Raghavendra G2013-09-031-42/+94
| | | | | | | | | | | | | | | | | | | | This patch also fixes a potential race-condition while accessing dentry list stored in inode context while updating size and enforcing limits. Change-Id: I76c85fe782f6a53d74b453dd7dcb893e33003620 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/quota: Pass correct delta during quota_updationRaghavendra G2013-09-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to calculate delta as, delta = (postbuf->ia_blocks - prebuf->ia_blocks) * 512; However this can result in some blocks getting accounted twice in a multithreaded environment. This is because at storage/posix, we dont do, * stat (file, &prebuf) * write () * stat (file, &postbuf) as a single atomic operation. So, stat in step 3, can account for some blocks which are allocated as part of a parallel write. One of the possible fixes is to make these three operations by holding a lock. However, this is too costly operation and hence quota relies on size of the vector being written (with the check that if post and pre block count are same, entire write was accomodated in existing blocks). This seems to be acceptable since we don't solely rely on size_updation by quota-enforcer (we do fetch aggregated size from quotad after a timeout). Change-Id: Ifdc8174c77058322aca8f589f7558641b73f0bc1 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/11829 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* | features/quota: Add test case to trigger quota ancestry buildingRaghavendra G2013-09-031-0/+52
| | | | | | | | | | | | | | | | codepath. Change-Id: I41bdfb55d9313d2b7f735464fb3409875981bc40 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/quota: Add log when enforcer builds an inode's ancestry.Raghavendra G2013-09-031-0/+3
| | | | | | | | | | | | Change-Id: Ic31b77192d7cc21462f6b0eeee2938109681ca55 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | storage/posix: fix issues with constructing correct path as part ofRaghavendra G2013-09-032-8/+11
| | | | | | | | | | | | | | | | handling GET_ANCESTRY_PATH key. Change-Id: Ibb1cd1b4d9cd2d6f85b642c2dd157f68d18b8d41 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/quota: update in memory limit values when limit-set is done.Raghavendra G2013-09-032-37/+41
| | | | | | | | | | | | | | | | Also removes QUOTA_UPDATE_USAGE_KEY Change-Id: I71080eda562f8f4d451c4911f833de9048031da9 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/quota: cleanup of quota_inode_ctx_getRaghavendra G2013-09-031-83/+58
| | | | | | | | | | | | Change-Id: I49798f8b84a260e72bed722e08af6a194005dec1 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/quota: don't process "." and ".." in readdirp_cbkRaghavendra G2013-09-031-2/+6
| | | | | | | | | | | | Change-Id: I1aa76e6155876e0dcd996bf037ad76cbb17a0ac1 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | marker: use gfid from iatt instead of from inode in getxattr_cbk.Raghavendra G2013-09-031-1/+1
| | | | | | | | | | | | Change-Id: I807ef0616af3f0f83d3c14e92cc93f5c765908af BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | features/marker: dont process "." and ".." in readdirp_cbkRaghavendra G2013-09-031-1/+5
| | | | | | | | | | | | Change-Id: Iccc4aefebda7d1cd029642adf08806befadd14ad BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | marker-quota: fix code that assumes loc->path is always non-nullRaghavendra G2013-09-033-8/+23
| | | | | | | | | | | | Change-Id: I33d45521a06f008554cb43a3d6b53136b2f091d2 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | Merge "features/marker: fill inode contexts in readdirp" into upstream_on_quotaVijay Bellur2013-09-011-5/+39
|\ \
| * | features/marker: fill inode contexts in readdirpRaghavendra G2013-08-291-5/+39
| | | | | | | | | | | | | | | | | | Change-Id: If9b4a9e9c2c153895129b6ed44ebee416f3da75c BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* | | Merge "features/quota-enforcer: build inode contexts in readdirp" into ↵Vijay Bellur2013-09-012-10/+52
|\| | | | | | | | | | | upstream_on_quota
| * | features/quota-enforcer: build inode contexts in readdirpRaghavendra G2013-08-292-10/+52
| | | | | | | | | | | | | | | | | | Change-Id: I8a224a332777d9e2506d6211606f10149ea537e0 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>