summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quota.h
Commit message (Collapse)AuthorAgeFilesLines
* quota: fix parents caching during build ancestryvmallika2015-08-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11574/ In build ancestry, we get the list of parents for a file, these parents are cached in inode ctx. This caching is not happening because posix is not setting d_stat information in the leaf node entry This patch fixes the issue Inode-ctx is not updated with new parent when rename performed on same directory. This patch fixes the issue There is a possibility of caching stale entries, consider below example: 1) build_ancestry invoked on a file 2) rename is invoked on the same file 3) buils_ancestry prepared entries of old parent 4) rename completed and in cbk old parent is replaced with new parent in inode ctx 5) now build_ancestry cbk adds old parent to inode ctx In this patch we also remove stale entries in writev and fallocate > Change-Id: Ib1854a41b47b14eb775326588352015c83d034de > BUG: 1240949 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/11574 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I26a196e7eeed343593bea3a0b7b51d7be12500a3 BUG: 1248325 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11799 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota: Fix crash in quota enforcervmallika2015-07-211-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/11510 With multiple hardlinks check_quota_limit is invoked for each parent each of this check_limit can invoke validation this can cause frame->local to get corrupted during validation. Testcase tests/bugs/quota/bug-1235182.t fails spuriously with this problem > Change-Id: I53adc54b431fb5f43e67a94248102ddaf0d7978f > BUG: 1238747 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/11510 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: Ia7f57276db034e0fc6cd84dbf618ce0d4fae4321 BUG: 1242898 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11662 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota: port QUOTA messages to new logging frameworkSusant Palai2015-06-231-2/+4
| | | | | | | | | | | | | Change-Id: I2fa725323ee9a9959fd105ea014c90e2fad11c14 BUG: 1234297 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7574 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11341
* quota: retry connecting to quotad on ENOTCONN errorvmallika2015-06-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/10230/ > Suppose if there are two volumes vol1 and vol2, > and quota is enabled and limit is set on vol1. > Now if IO is happening on vol1 and quota is enabled/disabled > on vol2, quotad gets restarted and client will receive > ENOTCONN in the IO path of vol1. > > This patch will retry connecting to quotad upto 60sec > in a interval of 5sec (12 retries) > If not able to connect with 12 retries, then return ENOTCONN > > Change-Id: Ie7f5d108633ec68ba9cc3a6a61d79680485193e8 > BUG: 1211220 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/10230 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I94d8d4a814a73d69e934f3e77e989e5f3bf2e65a BUG: 1226789 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11024 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* Avoid conflict between contrib/uuid and system uuidEmmanuel Dreyfus2015-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glusterfs relies on Linux uuid implementation, which API is incompatible with most other systems's uuid. As a result, libglusterfs has to embed contrib/uuid, which is the Linux implementation, on non Linux systems. This implementation is incompatible with systtem's built in, but the symbols have the same names. Usually this is not a problem because when we link with -lglusterfs, libc's symbols are trumped. However there is a problem when a program not linked with -lglusterfs will dlopen() glusterfs component. In such a case, libc's uuid implementation is already loaded in the calling program, and it will be used instead of libglusterfs's implementation, causing crashes. A possible workaround is to use pre-load libglusterfs in the calling program (using LD_PRELOAD on NetBSD for instance), but such a mechanism is not portable, nor is it flexible. A much better approach is to rename libglusterfs's uuid_* functions to gf_uuid_* to avoid any possible conflict. This is what this change attempts. BUG: 1206587 Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/10017 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/quota : Introducing inode quotavmallika2015-03-181-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================================================================== Inode quota ========================================================================== = Currently, the only way to retrieve the number of files/objects in a = = directory or volume is to do a crawl of the entire directory/volume. = = This is expensive and is not scalable. = = = = The proposed mechanism will provide an easier alternative to determine = = the count of files/objects in a directory or volume. = = = = The new mechanism proposes to store count of objects/files as part of = = an extended attribute of a directory. Each directory's extended = = attribute value will indicate the number of files/objects present = = in a tree with the directory being considered as the root of the tree. = = = = The count value can be accessed by performing a getxattr(). = = Cluster translators like afr, dht and stripe will perform aggregation = = of count values from various bricks when getxattr() happens on the key = = associated with file/object count. = A new interface is introduced: ------------------------------ limit-objects : limit the number of inodes at directory level list-objects : list the directories where the limit is set remove-objects : remove the limit from the directory ========================================================================== CLI COMMAND: gluster volume quota <volname> limit-objects <path> <number> [<percent>] * <number> is a hard-limit for number of objects limitation for path "<path>" If hard-limit is exceeded, creation of file/directory is no longer permitted. * <percent> is a soft-limit for number of objects creation for path "<path>" If soft-limit is exceeded, a warning is issued for each creation. CLI COMMAND: gluster volume quota <volname> remove-objects [path] ========================================================================== CLI COMMAND: gluster volume quota <volname> list-objects [path] ... Sample output: ------------------ Path Hard-limit Soft-limit Used Available Soft-limit exceeded? Hard-limit exceeded? ------------------------------------------------------------------------ -------------------------------------- /dir 10 80% 10 0 Yes Yes ========================================================================== [root@snapshot-28 dir]# ls a b file11 file12 file13 file14 file15 file16 file17 [root@snapshot-28 dir]# touch a1 touch: cannot touch `a1': Disk quota exceeded * Nine files are created in directory "dir" and directory is included in * the count too. Hence the limit "10" is reached and further file creation fails ========================================================================== Note: We have also done some re-factoring in cli for volume name validation. New function cli_validate_volname is created ========================================================================== Change-Id: I1823497de4f790a2a20ebb1770293472ea33ee2b BUG: 1190108 Signed-off-by: Sachin Pandit <spandit@redhat.com> Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9769 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Quota: Build ancestry in the lookupvmallika2015-03-181-0/+1
| | | | | | | | | | | | | | | | | | Marker can fail or can account incorrect numbers when it doesn't find a ancestry for a inode. Solution: Current build_ancestry is done only on demand in the write/create FOPs in quota enforcer. It is good to do this in the quota_lookup as well. Change-Id: I8aaf5b3e05a3ca51e7ab1eaa1b636a90f659a872 BUG: 1184885 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9478 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* quota: For a link operation, do quota_check_limit only till thevmallika2015-01-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common ancestor of src and dst file In a dht_rename, if src_cached and dst_hashed are different, then rename is split into link and unlink. We need to handle quota_link properly. We have fixed quota_rename in patch# 8940, we need to handle quota_link similarly > http://review.gluster.org/#/c/8940/ > quota: For a rename operation, do quota_check_limit only till the > common ancestor of src and dst file > Example: > set quota limit set to 1GB on / > create a file /a1/b1/file1 of 600MB > mv /a1/b1/file1 /a1/b1/file2 > This rename fails as it takes delta into account which sums up to 1.2BG. > Though we are not creating new file, we still get quota exceeded error. > So quota enforce should happen only till b1. > Similarly: > mv /a/b/c/file /a/b/x/y/file > quota enforce should happen only till dir 'b' > Change-Id: Ia1e5363da876c3d71bd424e67a8bb28b7ac1c7c1 > BUG: 1153964 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/8940 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I2c814018d17f7af1807c1d1d162d8bdcbb31e491 BUG: 1153964 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9419 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* quota: For a rename operation, do quota_check_limit only till thevmallika2014-12-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | common ancestor of src and dst file Example: set quota limit set to 1GB on / create a file /a1/b1/file1 of 600MB mv /a1/b1/file1 /a1/b1/file2 This rename fails as it takes delta into account which sums up to 1.2BG. Though we are not creating new file, we still get quota exceeded error. So quota enforce should happen only till b1. Similarly: mv /a/b/c/file /a/b/x/y/file quota enforce should happen only till dir 'b' Change-Id: Ia1e5363da876c3d71bd424e67a8bb28b7ac1c7c1 BUG: 1153964 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/8940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota: Send the immediate parent with limit in quota statfs adjustmentVarun Shastry2014-05-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Assume the directory structure /quota_limit_dir/subdir and quota_limit_dir is set with some limit. When quota-deem-statfs is enabled the output of 'df /quota_limit_dir' would display quota modified values wrt to quota_limit_dir where as 'df /quota_limit_subdir/subdir' would display the quota modified values wrt volume root (/). This behaviour is not expected since, when mounted with subdirectory admin doesn't want users to know information above the subdirectory mounted. Solution: Any subdirectory within a quota_limit_dir would show the modified values as in the /quota_limit_dir. It searches for the nearest parent that has quota limit set and modifies the statvfs wrt that. Change-Id: Ie10fae8999bddbb766b1dbeb881723ed80dce688 BUG: 1080296 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/7330 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota: remove in-memory accounting of files in enforcerRaghavendra G2014-01-251-20/+26
| | | | | | | | | | | | | | | Accounting was done in enforcer (though marker is the ultimate source of truth) to offset cached directory size becoming stale. However, with enforcer being moved to brick we can no longer maintain correct cluster wide size for a directory. Hence removing accounting code from enforcer. Change-Id: I5ea94234da4da85ed5f5ced1354d8de3454b3fcb BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6434 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* quota: get directory size before enforcing quota on renameKrishnan Parthasarathi2014-01-201-0/+3
| | | | | | | | | | Change-Id: If18cab5992ddc91457782786942971deb1b51ead BUG: 1023974 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6155 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: make writes short when the entire write cannot fit into ↵Raghavendra G2013-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | available space. This patch aims to prevent creation of infinite zero byte sized files due to amount of storage available before exceeding quota limit being less than write sizes. Imagine x bytes of storage is available before we exceed quota limit and quota enforcer is receiving writes of size y and (y > x). In this scenario, if we run a shell script like: # for i in $(seq 1 10); do dd if=/dev/zero of=$i bs=y count=1; done Then, we would end up with 10 zero byte sized files, because we allow only complete writes and all writes will fail because of lack of space. However, creates succeed since a create itself will consume zero bytes. In this pattern of creates and writes, size of volume would never grow and x bytes of space will always be available and we can end up with an infinite number of zero byte sized files. Change-Id: Ice148d6a2207883e41759f7b0be73abaa3198b41 BUG: 1012216 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6035 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: Improvements to quotaRaghavendra G2013-11-261-38/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Two stages of quota enforcement is done: Soft and hard quota Upon reaching soft quota limit on the directory it logs/alerts in the quota daemon log (ie DEFAULT_LOG_DIR/quotad.log) and no more writes allowed after hard quota limit. After reaching the soft-limit the daemon alerts the user/admin repeatively for every 'alert-time', which is configurable. * Quota enforcer is moved to server-side. It takes care of enforcing quota. Since enforcer doesn't have the cluster view, it relies on another service called quota-aggregator. Aggregator, on query can return the size of a directory based on the cluster view. Enforcer is always loaded in the server graph and is by passed if the feature is not enabled. Options specific to enforcer: server-quota - Specifies whether the feature is on/off. It is used to by pass the quota if turned off. deem-statfs - If set to on, it takes quota limits into consideration while estimating fs size. (df command). The algorithm followed is, 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. Enforcer also makes use of gfid-to-path conversion functionality to work correctly when a client like nfs predominently relies on nameless lookups. * Quota Aggregator acts as a thin client to provide cluster view Its a lightweight *gluster client* process with no mount point, started upon enabling quota or restarting the volume. This is a single process run on each brick, which can answer queries on all volumes in the cluster. Its volfile stored in GLUSTERD_DEFAULT_WORKING_DIR/quotad/quotad.vol. Credits: Raghavendra Bhat <rabhat@redhat.com> Varun Shastry <vshastry@redhat.com> Shishir Gowda <sgowda@redhat.com> Kruthika Dhananjay <kdhananj@redhat.com> Brian Foster <bfoster@redhat.com> Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: Id1cb25b414951da34c665a55f77385d482e0f9de BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/5952 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: Add option to consider the quota limit in statfs estimationVarun Shastry2013-02-191-0/+1
| | | | | | | | | | | | | | | Adds an option, features.quota-deem-statfs (default off) to consider the quota limits while calculating the volume stats. Eg: Backend is of size 10GB and limit set on / is 5GB. If the option is off df show actual size to be 10GB and when it is on df shows 5GB. Change-Id: Ib30733bb69afecce1dea9d0491af89d551d214cc BUG: 905425 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4511 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: Avoid mem_put on null localPranith Kumar K2012-09-171-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: QUOTA_STACK_UNWIND does not check if local is NULL before mem_put. This leads to a callingfn log for every setxattr in quota. Fix: Made sure the mem_put happens only on non-null local in quota. Additional changes: Removed unused QUOTA_STACK_DESTROY macro. Tests: Peformed setfattr on the mount point and the Invalid argument logs don't come anymore. Checked that the change does not introduce any memory leak in quota. Change-Id: Ie4534c7af0fff80e35d8510311055f930262594f BUG: 856541 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3936 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-09-131-7/+6
| | | | | | | | | | | | License message changed for server-side, dual license GPLV2 and LGPLv3+. Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-08-281-14/+5
| | | | | | | | | | | | | | | | | | The license message is changed to Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. This file is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3858 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: update inode ctx in reconfigure.Raghavendra G2012-04-271-4/+6
| | | | | | | | | | | | | | | | | Till this patch, quota was relying on lookups after reconfigure, for new limits to be effective. However, this might be restrictive for users who don't want to change directories after resetting quota limits. Change-Id: I236aa31fdc7dcbc01d40d38c9b5b7b0a28a4d2ea BUG: 802905 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3022 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: utilize mempool for frame->local allocationsAmar Tumballi2012-02-211-7/+1
| | | | | | | | | | | | | | | in each translator, which uses 'frame->local', we are using GF_CALLOC/GF_FREE, which would be costly considering the number of allocation happening in a lifetime of 'fop'. It would be good to utilize the mem pool framework for xlator's local structures, so there is no allocation overhead. Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: remove 'ino' variable from 'inode_t' structureAmar Tumballi2011-11-161-1/+1
| | | | | | | | Change-Id: I0f078d1753db65d2f2e0380d1b0450c114cf40dd BUG: 3518 Reviewed-on: http://review.gluster.com/522 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: I2d10f2be44f518f496427f257988f1858e888084 BUG: 3348 Reviewed-on: http://review.gluster.com/200 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: I3914467611e573cccee0d22df93920cf1b2eb79f BUG: 3348 Reviewed-on: http://review.gluster.com/182 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* features/quota: use signed type to store delta.Raghavendra G2011-04-111-1/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2604 (Quota: crossing the set limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2604
* features/quota: Fix race-condition while resuming stub.Raghavendra G2011-04-101-1/+1
| | | | | | | | | | | | | | | | | | - call-stub is resumed in fops calling quota_check_limit and quota_check_limit when validate_count is zero, indicating no pending validates. During validates, validate_count was decremented in quota_validate_cbk, but check for validate_count being zero was done in quota_check_limit (which is called by quota_validate_cbk). Hence there is a time window b/w decrementing validate_count in quota_validate_cbk and checking whether validate_count is zero in quota_check_limit, during which if the control is passed to code in fop checking for validate_count being zero, same stub will be resumed twice - once in fop and once in quota_check_limit. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2686 ([glusterfs-3.2.0qa8]: nfs server crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2686
* features/quota: Use appropriate inodes while logging and create contexts in ↵Junaid2011-03-311-8/+0
| | | | | | | | | | | | inode for files. - It also fixes limit checks if limit set in the directory. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2604 (Quota: crossing the set limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2604
* features/quota: Return dynamically allocated address of local.Junaid2011-03-261-1/+0
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* features/quota: Client side quota.Raghavendra G2011-03-221-0/+184
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473