summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* posix: add null gfid checksRavishankar N2017-08-084-0/+50
| | | | | | | | | | | | | | | | | | ...in file/dir creation and lookup codepaths. The check is relaxed for fops coming from trash xlator at the moment until trash has client side logic to send the create fops with gfid-req. Also fixed the missing trash pid assignment in creates sent by trash xlator. Without this, truncated files won't be moved to .trashcan. Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8 BUG: 1478297 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17975 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* cluster/dht: Check for open fd only on EBADFN Balachandran2017-08-085-161/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | DHT fd based fops used to check if the fd was open on the cached subvol before winding the call. However, this introduced a performance regression of about 30% for reads. This check was introduced to handle cases where files were migrated while IOs were happening. As this is not the common case, dht will now check if the fd is open on the cached subvol only if the call fails with EBADF. This will prevent a performance hit where a rebalance is not running. Change-Id: I2035a858d63c3fcd22bb634055bbb0ad01686808 BUG: 1476665 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17976 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* nfs : add NULL check for call state in nfs3_call_state_wipeJiffin Tony Thottan2017-08-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refcounting added for nfs call state in https://review.gluster.org/17696. This is based on assumption that call state won't NULL when it is freed. But currently gluster nfs server is crashing in different scenarios at nfs3_getattr() with following bt #0 0x00007ff1cfea9205 in _gf_ref_put (ref=ref@entry=0x0) at refcount.c:36 #1 0x00007ff1c1997455 in nfs3_call_state_wipe (cs=cs@entry=0x0) at nfs3.c:559 #2 0x00007ff1c1998931 in nfs3_getattr (req=req@entry=0x7ff1bc0b26d0, fh=fh@entry=0x7ff1c2f76ae0) at nfs3.c:962 #3 0x00007ff1c1998c8a in nfs3svc_getattr (req=0x7ff1bc0b26d0) at nfs3.c:987 #4 0x00007ff1cfbfd8c5 in rpcsvc_handle_rpc_call (svc=0x7ff1bc03e500, trans=trans@entry=0x7ff1bc0c8020, msg=<optimized out>) at rpcsvc.c:695 #5 0x00007ff1cfbfdaab in rpcsvc_notify (trans=0x7ff1bc0c8020, mydata=<optimized out>, event=<optimized out>, data=<optimized out>) at rpcsvc.c:789 #6 0x00007ff1cfbff9e3 in rpc_transport_notify (this=this@entry=0x7ff1bc0c8020, event=event@entry=RPC_TRANSPORT_MSG_RECEIVED, data=data@entry=0x7ff1bc0038d0) at rpc-transport.c:538 #7 0x00007ff1c4a2e3d6 in socket_event_poll_in (this=this@entry=0x7ff1bc0c8020, notify_handled=<optimized out>) at socket.c:2306 #8 0x00007ff1c4a3097c in socket_event_handler (fd=21, idx=9, gen=19, data=0x7ff1bc0c8020, poll_in=1, poll_out=0, poll_err=0) at socket.c:2458 #9 0x00007ff1cfe950f6 in event_dispatch_epoll_handler (event=0x7ff1c2f76e80, event_pool=0x5618154d5ee0) at event-epoll.c:572 #10 event_dispatch_epoll_worker (data=0x56181551cbd0) at event-epoll.c:648 #11 0x00007ff1cec99e25 in start_thread () from /lib64/libpthread.so.0 #12 0x00007ff1ce56634d in clone () from /lib64/libc.so.6 This patch add previous NULL check move from __nfs3_call_state_wipe() to nfs3_call_state_wipe() Change-Id: I2d73632f4be23f14d8467be3d908b09b3a2d87ea BUG: 1479030 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/17989 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>
* afr: Prevent null gfids in self-heal entry re-creationRavishankar N2017-08-081-3/+11
| | | | | | | | | | | Change-Id: I5acb8bd0a19fc4e764d61e349bb690b5236ee610 BUG: 1478297 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17981 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Karthik U S <ksubrahm@redhat.com>
* gfapi: Duplicate the buffer sent in setxattr callsPoornima G2017-08-077-12/+34
| | | | | | | | | | | | | | | | | | | | | Issue: The caller of glfs_setxattr sends a buffer to set as the value. We create a dict in which the pointer to the value is set. Underlying layers like md-cache take a ref on this dict to store the value for a longer time. But the moment setxattr is complete, the caller of glfs_setxattr can free the value memory. Solution: memcpy the setxattr value to the gluster buffer. Change-Id: I58753fe702e8b7d0f6c4f058714c65d0ad5d7a0a BUG: 1477488 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/17967 Reviewed-by: soumya k <skoduri@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* read-only : currently read-only doesn't implement fallocateSonaArora2017-08-073-0/+20
| | | | | | | | | | | | | | | | | PROBLEM STATEMENT: read-only should block fallocate call if its enabled, else pass to next xlator. Implemented this functionality in read-only. BUG: 1475300 Change-Id: I57c51eb4f1519ba75d7291eba49554e6ed4a25eb Signed-off-by: SonaArora <aarorasona@gmail.com> Reviewed-on: https://review.gluster.org/17879 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Karthik U S <ksubrahm@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Karthik U S <ksubrahm@redhat.com> Reviewed-by: Ashish Pandey <aspandey@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* posix: add sanity checks for removing the gfid symlink for directoriesRavishankar N2017-08-042-14/+103
| | | | | | | | | | | | | | | ...during mkdir and rmdir. Otherwise, during entry self-heal, the directory could be left out without a .glusterfs symlink causing fops like opendir, readdir to fail. The only chance the missing symlink will be created is when a fresh lookup comes on it. Change-Id: I2e1cf1bce8962ea80187edd8f6d73e0a09cf9f8e BUG: 1477169 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17945 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* Revert "cluster/dht: Check for open fd only on EBADF"N Balachandran2017-08-042-116/+160
| | | | | | | | | | | | This reverts commit 91c9f4a19fde4894576b398252c77f730832a26a. This patch needs to be reworked. Change-Id: I4c24f647c2b1abc68fc4e9fe6eb810418e2033aa BUG: 1476665 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17970 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: Add geo-replication session details to get-state outputSamikshan Bairagya2017-08-048-36/+177
| | | | | | | | | | | | | | | This commit adds support to the get-state CLI to capture details on geo-replication session as obtained in `gluster volume geo-replication status detail` in its output. Fixes: #291 Change-Id: I2fbcba70bfdaf439522637234805545194777ed4 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-on: https://review.gluster.org/17941 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterfsd: allow subdir mountAmar Tumballi2017-08-0420-199/+659
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: 1. Take subdir mount option in client (mount.gluster / glusterfsd) 2. Pass the subdir mount to server-handshake (from client-handshake) 3. Handle subdir-mount dir's lookup in server-first-lookup and handle all fops resolution accordingly with proper gfid of subdir 4. Change the auth/addr module to handle the multiple subdir entries in option, and valid parsing. How to use the feature: `# mount -t glusterfs $hostname:/$volname/$subdir /$mount_point` Or `# mount -t glusterfs $hostname:/$volname -osubdir_mount=$subdir /$mount_point` Option can be set like: `# gluster volume set <volname> auth.allow "/subdir1(192.168.1.*),/(192.168.10.*),/subdir2(192.168.8.*)"` Updates #175 Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: https://review.gluster.org/17141 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* logging: localtime logging, cmdline, volume set optionKaleb S. KEITHLEY2017-08-0317-6/+209
| | | | | | | | | | | | | | | | | Despite the fact that appliances generally use UTC, some users really want log entries in localtime. fixes gluster/glusterfs#272 feature page: https://review.gluster.org/17807 Change-Id: I5fbf2c3eedd9eb128fb3f851dd67b2f4081c8bba Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16911 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* tests: don't use hard coded value for glusterd workdirCsaba Henk2017-08-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | A number of test referred to /var/lib/glusterd, they were adjusted to use "$GLUSTERD_WORKDIR". (This has significance for proper test runs on non-Linux platforms -- see the following #define in glusterfs.h: #ifdef GF_LINUX_HOST_OS #define GLUSTERD_DEFAULT_WORKDIR DATADIR "/lib/glusterd" #else #define GLUSTERD_DEFAULT_WORKDIR DATADIR "/db/glusterd" #endif Ie. the glusterd workdir will typically be /var/db/glusterd instead of /var/lib/glusterd on non-Linux platforms.) BUG: 1476957 Change-Id: I69ce3e1bb7a0c14ea85b60adbf8205f9aca46cd5 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://review.gluster.org/17937 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* packaging: /var/lib/glusterd/options should be %config(noreplace)Kaleb S. KEITHLEY2017-08-021-1/+1
| | | | | | | | | | | | | | | /var/lib/glusterd/options is where cluster.enabled-shared-storage is persisted. If the file is removed as part of an uninstall/reinstall or update then the state of shared storage could be lost. Change-Id: Ie18c3d883df71c1857fd6996d9c03ab247580b70 BUG: 1476861 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17930 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* tests: Minor fix in error conditionRajesh Joseph2017-08-021-0/+1
| | | | | | | | | | Change-Id: I2dcc8d88234d2ce92dd8506c61cb84ab253decab Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: https://review.gluster.org/16191 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>
* tests/gfapi : add test case for nameless lookups in glfs_resolve_component()Jiffin Tony Thottan2017-08-023-1/+171
| | | | | | | | | | | | | Plus address pending comment to add check for entry "" in glfs_resolve_component() Change-Id: I6063f776ce1cd76cb4c1b1f621b064f3dcc91e5c BUG: 1460514 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/17844 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> Reviewed-by: soumya k <skoduri@redhat.com>
* extras: Turn eager-lock off for gluster-blockPranith Kumar K2017-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | With the current implementation of eager-lock FINODELK is taking so much time that cassandra workload times out and errors out. AFR eager-locking needs to be changed similar to EC eager-locking to make things work as expected. In the interim, it is better to turn it off This is how the profile looks if eager-lock is turned on: 0.35 628.26 us 64.00 us 129882.00 us 42278 FXATTROP 17.45 16500.54 us 212.00 us 375829.00 us 79568 WRITE 81.76 209862.12 us 15.00 us 1992486.00 us 29318 FINODELK This is how profile looks if eager-lock is turned off: 1.87 283.71 us 65.00 us 298970.00 us 68346 FXATTROP 6.33 199.04 us 13.00 us 373428.00 us 330524 FINODELK 10.37 3151.47 us 53.00 us 1528484.00 us 34172 FSYNC 81.31 5110.45 us 270.00 us 1519722.00 us 165244 WRITE BUG: 1477404 Change-Id: I98026b1ecf30002ddac01be76f375c2e8c0b7838 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://review.gluster.org/17954 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* scripts: invalid test(1) in extras/S32gluster_enable_shared_storage.shKaleb S. KEITHLEY2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | test(1) man pages says -eq is for INTEGER compares, and = is for string compares. Also note the comment that -a and -o are ambiguous and to use test && test or test || test instead. This bug has existed since 2015! (yikes) Found while testing localtime logging and running glusterd in the foreground. Change-Id: Ia544f7295e247b981504d085ebc4c533ab60ba84 BUG: 1476785 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17925 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* md-cache: avoid checking the xattr value buffer with string functions.Günther Deschner2017-08-012-1/+28
| | | | | | | | | | | | | | | | | | | | | | | xattrs may very well contain binary, non-text data with leading 0 values. Using strcmp for checking empty values is not the appropriate thing to do: In the best case, it might treat a binary xattr value starting with 0 from being cached (and hence also from being reported back with xattr). In the worst case, we might read beyond the end of a data blob that does contain any zero byte. We fix this by checking the length of the data blob and checking the first byte against 0 if the length is one. Signed-off-by: Guenther Deschner <gd@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 BUG: 1476324 Reviewed-on: https://review.gluster.org/17910 Reviewed-by: Michael Adam <obnox@samba.org> 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>
* tier: separation of attach-tier from add-brickhari gowtham2017-08-0110-8/+442
| | | | | | | | | | | | | | | | | | PROBLEM: Both attach tier and add brick have the same RPC and set of code. This becomes a hurdle while tring to implement add brick on a tiered volume. FIX: This patch separates the add brick and attach tier giving them separate RPCs. Change-Id: Iec57e972be968a9ff00b15b507e56a4f6dc398a2 BUG: 1376326 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: https://review.gluster.org/15503 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: streamline logic flow in glusterd_validate_quorum()Michael Adam2017-08-011-5/+7
| | | | | | | | | | | | | | | | | | | Make an earlier exit when the volume is not of server quorum. Thereby it spares the actual quorum calculation in this case. This also increases the overall readability of the function. The patch is best seen with the --patience diff option to understand what it does (e.g. "git show --patience"). Change-Id: Ifce50bc3f73d79d3d6226473661a83696d65149a BUG: 1476719 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: https://review.gluster.org/17924 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* cluster/dht: Handle wrong rebalance status reportingSusant Palai2017-08-011-29/+32
| | | | | | | | | | | Change-Id: Id91ef35f890055cd42b9a94462f92297c77f1fff Bug: 1475282 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: https://review.gluster.org/17868 Tested-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* cluster/dht: rebalance min-free-disk fixSusant Palai2017-08-011-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | To calculate available space on a subvolume we used to do the following in __dht_check_free_space. post_availspace = (dst_statfs.f_bavail * dst_statfs.f_frsize) - stbuf->ia_size Now to subtracting the file size from available space is tricky here. Sometime available space will be lesser than the file size and since all the participating members in calculation are unsigned int, the result is a large number (integer overflow). Solution: We do not need to subtract the file size from the space available, since fallocate would have reserved file size space already. Change-Id: I4f724358c44b9911933742ff3ff8d55b3dfda1cb BUG: 1475282 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: https://review.gluster.org/17876 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* nfs: use "/" as subdir for volume mountsNiels de Vos2017-08-011-17/+14
| | | | | | | | | | | | | | | | | | | | | | For cases where subdir mounting is checked, it makes it much easier to return a subdir of "/" in case no subdir is passed. This reduces the number of corner cases where permissions are checked for subdir mounts, but not for volume mounts (or the other way around). The problem was identified by WebNFS mounting a volume, which got denied after commit e3f48fa2. Handling this would require an exception for non-subdir mounts, or make non-subdir mounts equal to subdir mounts. This change takes the 2nd approach. Change-Id: I0d810ae90b267a2cc3eac8d55368a0f1b0787f6a Fixes: e3f48fa2 ("nfs: add permission checking for mounting over WebNFS") BUG: 1468291 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17898 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* error-gen: fix randomnessJeff Darcy2017-07-312-27/+67
| | | | | | | | | | | | | | | | | This generates errors in a truly random distribution, including streaks and dry spells, instead of just setting a constant interval between errors. It also supports very small error probabilities, down to 1ppm instead of 1%. Also cleaned up some bad logic in the "random-failure" case. Change-Id: I17b058c4b86b0aa17dd5706250e6d44f242fcd9d Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17886 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/dht: Check for open fd only on EBADFN Balachandran2017-07-312-160/+116
| | | | | | | | | | | | | | | | | | DHT fd based fops will now check if the fd is open on the cached subvol only if the call fails with EBADF. This will improve performance for scenarios where a rebalance is not running which would be most of the time. Change-Id: Idfaeb8927af769c6110d07a165a0fe2307369239 BUG: 1476665 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17922 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* ec/cluster: Update failure of fop on a brick properlyAshish Pandey2017-07-311-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | Problem: In case of truncate, if writev or open fails on a brick, in some cases it does not mark the failure onlock->good_mask. This causes the update of size and version on all the bricks even if it has failed on one of the brick. That ultimately causes a data corruption. Solution: In callback of such writev and open calls, mark fop->good for parent too. Thanks Pranith Kumar K <pkarampu@redhat.com> for finding the root cause. Change-Id: I8a1da2888bff53b91a0d362b8c44fcdf658e7466 BUG: 1476205 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: https://review.gluster.org/17906 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: improve intuitivity of check in glusterd_get_quorum_cluster_countsMichael Adam2017-07-311-1/+1
| | | | | | | | | | | | | More intuitive to check for ret == 0 than !ret here... Change-Id: I8177a0bc8f266331187f5f2eeefea8a25cfcb30a Signed-off-by: Michael Adam <obnox@samba.org> BUG: 1476410 Reviewed-on: https://review.gluster.org/17912 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: fix misleadingly named GF_FOR_EACH_ENTRY_IN_DIRJeff Darcy2017-07-315-16/+16
| | | | | | | | | | | | | | | What it really does is skip irrelevant entries like . and .. until we're at an entry we might actually care about. Renamed to GF_SKIP_IRRELEVANT_ENTRIES accordingly. Change-Id: If0464451a8243c29c0a93b4c6f0f0eda2fade44c Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17901 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* changelog: add mem-pool initializationNiels de Vos2017-07-291-1/+9
| | | | | | | | | | | | | | | | | | | With recent changes to the mem-pool initialization, mem_pools_init_early() and mem_pools_init_late() need to be called before mem_get() is usable. This change has been tested manually with the included test from xlators/features/changelog/lib/examples/c/get-changes.c. Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92 BUG: 1475255 Reported-by: Kotresh HR <khiremat@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17900 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* md-cache: Use correct xattr keynames for virtual glusterfs ACLs.Günther Deschner2017-07-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | The "glusterfs.posix_acl." prefix does not catch the glusterfs posix acl xattr keynames which are * "glusterfs.posix.acl" and * "glusterfs.posix.default_acl" Using the GF_POSIX_ACL_ACCESS and GF_POSIX_ACL_DEFAULT defines directly is the savest option. Guenther Change-Id: I5aba64b26b6cbec850ea02316dd9f069400e857f BUG: 1476295 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://review.gluster.org/17909 Reviewed-by: Michael Adam <obnox@samba.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* geo-rep: Convert gfid mismatch logs to structured loggingKotresh HR2017-07-281-10/+17
| | | | | | | | | | | | | | Convert the logs related to entry failures fix due to gfid mismatch logs into structured logging format Change-Id: I9bce950c5339b48d3ec8b84bddee38b0473b7634 Updates: #246 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17896 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* tools/setgfid2path: Tool to set GFID to Path xattr in brick backendAravinda VK2017-07-289-4/+232
| | | | | | | | | | | | | | | | | | | | Once storage/gfid2path feature is enabled using `gluster volume set <volname> storage.gfid2path enable`, it starts recording the gfid2path xattr on each files. But this feature will not add xattr to the existing files. This tool accepts the file path as argument and sets the necessary xattr required for this feature. Change-Id: I75ad82c86ce482950645e687ff2e33b413fa53da Updates: #139 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: https://review.gluster.org/17839 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* mem-pool: track and verify initialization stateNiels de Vos2017-07-281-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | It is possible that pthread_getspecific() returns a non-NULL value in case the pthread_key_t is not initialized. The behaviour for pthread_getspecific() is not defined in this case. This can happen when applications use mem-pools from libglusterfs.so, but did not call mem_pools_init_early(). By tracking the status of the mem-pools initialization, it is now possible to prevent calling pthread_getspecific() in case the pthread_key_t is not initialized. In future, we might want to exend this more to faciliate debugging. Reported-by: Kotresh HR <khiremat@redhat.com> Tested-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: I6255419fe05792dc78b1eaff55bc008fc5ff3933 Fixes: 1e8e62640 ("mem-pool: initialize pthread_key_t pool_key in mem_pool_init_early()") BUG: 1475255 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17899 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* geo-rep: Fix syncing of self healed hardlinksKotresh HR2017-07-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: In a distribute replicate volume, if the hardlinks are created when a subvolume is down, it gets healed from other subvolume when it comes up. If this subvolume becomes ACTIVE in geo-rep there are chances that those hardlinks won't be synced to slave. Cause: AFR can't detect hardlinks during self heal. It just create those files using mknod and the same is recorded in changelog. Geo-rep processes these mknod and ignores it as it finds gfid already on slave. Solution: Geo-rep should process the mknod as link if the gfid already exists on slave. Change-Id: I2f721b462b38a74c60e1df261662db4b99b32057 BUG: 1475308 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17880 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* storage/posix: Add virtual xattr to fetch path from gfidKotresh HR2017-07-289-0/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gfid2path infra stores the "pargfid/bname" as on xattr value for each non directory entry. Hardlinks would have a separate xattr. This xattr key is internal and is not exposed to applications. A virtual xattr is exposed for the applications to fetch the path from gfid. Internal xattr: trusted.gfid2path.<xxhash> Virtual xattr: glusterfs.gfidtopath getfattr -h -n glusterfs.gfidtopath /<aux-mnt>/.gfid/<gfid> If there are hardlinks, it returns all the paths separated by ':'. A volume set option is introduced to change the delimiter to required string of max length 7. gluster vol set gfid2path-separator ":::" Updates: #139 Change-Id: Ie3b0c3fd8bd5333c4a27410011e608333918c02a Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17785 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd : glusterd fails to start when peer's network interface is downGaurav Yadav2017-07-283-2/+17
| | | | | | | | | | | | | | | | | | | | | Problem: glusterd fails to start on nodes where glusterd tries to come up even before network is up. Fix: On startup glusterd tries to resolve brick path which is based on hostname/ip, but in the above scenario when network interface is not up, glusterd is not able to resolve the brick path using ip_address or hostname With this fix glusterd will use UUID to resolve brick path. Change-Id: Icfa7b2652417135530479d0aa4e2a82b0476f710 BUG: 1472267 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/17813 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* changetimerecorder: Brick process crashed at ctr xlator in notify functionMohit Agrawal2017-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sometime brick process is getting crash in notify function at the time of cleanup db connection while brick mux is enabled. Solution: In changetimerrecorder (ctr) notify function after cleanup db connection set to db_conn to NULL to avoid reuse the same db connection again. Note: Below is the backtrace pattern showing by brick process #0 0x00007ff98a30c1f7 in raise () from /lib64/libc.so.6 #1 0x00007ff98a30d8e8 in abort () from /lib64/libc.so.6 #2 0x00007ff98a34bf47 in __libc_message () from /lib64/libc.so.6 #3 0x00007ff98a351b54 in malloc_printerr () from /lib64/libc.so.6 #4 0x00007ff98a3537aa in _int_free () from /lib64/libc.so.6 #5 0x00007ff97d95e311 in gf_sql_connection_fini (sql_connection=sql_connection@entry=0x7ff8e8496b50) at gfdb_sqlite3.c:42 #6 0x00007ff97d95e38a in gf_sqlite3_fini (db_conn=0x7ff92ca04470) at gfdb_sqlite3.c:507 #7 0x00007ff97d957156 in fini_db (_conn_node=0x7ff92ca04470) at gfdb_data_store.c:326 #8 0x00007ff97db78679 in notify (this=0x7ff92c5b3670, event=9, data=0x7ff92c5b5a00) at changetimerecorder.c:2178 #9 0x00007ff98bca0dc2 in xlator_notify (xl=0x7ff92c5b3670, event=event@entry=9, data=data@entry=0x7ff92c5b5a00) at xlator.c:549 #10 0x00007ff98bd3ac12 in default_notify (this=this@entry=0x7ff92c5b5a00, event=9, data=data@entry=0x7ff92c5b6d50) at defaults.c:3139 BUG: 1475632 Change-Id: Idd4bfdb4629c4799ac477ade81228065212683fb Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: https://review.gluster.org/17888 Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* libglusterfs: the global_xlator should have valid cbksNiels de Vos2017-07-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a case where Gluster/NFS needs to resolve a path outside of the nfs-xlator itself. While resolving the path to fetch the GFID for creating the NFS-filehandle, gfapi may set an inode-ctx through glfs_resolve_at(). This inode-ctx is linked with the global_xlator. Because the global_xlator does not have any cbks, loc_wipe() will cause a segfault when it calls inode_unref() and xl->cbks->forget(). It is assumed that all xlators have a cbks symbol, otherwise loading of the xlator will fail. The global_xlator is not loaded in the same way, so there is no failure noticed when the instance is created. By adding an empty `struct xlator_cbks`, the global_xlator behaves similat to other xlators that do not implement all callbacks. I would have preferred to keep the inode-ctx setting through glfs_resolve_at() contained within Gluster/NFS. Unfortunately Gluster/NFS also uses the inode-ctx, and is not prepared to see the values that glfs_resolve_at() stores there. This problem is not easily reproducible because it involves mounting over WebNFS (like Solaris 10 can do). The segfault will also not be immediate, unless the following is done: 1. create a subdir on a volume 2. mount the volume/subdir over WebNFS 3. unmount the volume/subdir 4. mount the root of the volume 5. delete the subdir on the volume -> segfault of Gluster/NFS Change-Id: I2bd71d033e97edc07ba93b2d4ada558f65d68999 BUG: 1468291 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17897 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* build: Add stamp-h2 to gitignoreAnoop C S2017-07-271-0/+1
| | | | | | | | | | | | | | Recent change https://review.gluster.org/17206 which adds site.h to sources results in the generation of another timestamp file named 'stamp-h2'. This change adds 'stamp-h2' also to gitignore. Change-Id: I2592a283ec13e99b547b38c8b374874e50d5e3c1 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/17877 Reviewed-by: Prashanth Pai <ppai@redhat.com> 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>
* group-gluster-block: Set default shard-block-size to 64MBPranith Kumar K2017-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 4MB shard size I/O slows down more because of the extra inodelk/xattrops in replicate. So increasing it to 64MB which gave better performance than 4MB. To simulate writes on a preallocated VM-image, fallocate the file and then do dd with notrunc do "fallocate -l 1GB" then "dd if=/dev/zero of=file-1GB bs=1MB count=1024 conv=notrunc" These are the results on my laptop for dd: With 4MB: 1.84 1357.37 us 19.00 us 12431.00 us 1188 FINODELK 2.45 255.08 us 58.00 us 4038.00 us 8428 WRITE 95.69 78967.76 us 30.00 us 20324240.00 us 1063 FXATTROP With 64MB: 0.13 59.36 us 15.00 us 814.00 us 657 FINODELK 6.02 225.53 us 69.00 us 6556.00 us 8205 WRITE 93.82 103015.12 us 32.00 us 13046368.00 us 280 FXATTROP BUG: 1475605 Change-Id: I4ed5441409df639e38c731ba0d140fe92902f25f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://review.gluster.org/17887 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: make peerfile parsing more robustJeff Darcy2017-07-272-14/+90
| | | | | | | | | | | | | | Differential Revision: https://phabricator.intern.facebook.com/D5498639 Change-Id: I3184ed8f3dadbdcffd46f4ade855fa93131efa82 BUG: 1462969 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17885 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* performance/io-cache: update inode contexts of each entry in readdirplusRaghavendra G2017-07-273-39/+67
| | | | | | | | | | | | | | io-cache stores read-cache in inode which is currently created only in lookup. But, with readdirplus and md-cache absorbing lookups, io-cache need not receive a lookup before a fop like readv. Change-Id: I6eba995b0a90d4d5055a4aef0489707b852da1b8 BUG: 1474180 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://review.gluster.org/5029 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/dht: change log level to debug for thread activitySusant Palai2017-07-261-13/+11
| | | | | | | | | | | | | | | | | Every time all the thread sleeps or wakes up, we log a message about that event. Sometime this can be noisy where the number of files eligible to be migrated are placed far away from each other. Moving the logs to DEBUG. Change-Id: I4dc2cc9fdf4f42d4001754532a5bc4aeb3f0f959 BUG: 1474639 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: https://review.gluster.org/17866 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* gfapi: mark glfs_ipc() for internal use onlyNiels de Vos2017-07-265-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The 3.7 version of glfs_ipc() has never been used by external applications. There is little use for internal xlator communication that is triggered from outside of core GlusterFS executables. This function has now been removed from libgfapi.so. For Gluster 4.0 a new variation for glfs_ipc() has been added. The function expects dict_t parameters, which are currently not available for external applications. There is no sense in providing glfs_ipc() for non-core GlusterFS executables. Therefore, glfs_ipc() has been marked as private, and the declaration is now in the glfs-internal.h header. The Python test case (tests/features/ipctest.py) is not correct and will be re-written in C to prevent portability issues. This test is currently disabled (commit d26f0bac149d495fa93710c3f7b6b63c36cb8387). Change-Id: Idbfe35570d34d45ce8b6b43084627a552ac21f59 Fixes: #269 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17854 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* cli: error out incomplete CLI commandsAtin Mukherjee2017-07-263-8/+21
| | | | | | | | | | | | | | | | cli_cmd_bricks_parse () & cli_cmd_volume_remove_brick_parse () were not handling the the error cases where the command is incomplete with missing brick details which could lead to glusterd crashes. Credit : george.lian@nokia.com Change-Id: Ia6303457a2aa279465aa75d4e1cfcc948893d5de BUG: 1396327 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/17870 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* glusterd: highlight arbiter brick in get-stateAtin Mukherjee2017-07-261-1/+25
| | | | | | | | | | | | Fixes: #278 Change-Id: I1af5255127457a70e6362a2c20c53ee533e27c29 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/17864 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/dht: Fix negative rebalance estimatesN Balachandran2017-07-262-35/+79
| | | | | | | | | | | | | | | | The calculation of the rebalance estimates will start after the rebalance operation has been running for 10 minutes. This patch also changes the cli rebalance status code to use unsigned variables for the time calculations. Change-Id: Ic76f517c59ad938a407f1cf5e3b9add571690a6c BUG: 1457985 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17863 Reviewed-by: Amar Tumballi <amarts@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/dht: Update size processed for non-migrated filesN Balachandran2017-07-251-6/+10
| | | | | | | | | | | | | | | The size of non-migrated files was not added to the size_processed causing incorrect rebalance estimate calculations. This has been fixed. Change-Id: I9f338c44da22b856e9fdc6dc558f732ae9a22f15 BUG: 1467209 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17867 Reviewed-by: Amar Tumballi <amarts@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: fix compile warning in glusterd_volinfo_copy_brickinfo()Niels de Vos2017-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | gcc 7 (default in Fedora 26) complains about the following: glusterd-utils.c: In function ‘glusterd_volinfo_copy_brickinfo’: glusterd-utils.c:4279:54: warning: comparison between pointer and zero character constant [-Wpointer-compare] if (old_brickinfo->real_path == '\0') { ^~ glusterd-utils.c:4279:29: note: did you mean to dereference the pointer? if (old_brickinfo->real_path == '\0') { ^ Comparing a char* with a char is not correct in any case. Instead, compare it to NULL and the char[0] with '\0'. Change-Id: Ie5b925cd200416a1e2fa035046005f421994e641 Updates: #259 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17847 Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* posix: Needs to reserve disk space to prevent the brick from getting fullMohit Agrawal2017-07-256-6/+221
| | | | | | | | | | | | | | | | | | | | Problem: Currently there is no option available at posix xlator to save the disk from getting full Solution: Introduce a new option storage.reserve at posix xlator to configure disk threshold.posix xlator spawn a thread to update the disk space status in posix private structure and same flag is checked by every posix fop before start operation.If flag value is 1 then it sets op_errno to ENOSPC and goto out from the fop. BUG: 1471366 Change-Id: I98287cd409860f4c754fc69a332e0521bfb1b67e Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: https://review.gluster.org/17780 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>