summaryrefslogtreecommitdiffstats
path: root/xlators/features
Commit message (Collapse)AuthorAgeFilesLines
* features/quota: don't adjust statfs buffer if size used is alreadyRaghavendra G2012-04-121-8/+15
| | | | | | | | | | | | | | | | greater than available limit. members f_bfree and f_bavail of struct statfs are unsigned types. A negative value assigned to them is interpreted as some positive number and resulting in incorrect output of df output. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: I4d3d38b9bb6f675958ee38ad4d6c71ebcf4bb9a1 BUG: 773530 Reviewed-on: http://review.gluster.com/3102 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Fix compiler warnings and typos from Debian build.Jeff Darcy2012-04-101-1/+1
| | | | | | | | | | | | | Mostly to do with "-Werror=format-security" being buggy, but while we're here we might as well fix some typos and such. Credit goes to Patrick Matthäi <pmatthaei@debian.org> for pointing these out. Change-Id: Ia32d1111d7c10b1f213df85d86b17a1326248ffd BUG: 811387 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3117 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: shuffle directory entries in crawlCsaba Henk2012-04-051-0/+2
| | | | | | | | | | | In order to randomize the walk of the file tree. Change-Id: I9fc3b83d5804914a50faae8df7dbcfed2ba6f4b4 BUG: 809675 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3079 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* locks, stripe: check if dict is NULL before refing itRaghavendra Bhat2012-04-031-1/+2
| | | | | | | | | Change-Id: Ifab58504280ed92e4435f7805052745e56bef5ef BUG: 808003 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3073 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* quota: log msgs indicating NULL parent inode in DEBUG level.Raghavendra G2012-04-032-6/+6
| | | | | | | | | | | | with name-less lookups its common to hit situations where parent inode is NULL. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: I980b14c3d4691e850ae15768f73cf1b7d867e930 BUG: 809032 Reviewed-on: http://review.gluster.com/3071 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/locks: INIT the list before insert_mergePranith Kumar K2012-03-311-0/+1
| | | | | | | | | | Change-Id: I1612565e2bbf1811a85341016b86571bdf6e5062 BUG: 805994 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3047 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/locks: check whether dict is NULL before refing itRaghavendra Bhat2012-03-291-1/+6
| | | | | | | | | Change-Id: I8906b80e584466aceb5a7402e3cee6ac2a552fab BUG: 808003 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3036 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* core: adding extra data for fopsAmar Tumballi2012-03-2219-887/+966
| | | | | | | | | | | | | with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Avoid race in pl_inode_getPranith Kumar K2012-03-211-21/+25
| | | | | | | | | Change-Id: I6c7b878fb43863137aac6552ee66f091534a6296 BUG: 770080 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2998 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Avoid race in creating domainsPranith Kumar K2012-03-212-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thread:1 | Thread:2 ----------------------------------------- 1) Does inodelk on inode1| 1) Does inodelk on inode1 2) It tries to get the | 2) It tries to get the dom object for the volume| dom object for the volume volname-replicate-0. But | volname-replicate-0. But the domain list is empty.| the domain list is empty. 3) Create the new domain | dom1 and add it to head | of the list of domains. | 4) inodelk happens on | 3) Create the new domain dom1 on range r1. | dom2 and add it to head | of the list of domains. | 4) inodelk happens on dom2 on range r2 5) unlock for r1 comes | 5) Unlock on r2 succeeds. on inode1. | 6) It tries to get the | domain, of the inodelk | for volume | volname-replicate-0, gets| dom2 but the lock on | range r1 is not present | so it fails. | subsequent inode lock, unlocks will keep happening on the domain dom2. The stale lock present in the dom1 on range r1 will live on. It wont cause any hangs, but the statedump will always be scary. Change-Id: I9adc120d33febf685b30859cc307768c2fc63ae5 BUG: 770080 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2993 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/marker: Replacing -1 with GF_CLIENT_PID_GSYNCD as part of code cleanup.Mohammed Junaid2012-03-201-1/+1
| | | | | | | | | Change-Id: Ia665060bff636b372904a726aba5249de9ade124 BUG: 769494 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/2971 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* features/quota : Fix timeout min valueKaushal M2012-03-191-1/+1
| | | | | | | | | | | | | Change timeout min value to 0, so that default value of 0 successfully validates and mounts happen properly. Change-Id: I579c6192b97ffe2678fa95c912679b514fa7d8c0 BUG: 804509 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Logs: Improved logs in lock/unlock execution pathPranith Kumar K2012-03-181-5/+9
| | | | | | | | | | | Statedump will now start showing the lk-owner of the stack. Change-Id: I9f650ce9a8b528cd626c8bb595c1bd1050462c86 BUG: 803209 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2968 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd : volume set validation fixesKaushal M2012-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the new version of the patch by Kaushik at review.gluster.com/699 The following new option types have been introduced: * GF_OPTION_TYPE_INTERNET_ADDRESS_LIST * GF_OPTION_TYPE_PRIORITY_LIST * GF_OPTION_TYPE_SIZE_LIST and option types of several options in translators have been updated to use the new types. valid_internet_address(), valid_ipv4_address() & valid_ipv6_address() functions has been updated for * wildcard matching. Previously used standalone wildcard address checking functions have been removed. Changes have been done to stripe translator to correctly set, update and use stripe-blocksize. Also minimum value for block-size has been set to 16KB. Change-Id: I2aa484ff695f6a915a8fc9a9f965cf0344f41d59 BUG: 765248 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2899 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* locks: Fixed incorrect list ptr manipulation in clearing entrylksKrishnan Parthasarathi2012-03-141-17/+25
| | | | | | | | | | | Avoided unwinding blocked entry lock frames inside pl_inode->mutex. Change-Id: I424c4a1762c889c1a567c588d4ca383a6c338886 BUG: 800412 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2878 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/marker: Nameless lookup related fixesRaghavendra G2012-03-141-11/+13
| | | | | | | | | | | | while filling a loc structure, marker should not error out if loc->name is NULL or loc->path is just a gfid. Change-Id: Ie3a9cffde2d17da0377f1e41de93b099a9133abe BUG: 801364 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2938 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/quota: store quota context even for the cases where loc.nameRaghavendra G2012-03-121-3/+3
| | | | | | | | | | | | | | is NULL with name-less lookups, loc.name is NULL. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: Ie3914924896c90a7fb7251cb0184c8e561ef7f4f BUG: 801364 Reviewed-on: http://review.gluster.com/2917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Make inodelk ref-countedPranith Kumar K2012-03-105-47/+71
| | | | | | | | | | | | | | | Ref when the object is allocated. Unref after the response is submitted to that inodelk. Ref when the lock is granted. Unref when the lock is unlocked. Change-Id: I2bfe9182b67bea7dc7b9d0ed9f99f1c7fa0b8a3c BUG: 783449 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2891 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cleanup and fix xattr namespace flipCsaba Henk2012-03-071-1/+1
| | | | | | | | | | | | | | | | - function of actual flipping made static - clean out references to particular namespaces from flipping logic - namespaces involved in flipping defined at single location - fix fnmatch(3) invocation with reversed pattern and string arguments - instead of "user", use "system" to flip from, because latter is free from supervision of the VFS layer (cf. attr(5)) Change-Id: I3cc5836fadcad5b237fd5c67d0dcaea63aee9164 BUG: 798716 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/2890 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* features/marker: GFID file handle based backend related fixesv3.3.0qa26Raghavendra G2012-03-072-2/+5
| | | | | | | | | | | | * make sure loc->gfid is filled. Change-Id: I5304e650d9fc181ee1f3b65be7f2ff3847d9722e BUG: 790389 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* fops/removexattr: prevent users from removing glusterfs xattrsRajesh Amaravathi2012-03-051-24/+91
| | | | | | | | | | | | | | | | | | | | | | | * Each xlator prevents the user from removing xlator-specific xattrs like trusted.gfid by handling it in respective removexattr functions. * For xlators which did not define remove and fremovexattr, the functions have been implemented with appropriate checks. xlator | fops-added _______________|__________________________ | 1. stripe | removexattr and fremovexattr 2. quota | removexattr and fremovexattr Change-Id: I98e22109717978134378bc75b2eca83fefb2abba BUG: 783525 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* geo-rep / syncdaemon: determine suitable xattr namespace based on privilegeCsaba Henk2012-03-052-6/+7
| | | | | | | | | Change-Id: I91fe16d7e5e4c21f138eab4ee0b9334aec40e41b BUG: 765433 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/2838 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* geo-rep / syncdaemon: make the timeout for establishing the connection to ↵Csaba Henk2012-03-012-1/+2
| | | | | | | | | | | | | | slave configurable It can be set through the connection-timeout tunable but we keep it hidden, intended as a workaround for some special scenarios not for general use. Change-Id: I31f9fa3873afa7babc2106ee34484123a01bdc57 BUG: 789078 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/2839 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* locks/glusterd: Fixed clearing of posix locks from failing always.Krishnan Parthasarathi2012-02-271-0/+1
| | | | | | | | | Change-Id: Ieaf636c6f0d2aa1d001143a2d1433fce85dc8c7a BUG: 797042 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2812 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* locks: Made dump locks formatting more 'readable'.Krishnan Parthasarathi2012-02-242-18/+39
| | | | | | | | | | | | | | Also, Added inode's path to dump locks. Added basename to entrylk dump output. Added whence field of range locks to dump output. Change-Id: Ifd3f8b585a52de7ff68cd54506619ac3eaedeecc BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/marker: Use loc.inode to obtain parent if loc.parent isn't set.Vijay Bellur2012-02-221-1/+13
| | | | | | | | | Change-Id: I89dddb19168a3ffb269afc9f6bcb2d7e7c9a69cd BUG: 790389 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2802 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
* mempool: adjustments in pool sizesAmar Tumballi2012-02-225-5/+5
| | | | | | | | | | | | | | | | | * while creating 'rpc_clnt', the caller knows what would be the ideal load on it, so an extra argument to set some pool sizes * while creating 'rpcsvc', the caller knows what would be the ideal load of it, so an extra argument to set request pool size * cli memory footprint is reduced Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2784 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/locks: Don't access free'd memoryPranith Kumar K2012-02-221-3/+4
| | | | | | | | | Change-Id: I4e22ede84622f2c9c46cc0bc9f17bef73afa815c BUG: 796069 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2791 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/index: Set correct ret value in index_addPranith Kumar K2012-02-211-0/+2
| | | | | | | | | Change-Id: I6314ea25ef26920593a3113eb2951d18255db34f BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2786 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/index: Fix fd leakPranith Kumar K2012-02-211-2/+5
| | | | | | | | | Change-Id: Ib01d03999b099369674495ce500f48d492758f91 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2781 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: utilize mempool for frame->local allocationsAmar Tumballi2012-02-2114-101/+101
| | | | | | | | | | | | | | | 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/index: Add release, releasedir cbksPranith Kumar K2012-02-211-1/+40
| | | | | | | | | Change-Id: Ice45a0b4e953e270273aa4155a895d6ec033fda8 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2780 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/index: Index translator implementationPranith Kumar K2012-02-206-1/+1250
| | | | | | | | | | Change-Id: If8a11ecbdd010f64fb4409add5751080f4b59086 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* NLM - Network Lock Manger V4Krishna Srinivas2012-02-201-0/+27
| | | | | | | | | Change-Id: Ic31b8bb10a28408da2a623f4ecc0c60af01c64af BUG: 795421 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2711 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* features/marker: copy the gfid to loc from oplocal->loc.inodev3.3.0qa22Raghavendra Bhat2012-02-141-0/+1
| | | | | | | | | Change-Id: I8cfb70c163a3c4a0bd682678f71b38b5bae20ab4 BUG: 790393 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2750 Reviewed-by: Vijay Bellur <vijay@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* locks: Added a getxattr interface to clear locks on a given inode.Krishnan Parthasarathi2012-02-144-6/+612
| | | | | | | | | | | | | | | | getxattr returns a summary of no. of inodelks/entrylks cleared. cmd_structure: trusted.glusterfs.clrlk.t<type>.k<kind>[.{range|basename}] where, type = "inode"| "entry"| "posix" kind = "granted"| "blocked" | "all" range = off,a-b, where a, b = 'start', 'len' from offset 'off' Change-Id: I8a771530531030a9d4268643bc6823786ccb51f2 BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2551 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.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>
* features/marker: set loc->gfid in setxattr initiated from marker.Vijay Bellur2012-02-141-6/+23
| | | | | | | | | Change-Id: I7abb62272b7c8bb25ad37cbc13da7b4713924b7a BUG: 787151 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2736 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* core: add an extra flag to readv()/writev() APIAmar Tumballi2012-02-148-35/+39
| | | | | | | | | | | | 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>
* geo-rep: gsyncd: fix up fallback xtime for orphans on master sideCsaba Henk2012-02-071-7/+8
| | | | | | | | | | Change-Id: I2fa543b4bd317e06ea621ae968300ffb7223a68a BUG: 771787 Signed-off-by: Csaba Henk <csaba@gluster.com> Reviewed-on: http://review.gluster.com/2580 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushik BV <kaushikbv@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/marker,quota: Incorporate changes to support nameless lookupRaghavendra Bhat2012-02-024-1/+86
| | | | | | | | | | 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>
* geo-rep: gsyncd: Python3 compat fixesVenky Shankar2012-01-261-3/+4
| | | | | | | | | | Change-Id: I2eef82faab3eed1189e3786a5dca296773e1caa0 BUG: 784498 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/2690 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* core: get xattrs also as part of readdirpAmar Tumballi2012-01-255-7/+159
| | | | | | | | | | | | | 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: change lk-owner as a 1k bufferAmar Tumballi2012-01-248-137/+138
| | | | | | | | | | | | | so, NLM can send the lk-owner field directly to the locks translators, while doing the same effort, also enabled sending maximum of 500 aux gid over protocol. Change-Id: I87c2514392748416f7ffe21d5154faad2e413969 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 767229 Reviewed-on: http://review.gluster.com/779 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* core: GFID filehandle based backend and anonymous FDsAnand Avati2012-01-201-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. What -------- This change introduces an infrastructure change in the filesystem which lets filesystem operation address objects (inodes) just by its GFID. Thus far GFID has been a unique identifier of a user-visible inode. But in terms of addressability the only mechanism thus far has been the backend filesystem path, which could be derived from the GFID only if it was cached in the inode table along with the entire set of dentry ancestry leading up to the root. This change essentially decouples addressability from the namespace. It is no more necessary to be aware of the parent directory to address a file or directory. 2. Why ------- The biggest use case for such a feature is NFS for generating persistent filehandles. So far the technique for generating filehandles in NFS has been to encode path components so that the appropriate inode_t can be repopulated into the inode table by means of a recursive lookup of each component top-down. Another use case is the ability to perform more intelligent self-healing and rebalancing of inodes with hardlinks and also to detect renames. A derived feature from GFID filehandles is anonymous FDs. An anonymous FD is an internal USABLE "fd_t" which does not map to a user opened file descriptor or to an internal ->open()'d fd. The ability to address a file by the GFID eliminates the need to have a persistent ->open()'d fd for the purpose of avoiding the namespace. This improves NFS read/write performance significantly eliminating open/close calls and also fixes some of today's limitations (like keeping an FD open longer than necessary resulting in disk space leakage) 3. How ------- At each storage/posix translator level, every file is hardlinked inside a hidden .glusterfs directory (under the top level export) with the name as the ascii-encoded standard UUID format string. For reasons of performance and scalability there is a two-tier classification of those hardlinks under directories with the initial parts of the UUID string as the directory names. For directories (which cannot be hardlinked), the approach is to use a symlink which dereferences the parent GFID path along with basename of the directory. The parent GFID dereference will in turn be a dereference of the grandparent with the parent's basename, and so on recursively up to the root export. 4. Development --------------- 4a. To leverage the ability to address an inode by its GFID, the technique is to perform a "nameless lookup". This means, to populate a loc_t structure as: loc_t { pargfid: NULL parent: NULL name: NULL path: NULL gfid: GFID to be looked up [out parameter] inode: inode_new () result [in parameter] } and performing such lookup will return in its callback an inode_t populated with the right contexts and a struct iatt which can be used to perform an inode_link () on the inode (without a parent and basename). The inode will now be hashed and linked in the inode table and findable via inode_find(). A fundamental change moving forward is that the primary fields in a loc_t structure are now going to be (pargfid, name) and (gfid) depending on the kind of FOP. So far path had been the primary field for operations. The remaining fields only serve as hints/helpers. 4b. If read/write is to be performed on an inode_t, the approach so far has been to: fd_create(), STACK_WIND(open, fd), fd_bind (in callback) and then perform STACK_WIND(read, fd) etc. With anonymous fds now you can do fd_anonymous (inode), STACK_WIND (read, fd). This results in great boost in performance in the inbuilt NFS server. 5. Misc ------- The inode_ctx_put[2] has been renamed to inode_ctx_set[2] to be consistent with the rest of the codebase. Change-Id: Ie4629edf6bd32a595f4d7f01e90c0a01f16fb12f BUG: 781318 Reviewed-on: http://review.gluster.com/669 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>
* features/marker: xtime should not be updated for modifications done by ↵Junaid2012-01-041-1/+7
| | | | | | | | | | | | | special client. Change-Id: Ia577422dedb94a1febeceb2a50cabf61d48cb714 BUG: 769494 Signed-off-by: Junaid <junaid@gluster.com> Reviewed-on: http://review.gluster.com/2559 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushik BV <kaushikbv@gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Csaba Henk <csaba@gluster.com>
* features/locks: Fix release of locks on disconnectPranith Kumar K2011-12-221-22/+17
| | | | | | | | | | | | | When a disconnect comes on a transport, all the locks on that transport should be cleared irrespective of entry presence. Change-Id: I1c432ec1ddc8fe3f7bf236992f47437d0dacd6ae BUG: 765430 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/808 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@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>