summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: use <sys/sysmacros.h> for makedev(3), major(3), minor(3)Kaleb S. KEITHLEY2016-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | gnu glibc (libc) in Fedora 26 (rawhide) has turned off "compat" for makedev(), major(), and minor(3) decls. 3.8.2 on F26 built with warnings, see: https://kojipkgs.fedoraproject.org//packages/glusterfs/3.8.2/1.fc26/data/logs/x86_64/build.log More recent builds of other packages (namely nfs-ganesha) indicate that these warnings would now be errors, and, will be errors when 3.8.3 is released and built. Change-Id: I3caa0d05f5de695818753e40e754da8b40d2011c BUG: 1367527 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/15182 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: Niels de Vos <ndevos@redhat.com>
* quota: change the log level from warning to infoManikandan Selvaganesh2016-08-171-1/+1
| | | | | | | | | | | | Change-Id: Icac7d87bb6c5ecc813528690e03c821bbe3789b5 BUG: 1357463 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14940 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* protocol/client: Unserialize xdata even if lookup failsAnuradha Talur2016-08-172-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: AFR relies on xdata returned by lookup to determine if there are any files that need healing. This info is further used to optimize readdirp. In case of lookups with negative return value, client xlator was sending NULL xdata. Due to absence of xdata, AFR conservatively assumes that there are files that need healing, which is incorrect. Solution: Even in case of unsuccessful lookups, send the xdata received by protocol client so that higher xlators can get the info that they rely on. Change-Id: Id3a1023eb536180888eb2c0b39050000b76f7226 BUG: 1366284 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/15120 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Poornima G <pgurusid@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ashish Pandey <aspandey@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: Fix volume restart issue upon glusterd restartSamikshan Bairagya2016-08-173-2/+42
| | | | | | | | | | | | | | | | | | | | | | | http://review.gluster.org/#/c/14758/ introduces a check in glusterd_restart_bricks that makes sure that if server quorum is enabled and if the glusterd instance has been restarted, the bricks do not get started. This prevents bricks which have been brought down purposely, say for maintainence, from getting started upon a glusterd restart. However this change introduced regression for a situation that involves multiple volumes. The bricks from the first volume get started, but then for the subsequent volumes the bricks do not get started. This patch fixes that by setting the value of conf->restart_done to _gf_true only after bricks are started correctly for all volumes. Change-Id: I2c685b43207df2a583ca890ec54dcccf109d22c3 BUG: 1367478 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-on: http://review.gluster.org/15183 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>
* stripe: Fix wrong pathinfo in striped-replicated volumeEkasit Kijsipongse2016-08-161-1/+1
| | | | | | | | | | | | | Change-Id: I05b3ba6757d5b786daf7cb3a64e6ac6676e9c997 BUG: 1200914 Signed-off-by: Ekasit Kijsipongse <ekasit.kijsipongse@nectec.or.th> Reviewed-on: http://review.gluster.org/11375 Tested-by: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> 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: Jeff Darcy <jdarcy@redhat.com>
* socket: SSL_shutdown should be called before socket shutdownRajesh Joseph2016-08-161-13/+28
| | | | | | | | | | | | | | SSL_shutdown shuts down an active SSL connection. But we are calling this after underlying socket is disconnected. Change-Id: Ia943179d23395f42b942450dbcf26336d4dfc813 BUG: 1362602 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/15072 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>
* storage/posix: Log EEXIST failures at DEBUG log-levelKrutika Dhananjay2016-08-161-3/+6
| | | | | | | | | | | Change-Id: I56f160058d2e2751ca75f1f75ea8254a1b8a6bf3 BUG: 1367258 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15161 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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* md-cache: Add logging to increase debuggabilityPoornima G2016-08-152-9/+51
| | | | | | | | | | | | Change-Id: I147d16ec3c20d3372892fdd5f62010e52f82f8bd BUG: 1211863 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15069 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: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* logging: Fix per xl log levelPoornima G2016-08-153-42/+75
| | | | | | | | | | | | | | | | | | | Currently per xlator loglevel setting doesn't work, due to the flaw in loglevel checking. Fix the same. Per xlator logging can be set using the below command: Eg: setfattr -n trusted.glusterfs.patchy-md-cache.set-log-level -v TRACE /mnt/glusterfs/0 Change-Id: I8ff1d15bd5693b6f682d99bee22a4bbb5eee646c BUG: 1362520 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15071 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: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/afr: Bug fixes in txn codepathKrutika Dhananjay2016-08-151-2/+2
| | | | | | | | | | | | | | | | | | AFR sets transaction.pre_op[] array even before actually doing the pre-op on-disk. Therefore, AFR must not only consider the pre_op[] array but also the failed_subvols[] information before setting the pre_op_done[] flag. This patch fixes that. Change-Id: I78ccd39106bd4959441821355a82572659e3affb BUG: 1363721 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15145 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* libglusterfs: add gf_get_mem_type()Niels de Vos2016-08-152-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | gfapi needs to provide a function towards applications to free memory that it allocated. Depending on how the application is compiled/linked, it could use a different memory allocator than Gluster itself. Therefore it is not safe for gfapi to request applications to free memory with 'standard' free(). Examples for this are Gluster allocated structures with GF_CALLOC() when memory accounting is enabled (the default). Some gfapi functions use malloc() to allocate memory as a workaround, but the free() from the jemalloc implementation should not be combined with the malloc() from glibc. Change-Id: I626cd1a60abf8965f9263290f4045d1f69fc2093 BUG: 1344714 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/15108 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* libglusterfs: move alloca0 definition to common-utilsRavishankar N2016-08-124-4/+3
| | | | | | | | | | | | | | ...and remove their definitons from EC and AFR. Also `s/alloca+memset0/alloca0` wherever it is used. Change-Id: I3b71e596d12a7d8900f5d761af6b98305c8874d5 BUG: 1366226 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15147 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>
* glfsheal: print brick name and path even when brick is downRavishankar N2016-08-111-9/+5
| | | | | | | | | | | | | | | | | The xml variant of heal info command does not display brick name when the brick is down due to a failure to fetch the hostUUID. But the non xml variant does. So fixed the xml variant to print the remote_host and remote_subvol even when the brick is down. Change-Id: I16347eb4455b9bcc7a9b0127f8783140b6016578 BUG: 1366222 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15146 Reviewed-by: Anuradha Talur <atalur@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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* rpc: fixing illegal memory accessMuthu-vigneshwaran2016-08-111-1/+1
| | | | | | | | | | | | | | CID:1357876 Change-Id: I34eee0bf0367f963ddf6e9d6b28b7d3a9af12c90 BUG: 789278 Signed-off-by: Muthu-vigneshwaran <mvignesh@redhat.com> Reviewed-on: http://review.gluster.org/15094 Tested-by: Muthu Vigneshwaran 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: Jeff Darcy <jdarcy@redhat.com>
* gfapi: add missing glfs_truncateJeff Darcy2016-08-116-4/+171
| | | | | | | | | | | | Change-Id: I80b016090a4d9d86278a0a5144dd58c0cbfe9bb2 BUG: 1365489 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/13927 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: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: Convert volume to replica after adding brick self heal is not ↵Mohit Agrawal2016-08-112-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triggered Problem: After add brick to a distribute volume to convert to replica is not triggering self heal. Solution: Modify the condition in brick_graph_add_index to set trusted.afr.dirty attribute in xlator. Test : To verify the patch followd below steps 1) Create a single node volume gluster volume create <DIS> <IP:/dist1/brick1> 2) Start volume and create mount point mount -t glusterfs <IP>:/DIS /mnt 3) Touch some file and write some data on file 4) Add another brick along with replica 2 gluster volume add-brick DIS replica 2 <IP>:/dist2/brick2 5) Before apply the patch file size is 0 bytes in mount point. BUG: 1365455 Change-Id: Ief0ccbf98ea21b53d0e27edef177db6cabb3397f Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/15118 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* gfapi: use const qualifier for glfs_*timens()Oleksandr Natalenko2016-08-102-6/+8
| | | | | | | | | | | | | | | | | | | | glfs_*timens() functions have the last argument of struct timespec type that is supposed to be const. Now using glfs_*timens() in fops, implemented on top of FUSE library, leads to compiler-time warning about discarding const qualifier. Introducing const qualifier does not break ABI, so let's just fix it. Change-Id: Iea2a1018de7dce67f67a8229671a5978246de800 BUG: 1365506 Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15119 Smoke: Gluster Build System <jenkins@build.gluster.org> 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>
* gfapi: Fix IO error caused when there is consecutive graph switchesPoornima G2016-08-103-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part 2 of the fix, the part 1 can be found at: http://review.gluster.org/#/c/14656/ Problem: ======= Consider a race between, __glfs_active_subvol() and graph_setup(). Lets say @TIME T1: fs->active_subvol = A fs->next_subvol = B __glfs_active_subvol() //under lock fs->mutex { .... new_subvol = fs->next_subvol //which is B .... //Start migration from A to B __glfs_first_lookup(){ .... unlock fs->mutex //@TIME T2 network fop lock fs->mutex .... } .... //migration continue on B fs->active_subvol = fs->next_subvol //which is C (explained below) .... } @Time T2, lets say in another thread, graph_setup() is called with C, note that at T2, fs->mutex is unlocked. graph_stup(C...) { lock fs->mutex .... if (fs->next_subvol) // which is B destroy subvol (fs->next_subvol) .... fs->next_subvol = C .... unlock fs->mutex } Thus at the end of this, fs->old_subvol = A; fs->active_subvol = C; fs->next_subvol = NULL; which is wrong, as B completed migration, but was destroyed by graph_setup, and C never was migrated. Solution: ========= Any new graph can be in one of the 2 states: - Picked for migration, migration in progress (fs->mip_subvol) - Not picked so far for migration (fs->next_subvol) graph_setup() updates fs->next_subvol only, __glfs_active_subvol() moves fs->next_subvol to fs->mip_subvol and fs->next_subvol = NULL atomically, and then once the migration is complete, make that the fs->active_subvol Change-Id: Ib6ff0565105c5eedb912a43da4017cd413243612 BUG: 1343038 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14722 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 Talur <rtalur@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* inode: Adjust lru_size while retiring entries in lru listSoumya Koduri2016-08-092-1/+18
| | | | | | | | | | | | | | | | | As part of inode_table_destroy(), we first retire entries in the lru list but the lru_size is not adjusted accordingly. This may result in invalid memory reference in inode_table_prune if the lru_size > lru_limit. Change-Id: I29ee3c03b0eaa8a118d06dc0cefba85877daf963 BUG: 1364026 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/15087 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* georep: tests for logrotate, create+rename, hard-link renameMilind Changire2016-08-092-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * log rotate eg. with rotate count as 2 and with the following files created x.log, x.log.1 and x.log.2, another iteration of logrotate results in the following operations to be performed x.log.2 is renamed to x.log.3 x.log.1 is renamed to x.log.2 x.log is renamed to x.log.1 x.log.3 is deleted x.log is created [possible gfid allocated that belonged to x.log.3] when a file is created, there's a big possibility that a gfid used earlier can be reassigned and reused. This causes RENAME operations to fail on slave nodes when logs are replayed, typically on a Georep restart. A function called logrotate_simulate has been added to tests/geo-rep.rc to help simulate this situation. Starting from a clean state, logrotate_simulate has to be called 4 times with a rotate count of 2 to help the logs roll over and cause a delete at the end and a gfid reallocation. With the bug-fix in place, this test should not cause the Georep session to go into a Faulty state. * create+rename On log replay after Georep restart, a create+rename causes an entry to be created for the original file, but it cannot be linked to the gfid back-end since it is associated with the renamed file before the Georep restart. A function create_rename simulates the create+rename scenario and the function create_rename_ok tests if the dangling entry is present at the slave mount. With the bug-fix in place, a dangling entry with the original name should not be found at the slave mount after logs are replayed after a Georep restart. * hard-link rename This case is similar to the create+rename case except that this is a case of renaming hard-link to one of its other names. A function hardlink_rename has been added to tests/geo-rep.rc which simulates the creation and rename of hard-link. After a Georep session restart, the test function hardlink_rename_ok should not find the source link name on the slave. With the bug-fix in place, this test should not fail. If changelogs have been enabled on the slave as well, then the logs should show an UNLINK entry for the source link name, since a rename operation of a hard link to one of its names essentially just drops the source name as per the 'mv' command semantics. Change-Id: I85b196c00cf79a11bada25ef2fe5f1dc5c0c858a BUG: 1316389 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/13663 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: Aravinda VK <avishwan@redhat.com>
* features/libgfchangelog: Log failure in gf_histroy_changelogKotresh HR2016-08-095-6/+34
| | | | | | | | | | | | | | | | | Add error logs if gf_history_changelog fails. If requested changelog range is not available, log the error and exit instead of continuing the loop and exiting in readdir without logging. Also fixed the duplicate MSGID number in 'changelog-lib-messages.h' Change-Id: Icd71b89ae23b48a71380657ba5649029c32fabfd BUG: 1362151 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/15064 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: Aravinda VK <avishwan@redhat.com>
* eventsapi: Python library for gf_eventAravinda VK2016-08-093-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python library to emit Events from Geo-replication or any other Python apps running in storage nodes. Add $LIBEXEC/glusterfs/events to Python path to use gf_event gf_event(event_type, **kwargs) For example, sys.path.insert(1, "LIBEXECDIR/glusterfs") from events.gf_event import gf_event from events import eventtypes gf_event(eventtypes.GEOREP_FAULTY, volname="gv1", slaveuser="root", slavehost="node1", slavevol="gv2") Errors will be logged in $LOGDIR/glusterfs/events.log BUG: 1362144 Change-Id: I2af2bd77f9961975e4387006b9e99e4543e12b57 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/15063 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: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* glusterd : skip non directories inside /var/lib/glusterd/volsJiffin Tony Thottan2016-08-082-0/+49
| | | | | | | | | | | | | | | | Right now glusterd won't come up if vols directory contains an invalid entry. Instead of doing that with this change a message will be logged and then skip that entry Change-Id: I665b5c35291b059cf054622da0eec4db44ec5f68 BUG: 1318591 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13764 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> 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>
* posix: Do not move and recreate .glusterfs/unlink directoryAshish Pandey2016-08-082-11/+94
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: At the time of start of a volume, it is checked if .glusterfs/unlink exist or not. If it does, move it to landfill and recreate unlink directory. If a volume is mounted and we write data on it till we face ENOSPC, restart of that volume fails as it will not be able to create unlink dir. mkdir will fail with ENOSPC. This will not allow volume to restart. Solution: If .glusterfs/unlink directory exist, don't move it to landfill. Delete all the entries inside it. Change-Id: Icde3fb36012f2f01aeb119a2da042f761203c11f BUG: 1360679 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/15030 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@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>
* build: systemd unit should not be marked executableNiels de Vos2016-08-072-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | systemd complains about the unit for GlusterD when it is executable: Configuration file /usr/lib/systemd/system/glusterd.service is marked executable. Please remove executable permission bits. Proceeding anyway. The Makefile that installs the unit has some scripted commands. These are not needed and standard "*dir" and "*DATA" postfixes for variables can be used instead. The EXTRA_DIST variable is needed for building the 'make dist' tarball on systems where there is no systemd. The unit would be missing from the tarball if it is not explicitly included. BUG: 1354489 Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 Reported-by: Sergej Pupykin <ml@sergej.pp.ru> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14892 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* build: correct date in the %changelogNiels de Vos2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Building RPMs failed for me because of an incorrect date in the %changelog in the .spec. It seems that rpmlint identifies is as well: $ rpmlint glusterfs.spec ... (snipped non critical errors) glusterfs.spec: E: specfile-error warning: bogus date in %changelog: Wed Jul 15 2016 Aravinda VK <avishwan@redhat.com> Changed the date in the .spec to the date of the latest version (v16) of the patch that adds eventing (commit 5ed781ecf). BUG: 1334044 Change-Id: I5ef5003e227a83479f24103fc67139d7287fbc39 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/15099 Reviewed-by: Kaleb KEITHLEY <kkeithle@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>
* posix: honour fsync flags in posix_do_zerofillRavishankar N2016-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | commit 6d994661db96cad43f26d0d1e2fba31dce9a76f5 introduced fallocate + FALLOC_FL_ZERO_RANGE to do posix_do_zerofill but did not do an fsync if O_SYNC or O_DSYNC fd flags were set. Prashant Pai pointed out performing fallocate(2) does not remove the necessity to do fsyncs if durability is desired: http://linux-fsdevel.vger.kernel.narkive.com/bDmrAUlh/fallocate-falloc-fl-punch-hole So fixed it to honour the fd flags. Change-Id: I27ae90b429185d0af29a5e632c4a8b242075a899 BUG: 1364449 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15100 Reviewed-by: Prashanth Pai <ppai@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> 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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* meta: fix memory leak in meta xlatorsMohammed Rafi KC2016-08-051-0/+5
| | | | | | | | | | | | | | | | meta xlator is leaking iobuf and iobrefs in read path This patch fixes memleak in meta_default_read code path Change-Id: Ieb413267604d9870dbe6e11258fffd279a7bd7cf BUG: 1362397 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/15068 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com>
* md-cache/upcall: In case of mode bit change invalidate xattrPoornima G2016-08-043-28/+62
| | | | | | | | | | | | | | | | | | | When the mode bits are changed, the ACL entries also do get affected. Currently in upcall, setattr invalidates only the stat info. With this patch, if mode bits are changed, the upcall will invalidate all the xattrs. Change-Id: Iccda2e1a7440ee845aa5442bf51970f74d9b0862 BUG: 1211863 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15043 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* tests: fix spurious failure in tests/bugs/glusterd/bug-1089668.tAtin Mukherjee2016-08-041-2/+1
| | | | | | | | | | | | | | Instead of rebalance stop, its always better to wait for rebalance to complete as the former doesn't have any purpose. Change-Id: Ia1bc2a34d937a0a96543bebd257dcda619f12474 BUG: 1363948 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15085 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>
* libglusterfs: fix glusterd statedump crashAtin Mukherjee2016-08-043-2/+11
| | | | | | | | | | | | | | | | | | commit 3c04a91 removed setting typeStr to NULL if num_allocs is set to 0, this has caused this regression. Code has been put back like earlier and to avoid statedump printing all the NULL values check is modified to see skip the records if num_allocs is 0 instead of total_allocs Change-Id: Ib8bcc2fba908e88cf52b641c3f6bcba74f5e667c BUG: 1359190 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14987 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> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* xlators/ganesha : Remove the ganesha xlator code entirely from sourceJiffin Tony Thottan2016-08-048-154/+4
| | | | | | | | | | | | | | | | | ganesha xlator is dummy xlator which introduced as part of cli options. But all the ganesha related cli commands are handled from glusterd only. There is no point in keeping this xlator. Hence removing the same since it does not have any role in NFS-Ganesha intergration with gluster Change-Id: Id438d2fabd3afe7e91ae26522df8495c8e9e9308 BUG: 1361999 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15055 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> 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>
* mgmt/glusterd: Enable client-io-threads by defaultPranith Kumar K2016-08-041-1/+1
| | | | | | | | | | | | BUG: 1361678 Change-Id: Ic013a772ffc3f8c93673bbee064ff4cc372fe128 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15051 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: Prashanth Pai <ppai@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* eventsapi: Geo-replication User driven eventsAravinda VK2016-08-042-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following Geo-replication Events are added GEOREP_CREATE/GEOREP_START/GEOREP_STOP/GEOREP_DELETE/GEOREP_PAUSE/GEOREP_RESUME { "nodeid": NODEID, "ts": TIMESTAMP, "event": EVENT_TYPE, "message": { "master": MASTER_VOLUME_NAME, "slave": SLAVE_DETAILS } } GEOREP_CONFIG_SET { "nodeid": NODEID, "ts": TIMESTAMP, "event": GEOREP_CONFIG_SET, "message": { "master": MASTER_VOLUME_NAME, "slave": SLAVE_DETAILS, "option": OPTION_NAME, "value": OPTION_VALUE } } GEOREP_CONFIG_RESET { "nodeid": NODEID, "ts": TIMESTAMP, "event": GEOREP_CONFIG_RESET, "message": { "master": MASTER_VOLUME_NAME, "slave": SLAVE_DETAILS, "option": OPTION_NAME } } BUG: 1363591 Change-Id: I78c81aabd022ebb042b3eae3c6b5a284a6c2801f Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/15077 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: Kotresh HR <khiremat@redhat.com>
* cluster/afr: copy loc before passing to syncopPranith Kumar K2016-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | | Problem: When io-threads is enabled on the client side, io-threads destroys the call-stub in which the loc is stored as soon as the c-stack unwinds. Because afr is creating a syncop with the address of loc passed in setxattr by the time syncop tries to access it, io-threads would have already freed the call-stub. This will lead to crash. Fix: Copy loc to frame->local and use it's address. BUG: 1361678 Change-Id: I16987e491e24b0b4e3d868a6968e802e47c77f7a Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15070 Reviewed-by: Ravishankar N <ravishankar@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>
* glusterd: clean up old port and allocate new one on every restartAtin Mukherjee2016-08-038-79/+46
| | | | | | | | | | | | | | | | | | | | | | | | GlusterD as of now was blindly assuming that the brick port which was already allocated would be available to be reused and that assumption is absolutely wrong. Solution : On first attempt, we thought GlusterD should check if the already allocated brick ports are free, if not allocate new port and pass it to the daemon. But with that approach there is a possibility that if PMAP_SIGNOUT is missed out, the stale port will be given back to the clients where connection will keep on failing. Now given the port allocation always start from base_port, if everytime a new port has to be allocated for the daemons, the port range will still be under control. So this fix tries to clean up old port using pmap_registry_remove () if any and then goes for pmap_registry_alloc () Change-Id: If54a055d01ab0cbc06589dc1191d8fc52eb2c84f BUG: 1221623 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15005 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: Avra Sengupta <asengupt@redhat.com>
* commn-HA: Add portblock RA to tickle packets post failover(/back)Soumya Koduri2016-08-032-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Portblock resource-agents are used to send tickle ACKs so as to reset the oustanding tcp connections. This can be used to reduce the time taken by the NFS clients to reconnect post IP failover/failback. Two new resource agents (nfs_block and nfs_unblock) of type ocf:portblock with action block & unblock are created for each Virtual-IP (cluster_ip-1). These resource agents along with cluster_ip-1 RA are grouped in the order of block->IP->unblock and also the entire group maintains same colocation rules so that they reside on the same node at any given point of time. The contents of tickle_dir are of the following format - * A file is created for each of the VIPs used in the ganesha cluster. * Each of those files contain entries about clients connected as below: SourceIP:port_num DestinationIP:port_num Hence when one server failsover, connections of the clients connected to other VIPs are not affected. Note: During testing I observed that tickle ACKs are sent during failback but not during failover, though I/O successfully resumed post failover. Also added a dependency on portblock RA for glusterfs-ganesha package as it may not be available (as part of resource-agents package) in all the distributions. Change-Id: Icad6169449535f210d9abe302c2a6971a0a96d6f BUG: 1354439 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/14878 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> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* gfapi: fix glfs_set_volfile_server docPrasanna Kumar Kalever2016-08-021-4/+3
| | | | | | | | | | | | | | | | | | | | Gluster supports volume file fetching over transports tcp and unix only. The current glfs_set_volfile_server() doc misleads by mentioning rdma, which is removed by this patch. More about the discussion around @ http://www.gluster.org/pipermail/gluster-devel/2016-July/050114.html Change-Id: I08cfe262fb9a82cb341f6adbe93594c8e628b7fe BUG: 1359370 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14995 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> 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: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* events: move conditional macro check USE_EVENTS inside gf_eventsAtin Mukherjee2016-08-023-13/+3
| | | | | | | | | | | | Change-Id: I88279b11b648e676a4544bbb55c7466fbc55ffa7 BUG: 1361983 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15054 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: Kotresh HR <khiremat@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* eventsapi: Auto generate header files during makeAravinda VK2016-08-016-59/+46
| | | | | | | | | | | | | | | | | | $SRC/libglusterfs/src/eventtypes.h and $SRC/events/src/eventtypes.py are generated by running `python $SRC/events/eventskeygen.py` Header files generation step is added to make file itself, Now All new events should be added to only to $SRC/events/eventskeygen.py file. BUG: 1361094 Change-Id: I384961ef2978ca2d0be37f288b39ac0d834bdf06 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/15035 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Fix memory leak in glusterd (un)lock RPCsroot2016-08-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: At the time of execute "gluster volume profile <vol> info" command It does have memory leak in glusterd. Solution: Modify the code to prevent memory leak in glusterd. Fix : 1) Unref dict and free dict_val buffer in glusterd_mgmt_v3_lock_peer and glusterd_mgmt_v3_unlock_peers. Test : To verify the patch run below loop to generate io traffic for (( i=0 ; i<=1000000 ; i++ )); do echo "hi Start Line " > file$i; cat file$i >> /dev/null; done To verify the improvement in memory leak specific to glusterd run below command cnt=0;while [ $cnt -le 1000 ]; do pmap -x <glusterd-pid> | grep total; gluster volume profile distributed info > /dev/null; cnt=`expr $cnt + 1`; done After apply this patch it will reduce leak significantly. Change-Id: I52a0ca47adb20bfe4b1848a11df23e5e37c5cea9 BUG: 1352854 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/14862 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/ganesha : remove ganesha xlator from client graphJiffin Tony Thottan2016-07-311-22/+0
| | | | | | | | | | | | | | | | | | The ganesha introduced in dummy xlator in the client graph, which is used for introducing the cli options. When the volume set command "ganesha.enable" ran, this xlator will add into client graph but never removed from it. In my opinion there is no point in adding the ganesha xlator in the client graph Change-Id: I926c4b4adf991361aa459679e275cb58246c5294 BUG: 1349270 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14871 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* io-stats: fix translator namesJeff Darcy2016-07-293-6/+42
| | | | | | | | | | | Change-Id: Icf5afaee8b7c704aecab7f8a8a1df9f1bc9288ce BUG: 1360401 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/15016 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: Vijay Bellur <vbellur@redhat.com>
* gluster man page: Add output option "--xml" to man page of glusterMohit Agrawal2016-07-291-2/+2
| | | | | | | | | | | BUG: 1360670 Change-Id: Ia167bb5b541a12459f70ab1205bd4ffdab8c7e65 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/15027 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: Vijay Bellur <vbellur@redhat.com>
* cluster/tier: dont promote if estimated block consumption > hi watermarkMilind Changire2016-07-292-50/+153
| | | | | | | | | | | | | | | | | | Add test to fail promotion if estimated block consumption grows beyond hi watermark. Skip file migrations until next cycle if tier_get_fs_stat() fails in tier_migrate_using_query_file() Change-Id: Ice04572fa739c09109c4433e65965197482a7beb BUG: 1349284 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/14780 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: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* Snapshot/xml:xml output for snapshot cloneMohammed Rafi KC2016-07-292-3/+73
| | | | | | | | | | | | | | | | | | Snapshot clone is used to create a regular volume from snapshot. Currently snapshot clone is not supporting xml outout. This change introduce a xml output for snapshot clone command Change-Id: I417b480d36f9d84ee088004999b041c9619edd50 BUG: 1207604 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/10065 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Avra Sengupta <asengupt@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: Rajesh Joseph <rjoseph@redhat.com>
* tests: Fix get_pending_heal_count check in ecRavishankar N2016-07-2911-4/+4
| | | | | | | | | | | | | | | | Continuation of http://review.gluster.org/#/c/14985. Also renamed tests/bugs/disperse to tests/bugs/ec for a better correlation to tests/basic/ec and xlators/cluster/ec Change-Id: I662b3477c12af8a0b94597769e8f00f354b1168c BUG: 1332054 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15006 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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* posix: leverage FALLOC_FL_ZERO_RANGE in zerofill fopRavishankar N2016-07-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | posix_zerofill() implements zerofilling of a given (offset,length) by doing a writev in a loop followed by an optional fsync on the file. fallocate(2) has a FALLOC_FL_ZERO_RANGE flag which does away with all this and provides the same result (from a userspace application point of view) with a single syscall. This patch attempts the zerofill with the latter and falls back to the former if it fails. Tested using a libgfapi based C program on XFS and observed using gdb that posix_zerofill()'s call to fallocate with FALLOC_FL_ZERO_RANGE was a success. Change-Id: I77e9b7de0d59c255f06b0c39c43a276990081727 BUG: 1361249 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15037 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>
* storage/posix: Look for file in "unlink" dir IFF open on real-path fails ↵Krutika Dhananjay2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | with ENOENT PROBLEM: In some of our users' setups, open() on the anon fd failed for a reason other than ENOENT. But this error code is getting masked by a subsequent open() under posix's hidden "unlink" directory, which will fail with ENOENT because the gfid handle still exists under .glusterfs. And the log message following the two open()s ends up logging ENOENT, causing much confusion. FIX: Look for the presence of the file under "unlink" ONLY if the open() on the real_path failed with ENOENT. Change-Id: Ifb674dc7123f79fec9a9ac1ec7bf832f4df17627 BUG: 1361300 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15039 Reviewed-by: Pranith Kumar Karampuri <pkarampu@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>
* io-threads: distribute work fairly among clientsJeff Darcy2016-07-283-13/+107
| | | | | | | | | | | | | This is the full "queue of queues" approach where each client gets its own queue (per priority) and we round-robin among them. Change-Id: I73955d1b9bb93f2ff781b48dfe2509009c519ec6 BUG: 1360402 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14904 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>