summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: release notes for GlusterFS 3.5.9v3.5.9release-3.5Niels de Vos2016-03-121-0/+56
| | | | | | | | | | BUG: 1306988 Change-Id: Iae465e6a35d475f3824e493036f4787802aacb26 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/13685 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd: fix glusterd_add_inode_size_to_dict to avoid glusterd to crashAtin Mukherjee2016-03-111-23/+26
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/8134/ http://review.gluster.org/#/c/8492/ There were couple of backports from mainline got missed and due to which glusterd crashes if the underlying file system doesn't fail under list of supported file systems. This patch takes care of handling this negative scenario. Reported-by: Michael Martel <michael.martel@vsc.edu> Change-Id: I6f601a4421869bbd7fc26e31f4ca4ffe075c0924 BUG: 1316116 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13661 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cli: Don't override cli mode when stdin in not a ttyNiels de Vos2016-03-112-1/+13
| | | | | | | | | | | | | | | | | | | Cherry picked from commit f139fc7e44da27670e90bd7ba55ff80e7c8b8ecd: > Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080 > BUG: 1047378 > Signed-off-by: Kaushal M <kaushal@redhat.com> > Reviewed-on: http://review.gluster.org/6687 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080 BUG: 1313968 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13648 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* gfapi: return EINVAL for unsupported lseek() operationsNiels de Vos2016-03-081-1/+9
| | | | | | | | | | | | | | | | | | | GlusterFS 3.8 contains support for SEEK_DATA/SEEK_HOLE. This protocol extension is not available in 3.5. libgfapi needs to handle unsupported SEEK_* operations correctly, by returning -1 and setting errno to EINVAL. This change is different from the patch in the master branch, it is only needed to do the improved error checking in this version. BUG: 1315559 Change-Id: I142dde11923244809b03fcca8cd4c2f7d5ff3929 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13634 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* doc: release notes for GlusterFS 3.5.8v3.5.8Niels de Vos2016-02-151-0/+56
| | | | | | | | | | BUG: 1290976 Change-Id: I5153a6fe6390247013609a249922bb8464bc7886 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13437 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* quota : fix could not start auxiliary mount issueManikandan Selvaganesh2016-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | In versions older than 3.7, when trying to enable quota, the following message appears :"quota: Could not start quota auxiliary mount". It was because, /var/run/gluster was not getting created in cli side. In 3.7, the code has been moved to glusterd and we are making use of sys_mkdir. 3.6 fix -> http://review.gluster.org/#/c/13308/ Change-Id: Id4360409f76b57c0f676fe2b859f3647c4340575 BUG: 1117888 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/13215 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
* quota : avoid "contribution node is empty" error logsManikandan Selvaganesh2016-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | In versions older than 3.7, "contribution node list is empty which is an error" gets logged numerous number of times. It is completely fixed in 3.7. Since the entire marker and quota code has almost been refactored, it is hard to backport the complete fix and also it could not be fixed with the older approach. As a temporary fix, to avoid numerous logs, the patch just supresses the log level. 3.6 Patch -> http://review.gluster.org/#/c/13304/ Change-Id: Ie666ba99c7bb16b9ce249b581e09857734589f51 BUG: 1288195 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12990 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
* build: update link for .git/hooks/commit-msgKaleb S KEITHLEY2016-01-151-3/+3
| | | | | | Add -L option to curl cmd to follow a redirect Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
* doc: release notes for GlusterFS 3.5.7v3.5.7Niels de Vos2015-12-121-0/+55
| | | | | | | | BUG: 1263307 Change-Id: I5570ddf98ddb130a72cb25443d0c13dccf6f1766 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12957 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd.service: Ensure rpcbind is started before glusterdNiels de Vos2015-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the rpcbind.service under the `After` option only ensures that glusterd.service is started after rpcbind.service if both are enabled/started at the same time. It doesn't ensure that starting glusterd.service will start rpcbind.service. The systemd.unit(5) man page suggests to use both the `Requires` and `After` options to ensure that rpcbind is started before glusterd, whenever glusterd is started. Cherry picked from commit 23440a73bc348bbc3bb43ec397f0639ee45865fc: > BUG: 1282915 > Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9 > Signed-off-by: Kaushal M <kaushal@redhat.com> > Reviewed-on: http://review.gluster.org/12605 > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9 BUG: 1283542 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12659 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: prevent use-after-free of frame->rootNiels de Vos2015-12-121-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression failure generated a coredump on the glusterfs-client side: (gdb) f 0 #0 0x00007fba6cd76432 in client_submit_request (this=0x7fba68006fc0, req=0x7fba6579aa70, frame=0x7fba5c0058cc, prog=0x7fba6cfb53c0 <clnt3_3_fop_prog>, procnum=41, cbkfn=0x7fba6cd9206d <client3_3_release_cbk>, iobref=0x0, rsphdr=0x0, rsphdr_count=0, rsp_payload=0x0, rsp_payload_count=0, rsp_iobref=0x0, xdrproc=0x7fba79801075 <xdr_gfs3_release_req>) at /home/jenkins/root/workspace/rackspace-regression-2GB-triggered/xlators/protocol/client/src/client.c:324 324 frame->root->ngrps = ngroups; (gdb) l 319 gf_msg_debug (this->name, 0, "rpc_clnt_submit failed"); 320 } 321 322 if (!conf->send_gids) { 323 /* restore previous values */ 324 frame->root->ngrps = ngroups; 325 if (ngroups <= SMALL_GROUP_COUNT) 326 frame->root->groups_small[0] = gid; 327 } 328 (gdb) p *frame->root Cannot access memory at address 0x64185df000000000 After looking at this in more detail, the flow is like this: client_submit_request() | '- rpc_clnt_submit() // on line 314 | '- cbkfn() // = client3_3_release_cbk | :- STACK_DESTROY (frame->root); .----' .----' | :- frame->root->ngrps = ngroups; // on line 324 ' So, there is a use-after-free, and it is not needed to restore the previous groups in frame->root. Cherry picked from commit dc3aa7524e4974f9d02465e2e5dd6ed9b6d319e1: > Change-Id: I9e7d712183692ed92cfc2f75cd3c2781a9db20e2 > BUG: 1281285 (was incorrect in original patch) > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/12575 > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: I9e7d712183692ed92cfc2f75cd3c2781a9db20e2 BUG: 1283691 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12666 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* doc: release notes for GlusterFS 3.5.6v3.5.6Niels de Vos2015-09-151-0/+56
| | | | | | | BUG: 1240783 Change-Id: I259f4d24ab5e7826ea304be9759f54b461853621 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12183
* build: drop incorrect usage of 'inline'Niels de Vos2015-07-237-18/+18
| | | | | | | | | | | | | | | | Newer versions of gcc complain loudly about the incorrect usage of 'inline'. These changes have been part of commit a3cb38e3 in other branches. There is no need to backport everything from that commit, but silencing the warnings would be good. Change-Id: I2319d9682b47e8533e9c179056a5152f75aeddc3 BUG: 1244147 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11711 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* nfs: a unix-domain-socket should not be created as fifoNiels de Vos2015-07-233-7/+63
| | | | | | | | | | | | | | | | | | Cherry picked from commit 381afd4f480533f212e1f62a0ccfd9dcf7248e17: > Change-Id: Ic6a23165df1703b330636a059967c3c674dbde57 > BUG: 1235231 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11355 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: Ic6a23165df1703b330636a059967c3c674dbde57 BUG: 1244118 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11710 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* doc: release notes for GlusterFS 3.5.5v3.5.5Niels de Vos2015-07-071-0/+57
| | | | | | | | | BUG: 1208083 Change-Id: I3559f6d03c049b55009fcd116c48b99a7434ab6c Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11568 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* nfs: make it possible to disable nfs.mount-rmtabNiels de Vos2015-07-076-47/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are many NFS-clients doing very often mount/unmount actions, the updating of the 'rmtab' can become a bottleneck and cause delays. In these situations, the output of 'showmount' may be less important than the responsiveness of the (un)mounting. By setting 'nfs.mount-rmtab' to the value "/-", the cache file is not updated anymore, and the entries are only kept in memory. Cherry picked from commit 40407afb529f6e5fa2f79e9778c2f527122d75eb: > Cherry picked from commit 331ef6e1a86bfc0a93f8a9dec6ad35c417873849: >> BUG: 1169317 >> Change-Id: I40c4d8d754932f86fb2b1b2588843390464c773d >> Reported-by: Cyril Peponnet <cyril@peponnet.fr> >> Signed-off-by: Niels de Vos <ndevos@redhat.com> >> Reviewed-on: http://review.gluster.org/9223 >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: soumya k <skoduri@redhat.com> >> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> >> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > > This change also contains the fixes to the test-case from: >> >> nfs: fix spurious failure in bug-1166862.t >> >> In some environments, "showmount" could return an NFS-client that does >> not start with "1". This would cause the test-case to fail. The check is >> incorrect, the number of lines should get counted instead. >> >> Also moving the test-case to the .../nfs/... subdirectory. >> >> Cherry picked from commit ee9b35a780607daddc2832b9af5ed6bf414aebc0: >> BUG: 1166862 >> Change-Id: Ic03aa8145ca57d78aea01564466e924b03bb302a >> Signed-off-by: Niels de Vos <ndevos@redhat.com> >> Reviewed-on: http://review.gluster.org/10419 >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Vijay Bellur <vbellur@redhat.com> >> > > Change-Id: I40c4d8d754932f86fb2b1b2588843390464c773d > BUG: 1215385 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/10379 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> GLUSTERD_WORKDIR has been added to tests/include.rc and is not configurable through ./configure like on newer branches. It is not suitable to change the GlusterD working directory in an update for a stable release. Change-Id: I40c4d8d754932f86fb2b1b2588843390464c773d BUG: 1166862 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11336 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* features/quota : Fix XML output for quota list commandvmallika2015-07-074-160/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/9481/ > Sample output: > --------------- > > Sample 1) > ---------- > [root@snapshot-28 glusterfs]# gluster volume quota vol1 list /dir1 /dir4 > /dir5 --xml > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <cliOutput> > <opRet>0</opRet> > <opErrno>0</opErrno> > <opErrstr/> > <volQuota> > <limit> > <path>/dir1</path> > <hard_limit>10.0MB</hard_limit> > <soft_limit>80%</soft_limit> > <used_space>0Bytes</used_space> > <avail_space>10.0MB</avail_space> > </limit> > <limit> > <path>/dir4</path> > <path>No such file or directory</path> > </limit> > <limit> > <path>/dir5</path> > <path>No such file or directory</path> > </limit> > </volQuota> > </cliOutput> > > Sample 2) > --------- > gluster volume quota vol1 list --xml > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <cliOutput> > <opRet>0</opRet> > <opErrno>0</opErrno> > <opErrstr/> > <volQuota/> > </cliOutput> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <cliOutput> > <volQuota> > <limit> > <path>/dir</path> > <hard_limit>10.0MB</hard_limit> > <soft_limit>80%</soft_limit> > <used_space>0Bytes</used_space> > <avail_space>10.0MB</avail_space> > </limit> > <limit> > <path>/dir1</path> > <hard_limit>10.0MB</hard_limit> > <soft_limit>80%</soft_limit> > <used_space>0Bytes</used_space> > <avail_space>10.0MB</avail_space> > </limit> > </volQuota> > </cliOutput> > > Change-Id: I8a8d83cff88f778e5ee01fbca07d9f94c412317a > BUG: 1185259 > Signed-off-by: Sachin Pandit <spandit@redhat.com> > Reviewed-on: http://review.gluster.org/9481 > Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaushal M <kaushal@redhat.com> Change-Id: Ibdf51db626a07e68b5ace98140877f6d21918c20 BUG: 1231641 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11220 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* quota: Validate NULL inode from the entries received in readdirp_cbkvmallika2015-06-282-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/10416/ > In quota readdirp_cbk, inode ctx filled for the all entries > received. > In marker readdirp_cbk, files/directories are inspected for > dirty > There is no guarantee that entry->inode is populated. > If entry->inode is NULL, this needs to be treated as readdir > > Change-Id: Id2d17bb89e4770845ce1f13d73abc2b3c5826c06 > BUG: 1215550 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/10416 > Tested-by: NetBSD Build System > 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: If6578984ab1a33a3bdbaf0ec169f7c9548991144 BUG: 1217433 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10472 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* posix: handle failure from posix_resolvevmallika2015-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is backport of http://review.gluster.org/#/c/9941/ > When building ancestory, posix_resolve gets the inode > from the gfid. We need to handle the failure case from > this function > > Change-Id: I19f0f0c739686b1b0ef96309212aa1c7911b3589 > BUG: 1203629 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/9941 > Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: If3f9a910be3d08293199748c9e04b3be2d8633c7 BUG: 1217432 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10471 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* doc: release notes for GlusterFS 3.5.4v3.5.4Niels de Vos2015-06-031-1/+3
| | | | | | BUG: 1141158 Change-Id: Ia1778a789ca1d9a76bdf3aea4976009700551109 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* fuse: squash 64-bit inodes in readdirp when enable-ino32 is setNiels de Vos2015-06-033-4/+9
| | | | | | | | | | | | | | | | | | | The structures returned by readdirp contain the inode 2x. Only one of them was squashed into 32-bits when enable-ino32 is enabled. Backport of: > Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e > BUG: 1223889 > Reviewed-on: http://review.gluster.org/10881 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Tested-by: Cyril Peponnet <cyril@peponnet.fr> [on release-3.5] Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e BUG: 1222150 Signed-off-by: Niels de Vos <ndevos@redhat.com> Tested-by: Cyril Peponnet <cyril@peponnet.fr> Reviewed-on: http://review.gluster.org/10884 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: correct the version in glusterfs-api.pcNiels de Vos2015-04-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The version in glusterfs-api.pc has moved backwards, breaking existing versioned dependencies in QEMU. The following table contains the GlusterFS version and the version for glusterfs-api.pc: .------------------------. | GlusterFS | pkg-config | |-----------+------------| | 3.4.x | 4.3.4.x | | 3.5.x | 6.3.5.x | | 3.6.x | 7.3.6.x | | 3.7.x | 7.3.7.x | | master | 7.x.y.z | '------------------------' BUG: 1211841 Change-Id: I62168a0ab4f0c78e61987371ae75a0d2dd56ced8 URL: http://thread.gmane.org/gmane.comp.emulators.qemu/330176 Reported-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10311 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* doc: add release notes for 3.5.4beta1Niels de Vos2015-04-021-0/+76
| | | | | | | | | | BUG: 1141158 Change-Id: Icf040813e40c8e2d96fd284960a345c78ae29b1f Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10104 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* cluster/afr: Make read child match check in afr optionalv3.5.4beta1Krutika Dhananjay2015-03-185-1/+30
| | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/9917 Having this particular check which was introduced by commit bb2df4e63fa8a5d65f18b4a5efc757e8d475fbff causes a drop in performance in readdirp. So the behavior is made configurable with this patch. Change-Id: I9012a6bb955229a0cbb48f06e4e2edc0782dfead BUG: 1202675 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9924 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* afr: exit out of stack winds in for loops if call_count is zeroRavishankar N2015-03-115-4/+16
| | | | | | | | | | | | | ....in order to avoid a race where the fop cbk frees the frame's local variables and the fop tries to access it at a later point in time. Change-Id: I91d2696e5e183c61ea1368b3a538f9ed7f3851de BUG: 1200764 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/9856 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: pranith karampuri <pranith.k@gmail.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* configure: argp-standalone is always built, even when not neededNiels de Vos2015-02-262-5/+10
| | | | | | | | | | | | | | | | | | | | | | | This patch still configures argp, i.e. creates Makefile in /contrib/argp-standalone, for the `make dist`, but there's no reason to compile it when it's not going to be linked into anything. Backport of commit 09d2dcac3a238cfe6bde1a7aed06facfa16caf20: > Change-Id: Id0fcb717b5821d8a4c176e6274339f46b3a4a249 > BUG: 1086773 > Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> > Reviewed-on: http://review.gluster.org/7440 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Harshavardhana <harsha@harshavardhana.net> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Anand Avati <avati@redhat.com> Change-Id: Id0fcb717b5821d8a4c176e6274339f46b3a4a249 BUG: 1191006 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* protocol: Log ENODATA & ENOATTR logs at DEBUG loglevel in removexattr_cbk.Vijay Bellur2015-02-252-4/+16
| | | | | | | | | | | | | | | | | | | | Prevents messages of the following type from being seen by default in the log files: [2014-09-19 07:57:39.877806] W [client-rpc-fops.c:1232:client3_3_removexattr_cbk] 0-<volume_name>-client-0: remote operation failed: No data available [2014-09-19 07:57:39.877963] W [client-rpc-fops.c:1232:client3_3_removexattr_cbk] 0-<volume_name>-client-1: remote operation failed: No data available Change-Id: I3b1a121b0fc272eb772547275bb8085ed19db5a1 BUG: 1192832 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8781 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/9655
* features/quota: Send the immediate parent with limit in quota statfsvmallika2015-02-232-47/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adjustment This is a backport of http://review.gluster.org/#/c/7330 > 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> Change-Id: I5232a82da20d3dfd48303ba2748b86cfc96ff864 BUG: 1115197 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9510 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* afr: Don't write to sparse regions of sink.Ravishankar N2015-02-123-51/+293
| | | | | | | | | | | | | | | | | | | | | | | Corresponding afr-v2 fix: http://review.gluster.org/#/c/9480/ Problem: When data-self-heal-algorithm is set to 'full', shd just reads from source and writes to sink. If source file happened to be sparse (VM workloads), we end up actually writing 0s to the corresponding regions of the sink causing it to lose its sparseness. Fix: If the source file is sparse, and the data read from source and sink are both zeros for that range, skip writing that range to the sink. Change-Id: Iade957e4173c87e45a2881df501ba2ad3eb1a172 BUG: 1190633 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/9611 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/marker: Filter internal xattrs in lookupPranith Kumar K2015-02-127-55/+305
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/9061 Afr should ignore quota-size-key as part of self-heal but should heal quota-limit key. BUG: 1162230 Change-Id: I639cfabbc44468da29914096afc7e2eca1ff1292 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9091 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr: serialize inode locksPranith Kumar K2015-02-112-77/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/9372 Problem: Afr winds inodelk calls without any order, so blocking inodelks from two different mounts can lead to dead lock when mount1 gets the lock on brick-1 and blocked on brick-2 where as mount2 gets lock on brick-2 and blocked on brick-1 Fix: Serialize the inodelks whether they are blocking inodelks or non-blocking inodelks. Non-blocking locks also need to be serialized. Otherwise there is a chance that both the mounts which issued same non-blocking inodelk may endup not acquiring the lock on any-brick. Ex: Mount1 and Mount2 request for full length lock on file f1. Mount1 afr may acquire the partial lock on brick-1 and may not acquire the lock on brick-2 because Mount2 already got the lock on brick-2, vice versa. Since both the mounts only got partial locks, afr treats them as failure in gaining the locks and unwinds with EAGAIN errno. Change-Id: I939a1d101e313a9f0abf212b94cdce1392611a5e BUG: 1177928 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9374 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/locks: Add lk-owner checks in entrylkPranith Kumar K2015-02-112-21/+54
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/9125 Problem: entry self-heal in 3.6 and above, takes full lock on the directory only for the duration of figuring out the xattrs of the directories where as 3.5 takes locks through out the entry-self-heal. If the cluster is heterogeneous then there is a chance that 3.6 self-heal is triggered and then 3.5 self-heal will also triggered and both the self-heal daemons of 3.5 and 3.6 do self-heal. Fix in 3.6.2 and above: 3.6.2 and above gets an entry lock on a very long name before entry self-heal begins so that 3.5 entry self-heal will not get locks until 3.6.x entry self-heal completes. Make 3.5 locks accept nested locks from same lk-owner, client. BUG: 1177339 Change-Id: I65d4c3732d1e074720422533f85f6e13f933ecad Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9352 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr: Preserve errno in case of failures on all subvolsPranith Kumar K2015-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | Partly backported from http://review.gluster.org/8984 Problem: When quorum is enabled and the fop fails on all the subvolumes, op_errno is set to EROFS which overrides the actual errno returned from bricks. Fix: Don't override the errno when fop fails on all subvols. PS: Afr-v2 code differs from afr-v1 so that pre-op part of code doesn't apply Change-Id: I61e57bbf1a69407230ec172a983de18d1c624fd2 BUG: 1162150 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9088 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* api: versioned symbols in libgfapi.so for compatibilityKaleb S. KEITHLEY2015-02-0912-337/+785
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use versioned symbols to keep libgfapi at libgfapi.so.0.0.0 Some nits uncovered: + there are a couple functions declared that do not have an associated definition, e.g. glfs_truncate(), glfs_caller_specific_init() + there are five private/internal functions used by heal/src/glfsheal and the gfapi master xlator (glfs-master.c): glfs_loc_touchup(), glfs_active_subvol(), and glfs_subvol_done(), glfs_init_done(), glfs_resolve_at(); which are not declared in glfs.h; + for this initial pass at versioned symbols, we use the earliest version of all public symbols, i.e. those for which there are declarations in glfs.h or glfs-handles.h. Further investigation as we do backports to 3.6, 3.4, and 3.4 will be required to determine if older implementations need to be preserved (forward ported) and their associated alias(es) and symbol version(s) defined. FWIW, we should consider linking all of our libraries with a map, it'll result in a cleaner ABI. Perhaps something for an intern to do or a Google Summer of Code project. Change-Id: I513b9aad9c5fd7d8b34ff33acac35f37b6baaab6 BUG: 1160711 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/9056 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* pkg-config: make the version in gluster-api.pc backwards compatibleNiels de Vos2015-02-092-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Once we released gluster-api.pc with version=4. Since then we undid the library versioning and replaced it with symbol-versioning. The current libgfapi.so has version 0, but the symbols have the version from the main package at the time they were added. Because other packages (like samba) use the pkg-config version, we can not drop it, or decrease the version easily. The simplest solution is to keep the version=4 and add sub-digits for the actual package/symbol versions. In future, the version in gluster-api.pc will be like 4.3.x.y. Cherry picked from commit 6ba258d2b7d4520af95ff638e02598e4aa247ec4: > Change-Id: If359c8de5b847a7e818199a7246636113837da2d > BUG: 1166232 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/9154 > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> BUG: 1160711 Change-Id: I785335972b357954fe4ede9c599b305c4a56eba7 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9199 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* storage/posix: Don't try to set gfid in case of INTERNAL-mknodPranith Kumar K2015-02-091-7/+12
| | | | | | | | | | | Backport of http://review.gluster.org/9446 BUG: 1184528 Change-Id: I4131baf5cf6f6ca6deb5b4f426b34c980a065a9e Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9474 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* storage/posix: Set gfid after all xattrs, uid/gid are setPranith Kumar K2015-02-091-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/9434 Problem: When a new entry is created gfid is set even before uid/gid, xattrs are set on the entry. This can lead to dht/afr healing that file/dir with the uid/gid it sees just after the gfid is set, i.e. root/root. Sometimes setattr/setxattr are failing on that file/dir. Fix: Set gfid of the file/directory only after uid/gid, xattrs are setup properly. Readdirp, lookup either wait for the gfid to be assigned to the entry or not update the in-memory inode ctx in posix-acl xlator which was producing lot EACCESS/EPERM to the application or dht/afr self-heals. BUG: 1184528 Change-Id: I66459bbf595746ede6869447fb68a7dd23a38b7f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9473 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/marker: do not call inode_path on the inode not yet linkedvmallika2015-02-051-12/+24
| | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/9320 > * in readdirp callbak marker is calling inode_path on the inodes that > are not yet linked to the inode table. > > Change-Id: I7f5db29c6a7e778272044f60f8e73c60574df3a9 > BUG: 1176393 > Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> > Reviewed-on: http://review.gluster.org/9320 > 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: I9e2c14d0e0dd52d01ff1dd65b0b50f83874eef0e BUG: 1174250 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9508 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/dht: Fix incorrect updates to parent timesKrutika Dhananjay2015-02-051-6/+5
| | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/9457 In directory write FOPs, as far as updates to timestamps associated with parent by DHT is concerned, there are three possibilities: a) time (in sec) gotten from child of DHT < time (in sec) in inode ctx b) time (in sec) gotten from child of DHT = time (in sec) in inode ctx c) time (in sec) gotten from child of DHT > time (in sec) in inode ctx In case (c), for time in nsecs, it is the value returned by DHT's child that must be selected. But what DHT_UPDATE_TIME ends up doing is to choose the maximum of (time in nsec gotten from DHT's child, time in nsec in inode ctx). Change-Id: I1388e374c8a2029f3b8919380e68620e7591bde6 BUG: 1186121 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9496 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr: When parent and entry read subvols are different, set ↵Krutika Dhananjay2015-02-054-12/+121
| | | | | | | | | | | | | | | | | | | | entry->inode to NULL Backport of: http://review.gluster.org/#/c/9477 That way a lookup would be forced on the entry, and its attributes will always be selected from its read subvol. Additionally, directory write fops as well as LOOKUP have been made to unwind parent attributes from parent's read child in AFR. Change-Id: I9fca49fa91cc3a65f53db855fedb90b08f1ca7f4 BUG: 1186121 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9504 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* performance/md-cache: Initialise local->loc before winding nameless lookupKrutika Dhananjay2015-01-271-3/+3
| | | | | | | | | | | | | Backport of: http://review.gluster.org/9476 That way, in the cbk, the latest values are updated in the cache. Change-Id: I3f8701d7043f06f512364e20c4456f254776cba7 BUG: 1186121 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9497 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterfs.spec.in: use upstream logrotate exclusivelyKaleb S. KEITHLEY2014-12-151-22/+5
| | | | | | | | | | | | | | | | | | | | retiring Fedora dist-git *.logrotate files Cherry picked from commit c35135c8da3542f377dcb22d121d255eb796a819: > Change-Id: I6a94aac6f45573216de3f9e673d10db6de5ccb98 > BUG: 1126832 > Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> > Reviewed-on: http://review.gluster.org/8418 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> BUG: 1159968 Change-Id: I6a94aac6f45573216de3f9e673d10db6de5ccb98 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9274 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
* mount: Verify mount failure in mount.glusterfs wrapper.Niels de Vos2014-12-151-0/+5
| | | | | | | | | | | | | | | | | | | | The result of mount command execution is not checked properly, thus no proper message given for the end user. This patch fix the same. Cherry picked from commit 76b72680017c836eff8805ea0339f7827ba3e561: > Bug Id: 1128165 > Change-Id: I3882e34e840ed15b5ce48ed5e1ad51208e2be913 > Signed-off-by: Humble Chirammal <hchiramm@redhat.com> > Reviewed-on: http://review.gluster.org/8438 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> BUG: 1173515 Change-Id: I3882e34e840ed15b5ce48ed5e1ad51208e2be913 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9271 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/index: Perform closedir() in error paths to avoid fd leaksVijay Bellur2014-12-041-9/+8
| | | | | | | | | | Change-Id: I7c8fc22ebe3c9cdf88e803e27c645cbad0012d16 BUG: 1166275 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/9167 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* Cluster/DHT : Fixed crash due to null derefNithya Balachandran2014-12-041-3/+4
| | | | | | | | | | | | | | | | | | | | | A lookup on a linkto file whose trusted.glusterfs.dht.linkto xattr points to a subvol that is not part of the volume can cause the brick process to segfault due to a null dereference. Modified to check for a non-null value before attempting to access the variable. Change-Id: Ie8f9df058f842cfc0c2b52a8f147e557677386fa BUG: 1162767 BUG:1162767 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/9034 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: venkatesh somyajulu <vsomyaju@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> (cherry picked from commit 0da374020c17256141fb3971ae792b62097d72df) Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/9099 Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests: spurious failure fix for quota-anon-fd-nfs.tNiels de Vos2014-11-274-7/+80
| | | | | | | | | | | | | | | | | | | | Cherry picked from commit 463d3e379d63e37764bc190be6c2f790769bea58: > Change-Id: I4f7ee68c514d8d322e25cf74167f288a8b6f8164 > BUG: 1163543 > Signed-off-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-on: http://review.gluster.org/9108 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> Also include the usage() function in the test, and some other improvements introduced with commit 27628b7b. BUG: 1168173 Change-Id: I4153af903178893361157af2ab06ce4989dd849b Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9200 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* core: fix Ubuntu code audit (cppcheck) resultsKaleb S. KEITHLEY2014-11-2616-61/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See http://review.gluster.org/#/c/7583/ BZ 1086460 AFAICT these are false positives: [geo-replication/src/gsyncd.c:99]: (error) Memory leak: str [geo-replication/src/gsyncd.c:395]: (error) Memory leak: argv [xlators/nfs/server/src/nlm4.c:1200]: (error) Possible null pointer dereference: fde Program exits, resource leak not an issue [extras/geo-rep/gsync-sync-gfid.c:105]: (error) Resource leak: fp Test program: [extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments. Not built: [xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv The remainder are fixed with this change-set: [heal/src/glfs-heal.c:357]: (error) Possible null pointer dereference: remote_subvol [libglusterfs/src/xlator.c:648]: (error) Uninitialized variable: gfid [libglusterfs/src/xlator.c:649]: (error) Uninitialized variable: gfid [xlators/cluster/afr/src/afr-inode-write.c:469]: (error) Possible null pointer dereference: frame [xlators/cluster/afr/src/afr-self-heal-common.c:1704]: (error) Possible null pointer dereference: local [xlators/cluster/dht/src/dht-rebalance.c:1643]: (error) Possible null pointer dereference: ctx [xlators/cluster/stripe/src/stripe.c:4963]: (error) Possible null pointer dereference: local [xlators/features/changelog/src/changelog.c:1464]: (error) Possible null pointer dereference: priv [xlators/mgmt/glusterd/src/glusterd-geo-rep.c:1656]: (error) Possible null pointer dereference: command [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:914]: (error) Resource leak: file [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:998]: (error) Resource leak: file [xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx [xlators/mgmt/glusterd/src/glusterd-store.c:1332]: (error) Possible null pointer dereference: handle [xlators/mgmt/glusterd/src/glusterd-utils.c:4706]: (error) Possible null pointer dereference: this [xlators/mgmt/glusterd/src/glusterd-utils.c:5613]: (error) Possible null pointer dereference: this [xlators/mgmt/glusterd/src/glusterd-utils.c:6342]: (error) Possible null pointer dereference: path_tokens [xlators/mgmt/glusterd/src/glusterd-utils.c:6343]: (error) Possible null pointer dereference: path_tokens [xlators/mount/fuse/src/fuse-bridge.c:4591]: (error) Uninitialized variable: finh [xlators/mount/fuse/src/fuse-bridge.c:3004]: (error) Possible null pointer dereference: state [xlators/nfs/server/src/nfs-common.c:89]: (error) Dangerous usage of 'volname' (strncpy doesn't always null-terminate it). [xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf Rerunning cppcheck afterwards: As before, test program: [extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments. As before, believed to be false positive: [geo-replication/src/gsyncd.c:99]: (error) Memory leak: str [geo-replication/src/gsyncd.c:395]: (error) Memory leak: argv [xlators/nfs/server/src/nlm4.c:1200]: (error) Possible null pointer dereference: fde As before, not built: [xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv False positive after fix: [heal/src/glfs-heal.c:356]: (error) Possible null pointer dereference: remote_subvol [xlators/cluster/stripe/src/stripe.c:4963]: (error) Possible null pointer dereference: local Change-Id: Ib3029d3223f5a13e2ac386a527d64d5ffe3ecb90 BUG: 1092037 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7605 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr : Prevent excessive logging of split-brain messages.Anuradha2014-11-136-10/+37
| | | | | | | | | | | | | | | | | Running the volume heal info command would result in excessive logging of split-brain messages. After this patch, running heal info command will not log the split brain messages. This info is now displayed in the output of heal info command instead. If a file is in split-brain, a message "Is in split-brain" will be written against its name. Change-Id: Ib8979be04f5ac7c59ce3ad1185886bb54b8be808 BUG: 1161102 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/9069 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr: Fix xattr heal comparison checksPranith Kumar K2014-11-132-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of part of the fixes in http://review.gluster.org/8558 Problem: While implementing list-xattr based meta-data self-heal for afr-v2 we found 2 issues, with afr-v1's implementation. 1) change in QUOTA_SIZE_KEY xattr value can trigger spurious metadata self-heal. 2) xattr comparison function that is implemented for afr-v1 checks if the number of xattrs in both the xattrs is same and then checks that the xattrs present in brick-1's response are present and equal. But what we observed me was that count also contains the gluster internal/virtual xattrs where as the compare function should only compare on-disk external xattrs that can be healed. So the correct implementation should check that the external xattrs in first brick's response are present in second brick's response and vide versa. Fix: This patch is partly backported from afr-v2's implementation. Will be providing the links where necessary. 1) Added QUOTA_SIZE_KEY xattr to the list of xattrs that need to be ignored. (http://review.gluster.org/#/c/8558/10/xlators/cluster/afr/src/afr-common.c line: 1155) 2) For xattrs to be equal, check all keys in xattr-dict1 are in xattr-dict2 and equal and vice versa. (http://review.gluster.org/#/c/8558/10/xlators/cluster/afr/src/afr-common.c line: 1195) Change-Id: I63aa74858c6f608b98d1fe425b3fa56f925bb5b3 BUG: 1162230 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9090 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattrPranith Kumar K2014-11-131-0/+13
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/9049 Bulk remove xattr is internal fop in gluster. Some of the xattrs may have special behavior. Ex: removexattr("posix.system_acl_access"), removes more than one xattr on the file that could be present in the bulk-removal request. Removexattr of these deleted xattrs will fail with either ENODATA/ENOATTR. As all this fop cares is removal of the xattrs in bulk-remove request and if they are already deleted, it can be treated as success. BUG: 1162226 Change-Id: I0629b48b854cda923c47bc5f50558bf42c60149b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9089 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>