summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
Commit message (Collapse)AuthorAgeFilesLines
* core: utilize mempool for frame->local allocationsAmar Tumballi2012-02-213-15/+15
| | | | | | | | | | | | | | | 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>
* features/quota: fix a crash in fgetxattr() by checking for NULL argAmar Tumballi2012-02-141-1/+1
| | | | | | | | | | | | 'name' can be NULL in getxattr() as it is overloaded in glusterfs code to support listxattr() too. Change-Id: I70ccee027828e9b2b08da770f513c4edc5c7a46b BUG: 772601 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/2743 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: add an extra flag to readv()/writev() APIAmar Tumballi2012-02-141-6/+6
| | | | | | | | | | | | needed to implement a proper handling of open flag alterations using fcntl() on fd. Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2723 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/marker,quota: Incorporate changes to support nameless lookupRaghavendra Bhat2012-02-021-0/+3
| | | | | | | | | | Change-Id: Ic5f00a9891bd835ebee5a3e103ef0f75d0b7fc25 BUG: 783925 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2702 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/quota: Check for error in statfs fop call back.Mohammed Junaid2012-01-271-0/+5
| | | | | | | | | | Change-Id: Ia73d2b77dcb0507a7b8362c336c71301526aaf82 BUG: 783927 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/2685 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: get xattrs also as part of readdirpAmar Tumballi2012-01-251-1/+43
| | | | | | | | | | | | | readdirp_req() call sends a dict_t * as an argument, which contains all the xattr keys for which the entries got in readdirp_rsp() are having xattr value filled dictionary. Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 765785 Reviewed-on: http://review.gluster.com/771 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* core/setxattr: prevent users from setting glusterfs xattrsRajesh Amaravathi2012-01-141-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | * Each xlator prevents the user from setting glusterfs-internal xattrs like trusted.gfid by handling it in respective setxattr functions. The speacial case of trusted.gfid is handled in fuse (Not in posix because posix_setxattr is used to set gfid). * For xlators which did not define setxattr and/or fsetxattr, the functions have been implemented with appropriate checks. xlator | fops-added _______________|__________________________ | 1. afr | fsetxattr 2. stripe | setxatrr and fsetxattr 3. quota | setxattr and fsetxattr Change-Id: Ib62abb7067415b23a708002f884d30e8866fbf48 BUG: 765487 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/685 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* Changes all parent values for quota_check_limitRahul C S2011-12-051-15/+20
| | | | | | | | | | | | and quota_update_size from 0x0 to NULL to make sure uuid_copy happens between pointers Change-Id: I73ef5f9054f972fce00b8f42125dc49c9d86c3f2 BUG: 3830 Reviewed-on: http://review.gluster.com/756 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* core: remove 'ino' variable from 'inode_t' structureAmar Tumballi2011-11-162-134/+97
| | | | | | | | 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>
* Reflect quota-adjusted values in statfs.Jeff Darcy2011-11-161-0/+98
| | | | | | | | Change-Id: I7a2a0b1ad0aa2a972aad9712658083c61052bef2 BUG: 3813 Reviewed-on: http://review.gluster.com/675 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@gluster.com>
* build: warning suppression (round n)Amar Tumballi2011-10-201-0/+5
| | | | | | | | | | with this patch, there are no more warnings with gcc (GCC) 4.6.1 20110908 Change-Id: Ice0d52d304b9846395f8a4a191c98eb53125f792 BUG: 2550 Reviewed-on: http://review.gluster.com/607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Second round of warning suppression.Jeff Darcy2011-09-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | Used a #pragma to kill ~170 in rpcgen code. Added GF_UNUSED to deal with a few more from macros elsewhere. The remainder are function return values (mostly context and dict calls) that really should be checked. Those would be harder to fix without real understanding of the code where they occur, so they remain as reminders. (Patchset 2: deal with older gcc that doesn't handle #pragma GCC diagnostic) (Patchset 3: fix include paths in generated files) (Patchset 4: keep up with trunk, squash 9 new warnings) (Patchset 5: six more, all in AFR) Change-Id: I29760c8c81be4d7e6489312c5d0e92cc24814b7b BUG: 2550 Reviewed-on: http://review.gluster.com/378 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/quota: implement mknod fop.Raghavendra G2011-09-141-0/+142
| | | | | | | | Change-Id: If8f2a0bb635160ee78f35787ee9f8a4db87ae8ac BUG: 3531 Reviewed-on: http://review.gluster.com/384 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@gluster.com>
* Eliminate many "var set but not used" warnings with newer gcc.Jeff Darcy2011-09-071-10/+0
| | | | | | | | | | | | | | | | This fixes ~200 such warnings, but leaves three categories untouched. (1) Rpcgen code. (2) Macros which set variables in the outer (calling function) scope. (3) Variables which are set via function calls which may have side effects. Change-Id: I6554555f78ed26134251504b038da7e94adacbcd BUG: 2550 Reviewed-on: http://review.gluster.com/371 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* xlator options: revamp xlator option validation/reconfigure codeAnand Avati2011-08-181-65/+11
| | | | | | | | | | | | | | | | | - move option handling to options.c (new file) - remove duplication of option validation code - remove duplication of gf_log / sprintf - get rid of xlator_t->validate_options - get rid of option validation in rpc-transport - get rid of validate_options() in every xlator - use xlator_volume_option_get to clean up many functions - introduce primitives to init/reconfigure option types Change-Id: I51798af72c8dc0a2b9e017424036eb3667dfc7ff BUG: 3415 Reviewed-on: http://review.gluster.com/235 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-103-3/+3
| | | | | | | | 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-063-9/+9
| | | | | | | | 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>
* quota: changes in volume_options to assist volume set help/help-xmlKaushik BV2011-07-121-8/+25
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* quota: update limit stored in inode-ctx when limit is removed on a directory.Raghavendra G2011-07-111-2/+7
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2971 (quota remove command doesn't remove quota on directories.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2971
* features/quota: Print a log when reconfigure fails.Junaid2011-06-201-5/+8
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2775 (crash in reconfigure) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2775
* features/quota: after validation on a path, reset variable just_validated to ↵Raghavendra G2011-06-161-6/+11
| | | | | | | | | | zero before checking the size of parent. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2741 (Quota: new files not getting created even if space is available) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2741
* prevent few excessive logsAmar Tumballi2011-04-211-4/+6
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* quota: do not assign frame->local to NULL which leads to memleakRaghavendra Bhat2011-04-161-1/+0
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2772 ([glusterfs-3.2.0qa12]: excessive quota local NULL errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2772
* quota: assign local to frame local to prevent memleakRaghavendra Bhat2011-04-161-0/+6
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2772 ([glusterfs-3.2.0qa12]: excessive quota local NULL errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2772
* features/quota: set 'frame->local' to local in fsyncAmar Tumballi2011-04-161-0/+2
| | | | | | | | | | so fsync call can succeed Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2772 ([glusterfs-3.2.0qa12]: excessive quota local NULL errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2772
* features/quota: use disk usage instead of file-sizes.Raghavendra G2011-04-151-15/+15
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2760 (Quota: stripe volume not showing the quota size properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2760
* quota: resume the stub when its not NULLRaghavendra Bhat2011-04-141-1/+1
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2758 ([glusterfs-3.2.0qa11]: symlink hangs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2758
* quota/(f)truncate: pass correct delta for updating parent sizes after ↵Raghavendra G2011-04-141-4/+4
| | | | | | | | | | successful completion. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2741 (Quota: new files not getting created even if space is available) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2741
* features/quota: update quota-limit stored in directory contexts after ↵Raghavendra G2011-04-131-0/+4
| | | | | | | | | | reconfigure. 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: check for proper return value in case failure of dict_get_binRaghavendra G2011-04-121-1/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2723 ([glusterfs-3.2.0qa11]: glusterfs client crashed in quota_validate_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2723
* features/quota: add error checks for failure of quota_inode_loc_fill.Raghavendra G2011-04-121-8/+34
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2727 ([glusterfs-3.2.0qa11]: nfs server crashed in quota_check_limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2727
* quota: assign frame->local to local before checking op_retRaghavendra Bhat2011-04-121-1/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2733 ([glusterfs-3.2.0qa11]: nfs server crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2733
* features/quota: Validate the quota options. and donot include into the ↵Junaid2011-04-121-0/+28
| | | | | | | | | | client volfile. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2541 (insufficient option validation in quota translator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2541
* features/quota: Adding the option "timeout" to quota.Junaid2011-04-111-0/+22
| | | | | | | | | | This option tells the quota translator when to perform the next aggregation. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@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: handle failed fops gracefully.Raghavendra G2011-04-111-11/+39
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2701 ([6db2b422f05d0553d0a83af603ae4d176b41cbdf]: crash in quota_readlink_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2701
* features/quota: Add checks for any of the parents of file being NULL while ↵Raghavendra G2011-04-111-0/+11
| | | | | | | | | | checking limits. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2685 (nfs server crashed in quota_check_limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2685
* features/quota: use signed type to store delta.Raghavendra G2011-04-112-9/+9
| | | | | | | | 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
* buf and statpost should be checked for NULL before accessing itRaghavendra Bhat2011-04-111-3/+6
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2701 ([6db2b422f05d0553d0a83af603ae4d176b41cbdf]: crash in quota_readlink_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2701
* features/quota: Fix race-condition while resuming stub.Raghavendra G2011-04-102-38/+87
| | | | | | | | | | | | | | | | | | - 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: Add checks for any of the parents of file being NULL while ↵Raghavendra G2011-04-081-9/+19
| | | | | | | | | | checking limits. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2685 (nfs server crashed in quota_check_limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2685
* do not access the empty loc inodev3.2.0qa9Raghavendra Bhat2011-04-071-2/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2611 ([glusterfs-3.1.0-qa5]: crash in quota_rename) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2611
* do not change the arguments of a functionRaghavendra Bhat2011-04-071-9/+8
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2685 (nfs server crashed in quota_check_limit) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2685
* check buf for NULL before accessing itv3.2.0qa8Raghavendra Bhat2011-04-061-1/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2675 ([glusterfs-3.2.0qa7]: glusterfs client crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2675
* features/quota: use a double pointer to uint64_t as an argument to ↵Raghavendra G2011-04-051-2/+2
| | | | | | | | | | dict_get_bin while getting size. Signed-off-by: Raghavendra G <raghavendra@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: add NULL check before doing strcasecmpRaghavendra G2011-04-051-1/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2646 (glusterfs-client crashes during getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2646
* features/quota: Use appropriate inodes while logging and create contexts in ↵Junaid2011-03-312-131/+144
| | | | | | | | | | | | 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
* access the proper loc structure when inode ctx get fails in quotaRaghavendra Bhat2011-03-301-2/+2
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2611 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2611
* features/quota: Return dynamically allocated address of local.Junaid2011-03-262-8/+3
| | | | | | | | 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-224-2/+2807
| | | | | | | | 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
* features/quota: removed quota.c and quota-mem-types.h files.Raghavendra G2011-03-222-1238/+0
| | | | | | | | 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