summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* georep: add reset-sync-time option for session deleteMilind Changire2016-07-217-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the stime xattr at all the brick roots to (0,0) if the argument reset-sync-time has been provided on the command-line. To avoid testing against directory specific stime, the remote stime is assumed to be minus_infinity, if the root directory stime is set to (0,0), before the directory scan begins. This triggers a full volume resync to slave in the case of a geo-rep session recreation with the same master-slave volume pair. Command synopsis: gluster volume geo-replication <MASTERVOL> <SLAVE>::<SLAVEVOL> delete \ [reset-sync-time] Update gluster cli man page to include new sub-command reset-sync-time. Change-Id: Ie4ce03b9425ed9bb81eda8681058c0fc6f990948 BUG: 1357772 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/14051 Reviewed-by: Kotresh HR <khiremat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 70fd68d94f768c098b3178c151fa92c5079a8cfd) Reviewed-on: http://review.gluster.org/14952
* features/bitrot: Move throttling code to libglusterfsKotresh HR2016-07-199-105/+112
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14846 Since throttling is a separate feature by itself, move throttling code to libglusterfs. Change-Id: If9b99885ceb46e5b1865a4af18b2a2caecf59972 BUG: 1357514 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14944 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/ec: Fix race in timer cancellationXavier Hernandez2016-07-171-15/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A race in timer cancellation for delayed unlock could cause a crash if the cancelling thread fails to cancel the timer because it has already been fired but not executed, and the callback is scheduled out of the CPU, delaying it until the thread has released important resources needed by the callback. This patch improves the handling of this case to make it robust. Backport of: > Change-Id: I5c8a8c6610c5136f71b938aa78b5878ba05238d4 > BUG: 1345855 > Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> > Reviewed-on: http://review.gluster.org/14712 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: I5c8a8c6610c5136f71b938aa78b5878ba05238d4 BUG: 1346156 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14724 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* fuse: unref dict even if fuse_first_lookup failsKremmyda, Olia (NSN - GR/Athens)2016-07-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In fuse_first_lookup function, "dict_unref (dict)" should be included in the out label, in case create_frame returns an empty pointer the dict to be unreferenced as well. Backport of commit b01fb8d3bb9772d94073aaa52b2d8210ac4fabb8: > Bug: 1338544 > Change-Id: Ifb8a3378aec6521c1aa848f818968b6bfdb72089 > Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> > Reviewed-on: http://review.gluster.org/14464 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Bug: 1339138 Change-Id: I5c26740ecf8e4344a3150e1f9ac9bdcaec22d819 Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> Reviewed-on: http://review.gluster.org/14463 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* Glusterd: printing the node details on error message of rebalancehari2016-07-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14495 Problem: on the rebalance start with one of the glusterd being down among the volume, the error message says only about the brick path. Fix: adding the node details >Change-Id: I5827d3a9a15b0461c9ce3a51c0b16246ca58f335 >BUG: 1337899 >Signed-off-by: hari <hgowtham@redhat.com> Change-Id: I3075f3a73e289dfe577742a3d5086531026f567d BUG: 1339923 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14540 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterd: Fix gsyncd upgrade issueKotresh HR2016-07-153-31/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14898/ Problem: gluster upgrade is not generating new volfiles Cause: During upgrade, "glusterd --xlator-option *.upgrade=on -N" is run to generate new volfiles. It is run post 'glusterfs' rpm installation. The above command fails during upgrade if geo-replication is installed. This is because on glusterd start 'gsyncd' binary is called to configure geo-replication related stuff. Since 'glusterfs' rpm is installed prior to 'geo-rep' rpm, the 'gsyncd' binary used to glusterd upgrade command is of old version and hence it fails before generating new volfiles. Solution: Don't call geo-replication configure during upgrade/downgrade. Geo-replication configuration happens during start of glusterd after upgrade. Change-Id: Id58ea44ead9f69982f86fb68dc5b9ee3f6cd11a1 BUG: 1356426 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 1b998788ece8c8b52657e8b9aae65d3279690c5b) Reviewed-on: http://review.gluster.org/14915 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/bitrot: Option to set scrub interval to a minuteKotresh HR2016-07-153-1/+9
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14836/ Bitrot scrub-frequency supports "hourly|daily|weekly|biweekly|monthly". But it is painful for testing as minimum scrub-interval is an hour Hence introducing a scrub interval of minute to ease testing. It is intentionally not exposed in bitrot command help as it is only for testing. e.g., gluster vol bitrot <volname> scrub-frequency minute Change-Id: I155a65298d3fad5ae9e529d9c7d4b0d25fa297c0 BUG: 1354425 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 7df1174f7bed2a00631cf17201f5217a053afeb1) Reviewed-on: http://review.gluster.org/14887 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* feature/bitrot: Show whether scrub is in progress/idleKotresh HR2016-07-155-14/+64
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14864/ Bitrot scrub status shows whether the scrub is paused or active. It doesn't show whether the scrubber is actually scrubbing or waiting in the timer wheel for the next schedule. This patch shows this status with "In Progress" and "Idle" respectively. Change-Id: I995d8553d1ff166503ae1e7b46282fc3ba961f0b BUG: 1355635 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4757d256e3e00132ef204c01ed61f78f705ad6b) Reviewed-on: http://review.gluster.org/14900 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* rpc: invalid argument when function setsockopt sets option TCP_USER_TIMEOUTNiels de Vos2016-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If option "transport.tcp-user-timeout" hasn't been setted, glusterd's priv->timeout will be -1, which will cause invalid argument when set TCP_USER_TIMEOUT. Cherry picked from commit b2c73cbf423de6201f956f522b7429615c88869d: > Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9 > BUG: 1349657 > Signed-off-by: Zhou Zhengping <johnzzpcrystal@gmail.com> > Reviewed-on: http://review.gluster.org/14785 > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9 BUG: 1354404 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14889 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/index: Exclude gfid-type for '.', '..'Pranith Kumar K2016-07-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | index_get_gfid_type is assuming all names are gfids where as some of these entry->d_names can be '.' or '..' Thanks a lot to Nithya for RC >BUG: 1336630 >Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14589 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit a89a9d266c439800286f281655d67f4e362dec32) Change-Id: I2a3d13ee76846c38e965f8a98bacc8755a8debfd BUG: 1341482 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14598 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
* doc: Add release-notes for 3.7.13v3.7.13Kaushal M2016-07-081-0/+31
| | | | | Change-Id: Ie91a6c4b9de85e7e6d073a6e2cd0027ad1387c06 Signed-off-by: Kaushal M <kaushal@redhat.com>
* glusterd: compare uuid instead of hostname address resolutionAtin Mukherjee2016-07-073-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14849 In glusterd_get_brickinfo () brick's hostname is address resolved. This adds an unnecessary latency since it uses calls like getaddrinfo (). Instead given the local brick's uuid is already known a comparison of MY_UUID and brickinfo->uuid is much more light weight than the previous approach. On a scale testing where cluster hosting ~400 volumes spanning across 4 nodes, if a node goes for a reboot, few of the bricks don't come up. After few days of analysis its found that glusterd_pmap_sigin () was taking signficant amount of latency and further code walthrough revealed this unnecessary address resolution. Applying this fix solves the issue and now all the brick processes come up on a node reboot. Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 BUG: 1352833 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14849 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14861
* gfapi: update count when glfs_buf_copy is usedRaghavendra Talur2016-07-071-2/+3
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14854 glfs_buf_copy collates all iovecs into a iovec with count=1. If gio->count is not updated it will lead to dereferencing of invalid address. Change-Id: I7c58071d5c6515ec6fee3ab36af206fa80cf37c3 BUG: 1352482 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Signed-off-by: Poornima G <pgurusid@redhat.com> Reported-By: Lindsay Mathieson <lindsay.mathieson@gmail.com> Reported-By: Dmitry Melekhov <dm@belkam.com> Reported-By: Tom Emerson <TEmerson@cyberitas.com> Reviewed-on: http://review.gluster.org/14859 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: fail volume delete if one of the node is downAtin Mukherjee2016-07-044-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14681 Deleting a volume on a cluster where one of the node in the cluster is down is buggy since once that node comes back the resync of the same volume will happen. Till we bring in the soft delete feature tracked in http://review.gluster.org/12963 this is a safe guard to block the volume deletion. Please note the test file which is backported from this commit has an issue where we start the volume and then try to delete it which is anyway going to fail. So the test actually doesn't validate the fix. http://review.gluster.org/#/c/14693/ in master fixed the problem and the same is ported as part of this commit as well. Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c BUG: 1344634 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14681 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-on: http://review.gluster.org/14692 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* fuse: accept the -s option to allow automountingNiels de Vos2016-07-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | autofs passes the -s option when mounting. All /sbin/mount.<fs> helpers accept this, except mount.glusterfs. Because the helper fails when -s is passed accessing the mountpoint through autofs gives the following error: $ ls /lan/storage.lan.example.net/repos ls: cannot open directory /lan/storage.lan.example.net/repos: Too many levels of symbolic links Cherry picked from commit c8da5669a15ed6944cceb9d003789ff333754bff: > BUG: 1340936 > Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14559 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a BUG: 1344551 Signed-off-by: Niels de Vos <ndevos@redhat.com> Tested-by: Kaveh Minooie <kminooie@gmail.com> Reviewed-on: http://review.gluster.org/14686 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* gfapi/handleops: Avoid using glfd during createSoumya Koduri2016-07-031-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid leaking glfd while creating a file using handleops and since application shall not be interested in it, use the 'fd' object directly which can be un'refed post create. This is backport of below mainline patch - http://review.gluster.org/14532 > Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54 > BUG: 1339553 > Signed-off-by: Soumya Koduri <skoduri@redhat.com> > Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> > Reviewed-on: http://review.gluster.org/14532 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit 763ed1017b0011934ad2414d7396c46e528ea5b3) Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54 BUG: 1351877 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14840 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* nfs: build exportlist with multiple groupnodesBipin Kunal2016-07-032-18/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EXPORT procedure of the MOUNT protocol does not correctly create structures for the 'groupnodes' in the reply. Each 'groupnode' should be a single entry in the 'nfs.rpc-auth-allow' volume option. Because the value is handled as a single string, the encoding of the groupnode->gr_name fails when the value of the volume option is longer than 255 characters. In the error case, encoding the EXPORTS reply fails, and the waiting 'showmount' command will not receive a reply and times out. Splitting the allowed entries and creating a groupnode for each one prevents the too long ->gr_name. This is following the structures for the EXPORTS reply in the MOUNT protocol more correctly as well. Note that the contents of ->gr_name is expected to be server dependent. This is backport of below mainline fix - http://review.gluster.org/#/c/14667/ Change-Id: Ibbabad581cc9aa00feb80fbbc851a1b10b28383d BUG: 1343290 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14698 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* xdr/nfs: free complete groupnode structureBipin Kunal2016-07-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | The groupnode->gr_next pointer is not traversed upon free. This is currently not a problem, because the pointer is never used. However the correct way to free a groupnode should check the ->gr_next pointer and free any of the groups that it encounters. This problem was identified while correcting a problem with the MOUNT protocol. The change "nfs: build exportlist with multiple groups" starts to use ->gr_next. This is backport of below mainline fix - http://review.gluster.org/#/c/14666/ Change-Id: I9d04eaf4c65bdb8db136321d60e70789da1739d7 BUG: 1343290 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14697 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* feature/gfid-access: Fix nameless lookup on ".gfid"Kotresh HR2016-07-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14773 Problem: In geo-replication, if the data copied from .snaps directory to the master, the first set of copy after uss is enabled doesn't get sync to slave. Cause: Enabling uss results in graph switch. So when the lookup comes on "0x00...0d/gfid1" on new graph, ("0x00...0d' being the gfid of virtual directory ".gfid"), it fails as gfid-access xlator doesn't handle it. Fix: Handle nameless lookup on ".gfid" in gfid-access xlator. Change-Id: I32be0064e8fd58068646dbf662432f4a3da14e77 BUG: 1349271 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit b37c6d9088851b2ef83ce4e28af642892e5fd268) Reviewed-on: http://review.gluster.org/14775 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* libglusterfs: Implement API that provides page-aligned iobufsKrutika Dhananjay2016-06-293-32/+50
| | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14672 One of the consumers of a page aligned buffer would be posix's readv fop on O_DIRECT fds. Today the way it works is by getting a page-aligned buffer through calloc, pread()ing into this buffer and then copying its contents into a newly created iobuf's ptr. This results in an extra memcpy() which can be avoided if we could implement an api that would return an iobuf whose ptr is page-aligned. That way the iobuf->ptr can be directly passed to sys_pread() as a parameter by posix translator. Change-Id: Ie44c300dc773fef8e1669d609987d47dbd340ac2 BUG: 1351024 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14826 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* configure: Prevent glupy installation outside $prefixNiels de Vos2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glupy was installed in the global path outside the prefix path, even if --prefix is passed. ./configure --prefix=/usr/local make install Expected: ${DESTDIR}${prefix}/lib64/python<VERSION>/site-packages/gluster Actual: ${DESTDIR}/usr/lib64/python<VERSION>/site-packages/gluster prefix was not honoured. With this patch, glupy will be installed inside the prefix path. Cherry picked from commit 85de0c83392d861ba47c97664ff73fd7f8705a3a: > BUG: 1335717 > Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6 > Signed-off-by: Aravinda VK <avishwan@redhat.com> > Reviewed-on: http://review.gluster.org/14315 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> BUG: 1336137 Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14340 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Anoop C S <anoopcs@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: Filter -D_FORTIFY_SOURCE from CFLAGSNiels de Vos2016-06-292-76/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use python-config to get recommended CFLAGS. It provides -D_FORTIFY_SOURCE=2 by default that conflicts with our --enable-debug option or a developer provided no-optimization option. Hence, filter it out from default CFLAGS. Cherry picked from commit 5e65701f2660d1be101da81bffea7721d4f9ece0: > Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3 > BUG: 1283948 > Co-authored-by: Kaleb S KEITHLEY <kkeithle@redhat.com> > Signed-off-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-on: http://review.gluster.org/12707 > 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: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3 BUG: 1336137 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14339 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Anoop C S <anoopcs@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gfapi : check the value "iovec" in glfs_io_async_cbk only for readJiffin Tony Thottan2016-06-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glfs_io_async_cbk() is called from the cbk of all the async ops such as write, read, fsync, ftruncate. In all other cases, expect for read the value for "iovec" is NULL. From the code, glfs_io_async_cbk checks the value in common routine which may end up in failures. Thanks Joe Julian for finding issue and suggesting the fix. Cherry picked from commit 61d72b3d91f2655b04de4ef29262f738a8cf7369: > Change-Id: I0be0123da68f9d8fbb5d94ede2d45566a9add6a5 > BUG: 1349276 > Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> > Reported-by: Joe Julian <me@joejulian.name> > Reviewed-on: http://review.gluster.org/14779 > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Joe Julian <me@joejulian.name> Change-Id: I0be0123da68f9d8fbb5d94ede2d45566a9add6a5 BUG: 1350880 Reported-by: Joe Julian <me@joejulian.name> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14822 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* cli: fix crash in arbiter keyword parsingRavishankar N2016-06-272-0/+30
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14738/ A negative case like `gluster volume create volname arbiter 3 /bricks{1..3}` must not crash. 'arbiter' keyword is valid only for (3 way) replica volumes. The .t that is added will crash and create a core *without* the fix when run but will still pass all TESTs. Since the regression framework fails the .t if it creates a core, we can consider it a valid test 'that fails without the fix'. Change-Id: Ie2d7ced66025ea3617d30f6f823b22401e6d2fde BUG: 1348056 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit b5c492dfea2d2e2075aa88d7153fba57b06e739d) Reviewed-on: http://review.gluster.org/14765 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* geo-rep: Safely handle if unliked GFID not present in data listAravinda VK2016-06-271-1/+2
| | | | | | | | | | | | | | | | | If unlinked GFID is not present in data list to be synced then Geo-rep worker was crashing with KeyError. Handled KeyError with this patch. BUG: 1348085 Change-Id: I5a1c9ca4473e32606df2e5c7e26c95faf55d44c0 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14706 (cherry picked from commit 4797ca3778d82a671716d4913c14f285591ae959) Reviewed-on: http://review.gluster.org/14766 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* build: place glupy under $prefix while installingNiels de Vos2016-06-272-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression testing on FreeBSD fails due to this error: --- install-pyglupyPYTHON --- /usr/home/jenkins/root/workspace/freebsd-smoke/install-sh -c -d '/usr/local/lib/python2.7/site-packages/gluster/glupy' mkdir: /usr/local/lib/python2.7/site-packages/gluster: Permission denied mkdir: /usr/local/lib/python2.7/site-packages/gluster: Permission denied *** [install-pyglupyPYTHON] Error code 1 The installation prefix is set to "/build/install" and glupy should be placed there as well. The default to "/usr/local" is incorrect. Cherry picked from commit a34c406445fc0294de41a8e4706f106a83e136a0: > Change-Id: I166412a271576f2344aecec94c7835f0fe9b1cf3 > BUG: 1198849 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/13208 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: I166412a271576f2344aecec94c7835f0fe9b1cf3 BUG: 1336137 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14338 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Aravinda VK <avishwan@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* geo-rep: Handle stime/xtime set failuresAravinda VK2016-06-271-6/+10
| | | | | | | | | | | | | | | | | | | While setting stime/xtime, if the file or directory is already deleted then Geo-rep will crash with ENOENT. With this patch, Geo-rep will ignores ENOENT since stime/xtime can't be applied on a deleted file/directory. Change-Id: I2d90569e51565f81ae53fcb23323e4f47c9e9672 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1345882 Reviewed-on: http://review.gluster.org/14529 (cherry picked from commit 1a348bfaeb9f2a50ec8ce27e5477e9b430c58b3c) Reviewed-on: http://review.gluster.org/14713 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com>
* geo-rep: Error message cleanupAravinda VK2016-06-271-10/+13
| | | | | | | | | | | | | | | | | If ssh returns 127 that means the remote gsyncd path is wrong or push-pem failed during create. Existing error message was pointing old documentation. Change-Id: Ifbbb4a604fc0ae0fd5cb2746df6363bf28cde1e9 BUG: 1347206 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14673 (cherry picked from commit 3b69e25c0f3cf0b958fbd2b8459712ad21239caa) Reviewed-on: http://review.gluster.org/14740 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com>
* afr:Don't wind reads for files in metadata split-brainRavishankar N2016-06-273-11/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13389/ Problem: For a read on a file in metadata split-brain: 1.lookup_done resets event_generation to zero. 2. readv is issued, goes to inode refresh due to mismatching event_gen. 3. After refresh is successful, we update event_generation, data and metdata readable. 3. We then call afr_read_txn_refresh_done() which in turn calls afr_inode_get_readable() but doesn't check for EIO. So afr_readv_wind is called with local->readable (which is populated with data_readable), thus winding the read to a brick. 4. Also, further parallel reads that come directly go to the wind path because there is no inode_refresh needed. Fix: 1.For any afr_read_txn(), readable must be an intersection of data and metadata readable. 2.Check for EIO in afr_read_txn_refresh_done(). Change-Id: I22dd221fdfaf96d7aced2f474e28ed1337d69f0e BUG: 1349881 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 7a1c1e2904701496968ed14b6d7479fb706c3188) Reviewed-on: http://review.gluster.org/14791 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* scripts: bash-isms in scriptsKaleb S KEITHLEY2016-06-243-13/+14
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14401/ Change-Id: I05f8718fb73c16dbb37c1f7460bb7b55cc0ffe97 BUG: 1223947 Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Kotresh HR <khiremat@redhat.com> Original-Author: Kaleb S KEITHLEY <kkeithle@redhat.com> (cherry picked from commit 2df72780e473709128a4f5d7f274a9063b288252) Reviewed-on: http://review.gluster.org/14774 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: race/timing issue setting up clusterKaleb S KEITHLEY2016-06-243-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ganesha_grace resource agent can start before the ganesha_mon resource agent, with the result that the crm_attribute that ganesha_grace expects to find has not been created yet. This is never (never? Or just so rarely that it has never actually been seen during development) seen with four nodes, but with just two nodes it's very repeatable. Note that when long (FQDN) names are used it is not unexpected to see Failed Actions in the output of `pcs status`, e.g.: * nfs-grace_monitor_5000 on node1.fully.qualified.domain.name.com 'unknown error' (1): call=20, status=complete, exitreason='none', last-rc-change='Wed Jun 1 12:32:32 2016', queued=0ms, exec=0ms * nfs-grace_monitor_5000 on node2.fully.qualified.domain.name.com 'unknown error' (1): call=18, status=complete, exitreason='none', last-rc-change='Wed Jun 1 12:32:42 2016', queued=0ms, exec=0ms and as long as all the ganesha_grace_clone and cluster_ip-1 resource agents are in Started state then this is okay. backport master: > http://review.gluster.org/14607 > BUG: 1341768 release-3.8 > http://review.gluster.org/14609 > BUG: 1341770 Change-Id: I726c9946ceb1ca92872b321612eb0f4c3cc039d8 BUG: 1341772 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14610 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* Add release notes for v3.7.12v3.7.12Kaushal M2016-06-241-0/+135
| | | | Change-Id: I3e60cc3431ece2e613d4f9dfdc6399c1a225fdee
* cluster/dht: Fix unsafe iteration on inode->fd_listXavier Hernandez2016-06-242-17/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When DHT traverses the inode->fd_list, it does that in an unsafe way that can generate races with fd_unref() called from other threads. This patch fixes this problem taking the inode->lock and adding a reference to the fd while it's being used outside of the mutex protected region. A minor change in storage/posix has been done to also access the inode->fd_list in a safe way. Backport of: > Change-Id: I10d469ca6a8f76e950a8c9779ae9c8b70f88ef93 > BUG: 1344340 > Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> > Reviewed-on: http://review.gluster.org/14682 > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I10d469ca6a8f76e950a8c9779ae9c8b70f88ef93 BUG: 1346751 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14734 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota : rectify quota-deem-statfs default settingsManikandan Selvaganesh2016-06-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14708/ > Change-Id: I75c47c4a0f0eb898b5e32efe7f0a6a558d7f8007 > BUG: 1345846 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/14708 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I75c47c4a0f0eb898b5e32efe7f0a6a558d7f8007 BUG: 1346184 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14727 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* nfs : store sattr properly in nfs3_setattr() callJiffin Tony Thottan2016-06-242-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nfs3_setattr stores the input arguments in cs->stbuf. However, inode/entry resolution code overwrites cs->stbuf after a successful resolution, thereby overwriting the input arguments with iatt values stored on backend. Hence operations like chmod/chown turns out to be a NOP. Specifically following are the functions that overwrite cs->stbuf: nfs3_fh_resolve_inode_lookup_cbk nfs3_fh_resolve_entry_lookup_cbk Since we resort to inode resolution only when inode is not found in inode table and lru limit guards the number of inodes in itable, we run into this issue only when the data set is bigger than lru limit of itable. Fix is to store input arguments in a member other than cs->stbuf. Thanks Du for suggesting the fix Backport of http://review.gluster.org/#/c/14657/ > Change-Id: I7caef48839d4f177c3557d7823fc1d35c8294939 > BUG: 1318204 > Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Change-Id: I7caef48839d4f177c3557d7823fc1d35c8294939 BUG: 1343362 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14659 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* cluster/distribute: heal layout in discover codepath tooRaghavendra G2016-06-222-34/+20
| | | | | | | | | | Change-Id: Ic559c220a1f0051e531314d13940604e2dead08c BUG: 1336284 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14349 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* dht/afr/client/posix: Fail mkdir without gfid-reqPranith Kumar K2016-06-166-10/+52
| | | | | | | | | | | | | | | | | | | | | | | | Do not allow directory creations without gfids as after the directories are created, operations on them fail anyway. So it is better to fail mkdir. >BUG: 1317361 >Change-Id: I8f8e3b38bbded1960b7215bac0432500f7e78038 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13690 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >(cherry picked from commit b246b07896fefb261c9fb07f3f29f0d03b81b88d) Change-Id: Ibf9c84add7265e3e1755a37958e1de38307624b2 BUG: 1332372 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14188 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* libglusterfs: Negate all but O_DIRECT flag if present on anon fdsKrutika Dhananjay2016-06-162-11/+8
| | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14665 This is to prevent any unforeseen problems that might arise due to writevs and readvs being wound with @flag parameter containing O_TRUNC or O_APPEND especially wrt translators like sharding and ec where O_TRUNC write or O_APPEND write on individual shards/fragments is not the same as O_TRUNC write or O_APPEND write as expected by the application. Change-Id: Ib0110731d6099bc888b7ada552a2abbea8e76051 BUG: 1342903 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14735 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* core, shard: Make shards inherit main file's O_DIRECT flag if presentKrutika Dhananjay2016-06-168-30/+66
| | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14191 If the application opens a file with O_DIRECT, the shards' anon fds would also need to inherit the flag. Towards this, shard xl would be passing the odirect flag in the @flags parameter to the WRITEV fop. This will be used in anon fd resolution and subsequent opening by posix xl. Change-Id: I3a0593fa46cc25e390a5762a0354b469c2a1532d BUG: 1342903 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14663 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/changelog: Change barrier notification mechanismKotresh HR2016-06-163-75/+67
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14272 The barrier notification mechanism was fd based and 'select' was being used. 'select' breaks when number of fds opened by brick process exceeds 1024. To avoid this and also the maintainance of pipe between notify and 'changelog_rollover', the pipe has been replaced with pthread condition signal and timed wait mechanism. Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de BUG: 1341952 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14615 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/shard: Don't modify readv sizePranith Kumar K2016-06-152-14/+24
| | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14623 For o-direct reads application sends aligned size which needs to be sent as is, otherwise o-direct writes where the file-size is not aligned fails. Change-Id: I66afcba41f3484da11e9a12fe2671d2051fafc8a BUG: 1342903 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14658 Tested-by: Krutika Dhananjay <kdhananj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* posix, shard: Use page-aligned buffer for o-direct readsKrutika Dhananjay2016-06-152-8/+35
| | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/14639/ and also make shard_readv_do() pass the correct flags when the original fd is opened with O_DIRECT. Change-Id: I253f74459656b047de652b6aace487c0e2ac71f6 BUG: 1342903 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14650 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tiering/ctr: Fix strcpy coverityAvra Sengupta2016-06-141-2/+3
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14696/ Change-Id: I6cffba3e09a023f105dbf2975cc9a3ae1a965c31 BUG: 1346132 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14696 Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit 3474aa85e399a92d3ee9159a2d066d4bd73611a0) Reviewed-on: http://review.gluster.org/14720 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd/geo-rep: Avoid started status check if same hostSaravanakumar Arumugam2016-06-131-26/+65
| | | | | | | | | | | | | | | | | | | | | | After carrying out add-brick, session creation is carried out again, to involve new brick in the session. This needs to be done, even if the session is in Started state. While involving slave uuid as part of a session, User is warned if session is in Started state. This check needs to be avoided if it is same slave host and session creation needs to be proceeded. Change-Id: Ic73edd5bd9e3ee55da96f5aceec0bafa14d3f3dd BUG: 1344605 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/14653 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit c62493efadbcf5085bbd65a409eed9391301c154) Reviewed-on: http://review.gluster.org/14710 Tested-by: Aravinda VK <avishwan@redhat.com>
* cluster/ec: Fix invalid __fd_unref() callXavier Hernandez2016-06-132-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | __fd_unref() doesn't do any cleanup, so it cannot be called to release fd references, specially if it's the last reference. The code has been changed to avoid a call to this function. In the previous version we always tried to keep the newest fd in the ec_lock_t structure. However this is not necessary. We'll always keep one reference to an open file on the same inode. It's irrelevant if the reference is new or old. The function __fd_unref() has also been removed from fd.h to avoid being used in the future since it's useless as it's defined now. Backport of http://review.gluster.org/14683 Change-Id: Ia728777fc8e464758d5ea4d3bf020f0603919039 BUG: 1344422 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14685 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd/geo-rep: upgrade path when slave vol uuid involvedSaravanakumar Arumugam2016-06-132-10/+191
| | | | | | | | | | | | | | | | | | slave volume uuid is involved in identifying a geo-replication session. This patch addresses upgrade path, where existing geo-rep session is gracefully upgraded to involve slave volume uuid. Change-Id: Ib7ff5109b161592f24fc86fc7e93a407655fab86 BUG: 1342453 Reviewed-on: http://review.gluster.org/#/c/14425 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/14641 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* cluster/ec: Pass xdata to dht in case of errorAshish Pandey2016-06-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Problem: In case of mkdir failure, dht expects error information so that it can act accordingly. Aftre adding bricks and re balance, layout gets changed. Fop "mkdir" with old layout returns EIO. EC gets this error in xdata but does not pass it back to dht. In this case dht will not be able to take corrective action. Solution: Return xdata back to dht master - http://review.gluster.org/#/c/14679/ Change-Id: I24def8038e6880607689b7b046dc6428f564c6ab BUG: 1344595 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14689 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* afr: Consider ENOSPC and EDQUOT as symmetric errorsRavishankar N2016-06-122-5/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14604/ Problem: Since commit 8eaa3506ead4f11b81b146a9e56575c79f3aad7b, in replica 3, if a brick is down and a create fails on the other 2 brick with EDQUOT, we consider it an unsymmetric error and hence do not do post-op. So the dirty xattr remains set on the parent dir, leading to conservative merges during heal when all bricks are up. i.e. a file deleted on the source might re-appear after heal. Fix: Consider ENOSPC and EDQUOT as symmetric errors since there is no possibility of partial inode or entry modification operations possible when quota is enabled. IOW, if quota reports EDQUOT, the no. of bytes written (or not written) will be the same on all bricks of the replica. Likewise, the entry operation (create, mkdir...) will either succeed or not succeed on all bricks. Change-Id: Iacb1108e9ef4a918e36242fb4a957455133744e9 BUG: 1344561 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14688 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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/ec: Restrict the launch of replace brick healAshish Pandey2016-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Problem: When features.cache-invalidation is ON, a lot of ec_notify function gets called which leads to launch of too many heals. This leads to no heal completion, which causes accumulation of heals. Solution: ec_launch_replace_heal should not be launch for every event. Replace brick will trigger a child up event and then only this heal function should be called. master - http://review.gluster.org/#/c/14649/ Change-Id: I57b44c6a279d57230daea1d93229be6069245b7d BUG: 1342964 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14652 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* libglusterfs: Even anonymous fds must have fd->flags setRaghavendra Talur2016-06-083-12/+13
| | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/10219 We do not set the same flags to anonymous fd that posix uses to open an anonymous fd in the backend. If there are any xlators which rely on these flags for their operation they may not work well. Add proper flags to anonymous fds at the time of their creation and refer to them for subsequent operations. Change-Id: I60d5b04ab851c31fbe4e5e74bee1af1b14daa52e BUG: 1342903 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/14662 Tested-by: Krutika Dhananjay <kdhananj@redhat.com> 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: Pranith Kumar Karampuri <pkarampu@redhat.com>