summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: search port from last_alloc to base_portAtin Mukherjee2016-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14268 If a brick process is killed ungracefully then GlusterD wouldn't receive a PMAP_SIGNOUT event and hence the stale port details wouldn't be removed out. Now consider the following case: 1. Create a volume with 1 birck 2. Start the volume (say brick port allocated is 49152) 3. Kill the brick process by 'kill -9' 4. Stop & delete the volume 5. Recreate the volume and start it. (Now the brick port gets 49153) 6. Mount the volume Now in step 6 mount will fail as GlusterD will provide back the stale port number given the query starts searching from the base_port. Solution: To avoid this, searching for port from last_alloc and coming down to base_port should solve the issue. >Change-Id: I9afafd722a7fda0caac4cc892605f4e7c0e48e73 >BUG: 1334270 >Signed-off-by: Atin Mukherjee <amukherj@redhat.com> >Reviewed-on: http://review.gluster.org/14268 >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: Jeff Darcy <jdarcy@redhat.com> Change-Id: I9afafd722a7fda0caac4cc892605f4e7c0e48e73 BUG: 1353426 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14867 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: Kaushal M <kaushal@redhat.com>
* Fix opRet value for volume info --xml call on non-existent volumeSamikshan Bairagya2016-07-061-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The opRet field was being assigned to 0 in the XML output when a gluster volume info --xml call is made on a non-existent volume. This change assigns a value of -1 to opRet for volume info calls for non-existent volumes. Other fields like opErrno and opErrstr are also assigned relevant values > Reviewed-on: http://review.gluster.org/13843 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: darshan n <dnarayan@redhat.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit a6e551122c603ab0cba798e7e2b30d3a15191b68) Change-Id: I3920c602328f74252c87bb521f5a43d4bdc7d44d BUG: 1352880 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com> Reviewed-on: http://review.gluster.org/14863 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: Atin Mukherjee <amukherj@redhat.com>
* glusterd: compare uuid instead of hostname address resolutionAtin Mukherjee2016-07-053-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. Backport of commit 633e6fe265bc2de42dade58dc6a15c285957da76: > Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 > BUG: 1352279 > 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> Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 BUG: 1352817 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14860 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>
* glusterd/geo-rep: Add relative path validation to copy file commandAravinda VK2016-07-051-0/+34
| | | | | | | | | | | | | | | | Added validation for input file, command fails if input file path is relative path pointing outside of GLUSTERD_WORKDIR. BUG: 1350785 Change-Id: I329d43ebed69bfe9fe03d6be70dc8c78a605ffc5 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14772 (cherry picked from commit 888de8851e718d8e3117e47fa35cfc075b998f62) Reviewed-on: http://review.gluster.org/14819 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>
* protocol/server: Fix client/server compatibilityAvra Sengupta2016-07-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 3.8 client expects a child_up key from the server indicating the status of the server translators. This key is not being sent by the servers running older versions, thereby breaking compatibility. With this patch we are treating the absence of the said key as an indication that the server trying to connect to this client is running an older version and hence in such a case we are setting conf->child_up as _gf_true explicitly. This should suffice in emulating the older behavior. Due to the nature of this bug, requiring two version to be reproducible, there are no testcases added for the same. > Reviewed-on: http://review.gluster.org/14811 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > 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> > Tested-by: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit 10fa1bcce3b73f630dbc3241722c1af9dee4c414) Change-Id: I29e0a5c63b55380dc9db8e42852d7e95b64a2b2e BUG: 1350326 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14810 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-041-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: 1346158 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14723 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>
* glusterd/cli: coverity fixesAtin Mukherjee2016-07-044-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14818/ A downstream coverity run has revealed few of the following coverity defects. Since the downstream code is a clone of a specific upstream branch the defects hold true for the upstream as well. Defect type: NEGATIVE_RETURNS xlators/mgmt/glusterd/src/glusterd-rpc-ops.c:641: negative_returns: "op_errno" is passed to a parameter that cannot be negative. Defect type: BUFFER_SIZE_WARNING xlators/mgmt/glusterd/src/glusterd-volume-ops.c:2124: buffer_size_warning: Calling strncpy with a maximum size argument of 261 bytes on destination array "volinfo->volname" of size 261 bytes might leave the destination string unterminated. Defect type: BUFFER_SIZE_WARNING xlators/mgmt/glusterd/src/glusterd-volgen.c:4888: buffer_size_warning: Calling strncpy with a maximum size argument of 261 bytes on destination array "volinfo->volname" of size 261 bytes might leave the destination string unterminated. Defect type: STRING_OVERFLOW xlators/mgmt/glusterd/src/glusterd-volgen.c:3449: string_overflow: You might overrun the 256 byte destination string "tmp_volname" by writing 261 bytes from "volinfo->volname". Defect type: BUFFER_SIZE_WARNING xlators/mgmt/glusterd/src/glusterd-utils.c:3392: buffer_size_warning: Calling strncpy with a maximum size argument of 261 bytes on destination array "new_volinfo->volname" of size 261 bytes might leave the destination string unterminated. Defect type: NO_EFFECT xlators/mgmt/glusterd/src/glusterd-utils.c:7359: remediation: Was "rebal->rebalance_id" formerly declared as a pointer? Defect type: USE_AFTER_FREE xlators/mgmt/glusterd/src/glusterd-utils.c:7115: pass_freed_arg: Passing freed pointer "volinfo" as an argument to "glusterd_friend_contains_vol_bricks". Defect type: DEADCODE cli/src/cli-cmd-parser.c:1767: dead_error_begin: Execution cannot reach this statement: "ret = -1;". Change-Id: Ie941bdf31923e2f39618dd94bfae16fdb3ad65f1 BUG: 1352281 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14818 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> Reviewed-on: http://review.gluster.org/14850 Reviewed-by: Prashanth Pai <ppai@redhat.com>
* glusterd/ganesha : persist value set by teardown in info fileJiffin Tony Thottan2016-07-031-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During teardown, all the volumes exported via NFS-Ganesha will be unexported. So all related volume options need to reset. Currently this change made using dict_set on volopt dictionary, i.e change is only reflected in memory not persisted in the volume info file Therefore incase of glusterd restart this data can be lost. Also this patch fix similar issue in ganesha_manage_export(). Upstream reference : >Change-Id: Ib843ac30adb28a70e13a9a1df57020ef2f3db8a4 >BUG: 1349270 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14778 >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> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >(cherry picked from commit 16c34b101f604a09a5c735fb39815c59ee4ecbdb) Change-Id: Ib843ac30adb28a70e13a9a1df57020ef2f3db8a4 BUG: 1351151 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14831 Reviewed-by: Atin Mukherjee <amukherj@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>
* libglusterfs: Implement API that provides page-aligned iobufsKrutika Dhananjay2016-06-291-33/+11
| | | | | | | | | | | | | | | | | | | | | | 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: I7f64419461db387e4ab6b0e03c90471744aa56e1 BUG: 1351025 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14825 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>
* features/index: Do deletion of name-index in unwind pathKrutika Dhananjay2016-06-283-33/+96
| | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14742 Previously the deletion of name index was being done before winding the xattrop to posix. This order needs to be changed to ensure we don't lose the index in the event the xattrop fails in posix xl. Change-Id: If0d713645858c9dce6d4a9c5d9ea27ccb0cfa29f BUG: 1349711 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14787 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* cluster/distribute: heal layout in discover codepath tooRaghavendra G2016-06-281-33/+7
| | | | | | | | | | | | | | | | | | | | | Backport of commit a74f8cf4e7edc2ce9f045317a18dacddf25adb8a: > BUG: 1334164 > Change-Id: I4259d88f2b6e4f9d4ad689bc4e438f1db9cfd177 > Signed-off-by: Raghavendra G <rgowdapp@redhat.com> > Reviewed-on: http://review.gluster.org/14365 > Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > 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> Change-Id: Ic559c220a1f0051e531314d13940604e2dead08c BUG: 1348060 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14351 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: N Balachandran <nbalacha@redhat.com>
* libglusterfs: Negate all but O_DIRECT flag if present on anon fdsKrutika Dhananjay2016-06-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Change-Id: I7ffa4fa366f727f7e345ab0bf4c8eb009710074b BUG: 1347553 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14755 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>
* features/shard: Don't modify readv sizePranith Kumar K2016-06-271-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> BUG: 1347553 Change-Id: I1adcdaccbd5686986a057314efab9a646afa3d47 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14752 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* core, shard: Make shards inherit main file's O_DIRECT flag if presentKrutika Dhananjay2016-06-276-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Change-Id: Ibfc164aa7f9eecd6993255f1c03557f2ec35ac8c BUG: 1347553 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14754 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, shard: Use page-aligned buffer for o-direct readsPranith Kumar K2016-06-272-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> Change-Id: Ic774d2c21efc05566a1b842f7dce24509cbeaac4 BUG: 1347553 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14753 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>
* afr:Don't wind reads for files in metadata split-brainRavishankar N2016-06-271-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1349879 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 7a1c1e2904701496968ed14b6d7479fb706c3188) Reviewed-on: http://review.gluster.org/14790 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>
* feature/gfid-access: Fix nameless lookup on ".gfid"Kotresh HR2016-06-231-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: 1349274 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit b37c6d9088851b2ef83ce4e28af642892e5fd268) Reviewed-on: http://review.gluster.org/14776 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>
* dht:remember locked subvol and send unlock to the sameMohammed Rafi KC2016-06-205-21/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During locking we send lock request to cached subvol, and normally we unlock to the cached subvol But with parallel fresh lookup on a directory, there is a race window where the cached subvol can change and the unlock can go into a different subvol from which we took lock. This will result in a stale lock held on one of the subvol. So we will store the details of subvol which we took the lock and will unlock from the same subvol Back port of> >Change-Id: I47df99491671b10624eb37d1d17e40bacf0b15eb >BUG: 1311002 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13492 >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> (cherry picked from commit ef0db52bc55a51fe5e3856235aed0230b6a188fe) Change-Id: Ib821e7355b4937b86d2f9f11e2c8311b7301b6c7 BUG: 1347524 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14750 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* Tier/glusterd: Resetting the tier status value to not startedhari2016-06-191-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14106/ back-port of : http://review.gluster.org/#/c/14229/ Problem: during a volume restart or tier start force, the value of tier status is set as started irrespective of the result. Fix: The appropriate value of status is set during the restart of rebalance function. >Change-Id: I6164f0add48542a57dee059e80fa0f9bb036dbef >BUG: 1315666 >Signed-off-by: hari <hgowtham@redhat.com> >Change-Id: Ie4345bd7ce1d458574e36b70fe8994b3d758396a >BUG: 1316808 >Signed-off-by: hari <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/14229 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Tested-by: hari gowtham <hari.gowtham005@gmail.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I8e8e0662535c9dbe09eb6c7078422b40c218b473 BUG: 1347509 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14749 Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Atin Mukherjee <amukherj@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>
* cluster/dht: Fix unsafe iteration on inode->fd_listXavier Hernandez2016-06-182-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: 1346750 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14733 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>
* cluster/dht: Handle rmdir failure correctlyN Balachandran2016-06-182-13/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | DHT did not handle rmdir failures on non-hashed subvols correctly in a 2x2 dist-rep volume, causing the directory do be deleted from the hashed subvol. Also fixed an issue where the dht_selfheal_restore errcodes were overwriting the rmdir error codes. > Change-Id: If2c6f8dc8ee72e3e6a7e04a04c2108243faca468 > BUG: 1330032 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/14060 > 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> (cherry picked from commit 78c1c6002f0b11afa997a14f8378c04f257ea1c5) Change-Id: Id3f7c8fd515586d09f1f29c2eceddfee2ef8ec55 BUG: 1347529 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/14751 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>
* glusterd: unsafe strcat, strncat use in glusterd_op_stage_gsync_create()Kaleb S KEITHLEY2016-06-171-19/+13
| | | | | | | | | | | | | | | | | | SuSE build system post-compile analysis aborts pkg build due to unsafe strcat, strncat usage. mainline > BUG: 1347354 > http://review.gluster.org/14745 Change-Id: I52ac41e1172d0c1e5695a91b9f731cc9e7de4db4 BUG: 1347355 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14746 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>
* quota : rectify quota-deem-statfs default settingsManikandan Selvaganesh2016-06-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14708/ When quota is enabled, quota-deem-statfs is on by default. This is not updated in gluster v set help command. With, the patch, the description of deem statfs command is updated. > 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: 1346134 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14726 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>
* performance/decompounder: Add graph for decompounder xlatorAshish Pandey2016-06-142-9/+56
| | | | | | | | | | | | | | | | | | | | | | | This xlator will fall below protocol/server. This is mandatory xlator without any options. Observed that the callback for decompounder translator was not added which was causing volume start to fail. Added cbks for decompounder. master- http://review.gluster.org/#/c/13968/ Change-Id: I3e16a566376338d9c6d36d6fbc7bf295fda9f3a6 BUG: 1346222 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14729 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Anuradha Talur <atalur@redhat.com> 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>
* 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: 1342979 > 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) Change-Id: Ic73edd5bd9e3ee55da96f5aceec0bafa14d3f3dd BUG: 1344607 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/14711 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* glusterd: fail volume delete if one of the node is downAtin Mukherjee2016-06-133-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Cherry picked from commit 5016cc548d4368b1c180459d6fa8ae012bb21d6e: > Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c > BUG: 1344407 > 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> Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c BUG: 1344631 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14691 Reviewed-by: Niels de Vos <ndevos@redhat.com> 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>
* features/worm: fixed issue with write FOP for normal fileskarthik-us2016-06-132-4/+5
| | | | | | | | | | | | | | | | | | | | | | The write FOPs on normal files were being blocked after the recent change. It should fail only for the WORM and WORM-Retained files, and should pass for a normal file. Using auto-commit period to check for dormant files instead of retention period. Backport of http://review.gluster.org/#/c/14619/ > Change-Id: I30f82d4de2ea2c59c1eb7b4449ba6a60e568cfd5 > BUG: 1342259 > Signed-off-by: karthik-us <ksubrahm@redhat.com> Change-Id: I9c4ad589dd82cd33eecf207d9ed810a9d01f0f46 BUG: 1345713 Signed-off-by: karthik-us <ksubrahm@redhat.com> Reviewed-on: http://review.gluster.org/14705 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: volgen and volume set changes for leasesPoornima G2016-06-133-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Add leases xlator in volgen and also add corresponding volume set options Backport of http://review.gluster.org/#/c/11722 Cherry picked from commit bc525b01002d7649be0ac28c5761c8ce92b6a658: > Change-Id: Ic5de50cdb87eaf6a833e739bc7e08fecbeca3de3 > BUG: 1319992 > Signed-off-by: Poornima G <pgurusid@redhat.com> > Reviewed-on: http://review.gluster.org/11722 > 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: Atin Mukherjee <amukherj@redhat.com> Change-Id: Ic5de50cdb87eaf6a833e739bc7e08fecbeca3de3 BUG: 1342350 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14626 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* features/changelog: Change barrier notification mechanismKotresh HR2016-06-133-80/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/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: 1334314 > Signed-off-by: Kotresh HR <khiremat@redhat.com> > Reviewed-on: http://review.gluster.org/14272 (cherry picked from commit be00012e7be55d25870411f3e975db9a8e19c70a) Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de BUG: 1342083 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14614 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* glusterd/geo-rep: upgrade path when slave vol uuid involvedSaravanakumar Arumugam2016-06-131-10/+188
| | | | | | | | | | | | | | | | | | 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: 1342452 Reviewed-on: http://review.gluster.org/#/c/14425/ Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/14640 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: Aravinda VK <avishwan@redhat.com>
* cluster/afr: Unwind with xdata in inode-write fopsPranith Kumar K2016-06-134-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | When there is a failure afr was not unwinding xdata to xlators above. xdata need not be NULL on failures. So it is important to send it to parent xlators. >Change-Id: Ic36aac10a79fa91121961932dd1920cb1c2c3a4c >BUG: 1340623 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14567 >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: Jeff Darcy <jdarcy@redhat.com> BUG: 1342178 Change-Id: Idd74d2bc898fe5aef537ab48c1754510030c8825 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14618 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: Niels de Vos <ndevos@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: 1344594 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14690 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/ec: Fix invalid __fd_unref() callXavier Hernandez2016-06-131-4/+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: 1344421 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14684 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: Ashish Pandey <aspandey@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* afr: Consider ENOSPC and EDQUOT as symmetric errorsRavishankar N2016-06-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1344559 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14687 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> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/ec: Restrict the launch of replace brick healAshish Pandey2016-06-131-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: 1342954 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14651 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> 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>
* nfs: build exportlist with multiple groupnodesBipin Kunal2016-06-131-18/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1343287 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14700 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: bipin kunal <kunalbipin@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Unwind xdata_rsp even in case of failuresPranith Kumar K2016-06-107-21/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | DHT expects GF_PREOP_CHECK_FAILED to be present in xdata_rsp in case of mkdir failures because of stale layout. But AFR was unwinding null xdata_rsp in case of failures. This was leading to mkdir failures just after remove-brick. Unwind the xdata_rsp in case of failures to make sure the response from brick reaches dht. >BUG: 1340623 >Change-Id: Idd3f7b95730e8ea987b608e892011ff190e181d1 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14553 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Anuradha Talur <atalur@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1342178 Change-Id: Iaacadcad0f76979fb250bd008b8e43f0e7acf642 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14617 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: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/index: Exclude gfid-type for '.', '..'Pranith Kumar K2016-06-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: Iad85874b4bc9ffbc4351c5a4f6c7a9c2e5bf4c9c BUG: 1341477 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14596 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* leases: Fix the recall code pathPoornima G2016-06-103-28/+36
| | | | | | | | | | | | | | | | | | | | 1. Replace frame->op usage with frame->root->op, as frame->op is not filled with appropriate value in all cases 2. Add few log messages 3. Fix boolean assignment Backport of http://review.gluster.org/#/c/14434/ Change-Id: I340f2200c1fcc4f4ce5a139b0fd22508cb8ac1e3 BUG: 1337638 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14568 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: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* protocol: Add framework to send transaction id with recallPoornima G2016-06-102-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/14647/ Issue: The upcall(cache invalidation/recall) event is sent from the bricks to clients. In AFR/EC setup, it can so happen that all the bricks will send the upcall for the same event, and if AFR/EC doesn't filter out these duplicate notifications, the logic above cluster xlators can fail. Solution: Use transaction id to filter out duplicate notifications. This patch adds framework for duplicate notifications. AFR/EC can build up on this patch for deduping the notifications Change-Id: I66b08e63b8799bc5932f2b2545376138a5701168 BUG: 1337638 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14648 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>
* storage/posix: Print offset,size and gfid too when readv failsKrutika Dhananjay2016-06-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | ... for better debuggability. Backport of: http://review.gluster.org/#/c/14271/ Here's a sample log: [2016-05-31 05:18:34.893951] E [MSGID: 113040] [posix.c:3089:posix_readv] 0-dis-posix: read failed on gfid=3744d34b-f798-4ce2-b421-cc632a9903bd, fd=0x7f8b3c015abc, offset=131072 size=131072 [Invalid argument] Change-Id: Ied4d6f5260c1e371955c03bdea0cb77c3426ba33 BUG: 1342387 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14635 Smoke: Gluster Build System <jenkins@build.gluster.com> 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.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* nfs : store sattr properly in nfs3_setattr() callJiffin Tony Thottan2016-06-082-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: 1343368 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14660 Tested-by: Nigel Babu <nigelb@redhat.com> 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: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* libglusterfs (timer): race conditions, illegal mem access, mem leakKaleb S KEITHLEY2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating gfapi memory consumption with valgrind, valgrind reported several memory access issues. Also see the timer 'registry' being recreated (shortly) after being freed during teardown due to the way it's currently written. Passing ctx as data to gf_timer_proc() is prone to memory access issues if ctx is freed before gf_timer_proc() terminates. (And in fact this does happen, at least in valgrind.) gf_timer_proc() doesn't need ctx for anything, it only needs ctx->timer, so just pass that. Nothing ever calls gf_timer_registry_init(). Nothing outside of timer.c that is. Making it and gf_timer_proc() static. backport mainline: > http://review.gluster.org/14247 > BUG: 1333925 Change-Id: Ia28454dda0cf0de2fec94d76441d98c3927a906a BUG: 1342620 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14644 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>
* cluster/distribute: use a linked inode in directory heal codepathRaghavendra G2016-06-062-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for following reasons: * healing is done in lookup and mkdir codepath where inode is not linked _yet_ as normally linking is done in interface layers (fuse-bridge, gfapi, nfsv3 etc). * healing consists of non-lookup fops like inodelk, setattr, setxattr etc. All non-lookup fops expect a linked inode. Backport of commit 06f92634d9ad8aa5c56d786e5248016c283e5c5b: > Change-Id: I1bd8157abbae58431b7f6f6fffee0abfe5225342 > BUG: 1334164 > Signed-off-by: Raghavendra G <rgowdapp@redhat.com> > Reviewed-on: http://review.gluster.org/14295 > 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: Susant Palai <spalai@redhat.com> > Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Change-Id: I1bd8157abbae58431b7f6f6fffee0abfe5225342 BUG: 1336285 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14350 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>
* nfs: fix a typo in the help text for option rpc-auth.addr.rejectDustin Black2016-06-061-1/+1
| | | | | | | | | | | | | | Added space to .description Reported-by: James Shubin <purpleidea@gmail.com> Change-Id: Ie4dd8774567ac4d8e1e8ec39aa3ab595d037101a BUG: 1342275 Signed-off-by: Dustin Black <dblack@redhat.com> Reviewed-on: http://review.gluster.org/14620 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: Niels de Vos <ndevos@redhat.com>
* fuse: accept the -s option to allow automountingNiels de Vos2016-06-061-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: 1340935 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14564 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: Oleksandr Natalenko <oleksandr@natalenko.name>
* dht : add metalock/unlockSusant Palai2016-06-051-5/+98
| | | | | | | | | | | | Change-Id: I842a7ea1b286f1b893b200fe647597e7fd0f2105 BUG: 1338501 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14631 Tested-by: Kotresh HR <khiremat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* posix/lock: implement meta-lock/unlock functionalitySusant Palai2016-06-055-27/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem : The lock state needs to be protected when rebalance is reading the lock state on the source. Otherwise there will be locks left unmigrated. Hence, to synchronize incoming lock requests with lock-migration, meta lock is needed. Any new lock request will be queued if there is an active meta-lock and with sucessful lock migration, will be unwound with EREMOTE, so that dht module can wind the request to the correct destination. On a successful lock migration, "pl_inode->migrated" flag is enabled. Hence, any further request would be unwound with EREMOTE and will be redirected to new destination. More details can be found here: https://github.com/gluster/glusterfs-specs/blob/master/accepted/Lock-Migration.md design discussion: https://www.gluster.org/pipermail/gluster-devel/2016-January/048088.html Change-Id: Ief033d5652b5ca4ba6f499110a521cae283d6aba BUG: 1338501 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14462 Tested-by: Kotresh HR <khiremat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd/snapshot: remove quota related options from snap volfileMohammed Rafi KC2016-06-031-16/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enabling inode-quota on a snapshot volume is unnecessary, because snapshot is a read-only volume. So we don't need to enforce quota on a snapshot volume. This patch will remove the quota related options from snapshot volfile. Backport of> >Change-Id: Iddabcb83820dac2384924a01d45abe1ef1e95600 >BUG: 1341796 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/14608 >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Reviewed-by: N Balachandran <nbalacha@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: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit 03d523504230c336cf585159266e147945f31153) Change-Id: I68b54cc3e9a5420d6b3550b08fd65c3c44a130cf BUG: 1342372 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14628 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd/snapshot: Fix snapshot creation with geo-repKotresh HR2016-06-021-2/+4
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14595 The construction of path to geo-rep session directory is broken with the commit "http://review.gluster.org/13111" as it saves the slave volume uuid in 'gsync_slaves' dictionary. This patch fixes the same. Change-Id: Ic7fc3c37d368549feb44b3a08d60157ce61227c3 Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1341944 Reviewed-on: http://review.gluster.org/14597 (cherry picked from commit 3bd5c5858fd3df42374934ac8251a8620e6b62b9) Reviewed-on: http://review.gluster.org/14611 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: Rajesh Joseph <rjoseph@redhat.com>