summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* md-cache: fix xattr caching code in getxattrAnand Avati2013-09-091-2/+2
| | | | | | | | | | | | | | Bad condition check, fix it! Change-Id: I6e047de70f77d7b98b2ca771a467f14a76fd62fe BUG: 994392 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5513 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5805 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* nfs: prevent NFS server crash when upgrading from 3.2.x serverAnand Avati2013-09-091-0/+5
| | | | | | | | | | | | | | | | | | | | | After an upgrade the NFS3 filehandle size changed (became smaller), but when doing a live ugprade the client would send the old handle (expect ESTALE and do fresh lookup). But when reading the old handle we were reading it into a structure which was limited to the size of the new handle, while we should have been reading into a buffer which is as big as the NFS3 spec permits the handle size to be. The actor functions declare the structure on the stack. So the overflow is resulting in a stack corruption. Change-Id: Ie930875ac9db46b43d1cb8ad1e6d89cdaeded7ca BUG: 1002385 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5730 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5804 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* md-cache: invalidate attributes on xattr updateAnand Avati2013-09-081-0/+164
| | | | | | | | | | | | | | xattr update will result in at least ctime change. So invalidate attributes in xattr callback. Change-Id: Ie6e8f2fd9a11c56c27e78bd58c2ff1e1d6edce6e BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5641 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5640
* rpc: disable root-squash dynamically upon volume set commandRaghavendra Bhat2013-09-072-2/+68
| | | | | | | | | | Change-Id: I2ba9ca339ffbe07cb74833165a46a941225b623d BUG: 927616 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5847
* api: Set errno before invoking glfs_init_done()Vijay Bellur2013-09-061-4/+11
| | | | | | | | | Change-Id: I3f4d3cfaf7078e126881111eb840d854b0b6466d BUG: 860212 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5711 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* call-stub: remove fall-through in ftruncateRaghavendra Bhat2013-09-052-0/+25
| | | | | | | | | | | Original-author: Pranith Kumar K <pkarampu@redhat.com> Change-Id: I7c8ed3e3e4ddc558ff061f2e1407fb43095e67f4 BUG: 913544 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5827 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* call-stub: internal refactorAnand Avati2013-09-053-2995/+1105
| | | | | | | | | | | | | | | | | | | - re-structure members of call_stub_t with new simpler layout - easier to inspect call_stub_t contents in gdb now - fix a bunch of double unrefs and double frees in cbk stub - change all STACK_UNWIND to STACK_UNWIND_STRICT and thereby fixed a lot of bad params - implement new API call_unwind_error() which can even be called on fop_XXX_stub(), and not necessarily fop_XXX_cbk_stub() Change-Id: Idf979f14d46256af0afb9658915cc79de157b2d7 BUG: 846240 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/5820 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* fuse: pass the mountflags to older (< 2.6.21) kernelsNiels de Vos2013-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | The change for Bug 853895 fixed mounting volumes read-only for recent kernels. Older kernels fail the first mount() syscall, and the second mount() did not add the 'mountflags'. Full analysis and a description for reproducing is in the bugreport. The test included in http://review.gluster.org/4163 would have caught this problem when the tests are executed on RHEL-5 or similar systems. Change-Id: Ifa6cd6476bf1939e009142ed4ed1b53b9c3171bd Master-Branch-Change-ID: I440591344a6a5af7b2018e37a2a1fda9de8b5ab2 Bug: 996768 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5752 Reviewed-by: Shishir Gowda <sgowda@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* doc: Add known issue about peer probe with op-versionKaushal M2013-08-181-0/+13
| | | | | | | | Change-Id: I152e5b63329540b65a86bc75f0a0c3a831761aaa Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5450 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* rfc.sh: Include BUG: header even in first runAnand Avati2013-08-141-2/+2
| | | | | | | | | | Set the commit hook before entiring editor mode. This fixes the error where rfc.sh after first clone does not set BUG: header Change-Id: Ic0e9f2d3f656bc81e29d35556022fbdff2f61225 BUG: 764890 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5633
* glusterd: Give up biglock before brick's rpc unrefKrishnan Parthasarathi2013-08-141-1/+5
| | | | | | | | | | | | This is to prevent the possibility of a deadlock when rpc_connection_cleanup being called in the same thread as rpc_clnt_unref Change-Id: Ia4dcc0a8a6e6158d4ddec68b780fccbc4cd64adb BUG: 962619 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5326 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: sync glusterfs.spec.in with Fedora glusterfs.specKaleb S. KEITHLEY2013-08-081-22/+47
| | | | | | | | | | | | | | | (this is the release-3.4 branch) * add necessary requires * add -cli subpackage * fix other minor differences with Fedora glusterfs.spec Change-Id: I86eb38a1cc52cdcd25f62c75fae28dbd9539195e BUG: 819130 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5521 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Fix broken parallel installTiziano Müller2013-08-021-0/+4
| | | | | | | | | | | | There is an automake bug when using _LTLIBRARIES, breaking parallel `make install` (see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328) BUG: 981888 Change-Id: Ib35ae47c048a45a881aeb9dbf8d41e09a4e766b9 Signed-off-by: Tiziano Müller <tiziano.mueller@stepping-stone.ch> Reviewed-on: http://review.gluster.org/5468 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: sync glusterfs.spec.in with Fedora glusterfs.specKaleb S. KEITHLEY2013-08-011-22/+81
| | | | | | | | | | | | | | (this is the release-3.4 branch) * Sync with latest Fedora updates * add glusterfs-libs RPM for RHEL6.5 oVirt/qemu-kvm, see BZ 916645 BUG: 819130 Change-Id: If5816f9b6a9478f6663c1de4d14a9f8341da9e84 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5437 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterfsd: Use dynamic volfile bufferKaushal M2013-07-311-1/+20
| | | | | | | | | | | | | | | | | Backport of fa78792 glusterfsd: Use dynamic volfile buffer from the master branch. Glusterfsd used a fixed buffer to store volfiles fetched via getspec. This caused problems with large volfiles. Changining this to a dynamic buffer allows large volfiles to be loaded in memory. BUG: 986100 Change-Id: I9ec86c09a00bc84fef7a0da05bbeb6b3e07d5146 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5431 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: handle failures in graph switchesAnand Avati2013-07-301-0/+3
| | | | | | | | | | | | A graph switch failure can potentially result in NULL returned for glfs_active_subvol(). Handle this gracefully in glfs_subvol_done() Change-Id: I6adbd878c354b9ed2314fc71cea4671792efa0a4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5427 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* doc: Move admin-guide to markdown format.Vijay Bellur2013-07-2322-0/+6345
| | | | | | | | | | | | | | | | | | | | | | | | | Editing markdown is probably more easier than xml. pandoc can then be used for conversion to html, pdf and any other necessary formats. Note that pandoc has the following input and output formats: Input: markdown and (subsets of) Textile, reStructuredText, HTML, LaTeX, and DocBook XML. Output:plain text, markdown, reStructuredText, XHTML, HTML 5, LaTeX (including beamer slide shows), ConTeXt, RTF, DocBook XML, OpenDocument XML, ODT, Word docx, GNU Texinfo, MediaWiki markup, EPUB, Textile, groff man pages, Emacs Org-Mode, AsciiDoc, and Slidy, Slideous, DZSlides, or S5 HTML slide shows. It can also pro‐ duce PDF output on systems where LaTeX is installed. All documentation changes can be submitted as changes to markdown and we can attempt a periodic documentation refresh on gluster.org. Change-Id: I5dcf7f79184cd6b6d62ce7065d2faa352622f6ac Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5369 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* include <limits.h> for PATH_MAXEmmanuel Dreyfus2013-07-181-0/+1
| | | | | | | | | | | | | | | I need to include <limits.h> in order to use PATH_MAX, Otherwise it will not build at mine. I believe it is standard compliant to do so: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html Backport of I3f124466f7f7742e94a9d1256bc9239ec16aab04 BUG: 764655 Change-Id: I92c79dfd439f41bfa2a970c16c13a60ea6baa2f8 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/5342 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Added missing release note about timestamps changing to gmt.Joe Julian2013-07-181-0/+1
| | | | | | | | Change-Id: Ic262ea513525faa859f5fba11f4bd040d4694269 Signed-off-by: Joe Julian <me@joejulian.name> Reviewed-on: http://review.gluster.org/5338 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* Release notes: BD xlator known issuesM. Mohan Kumar2013-07-161-0/+3
| | | | | | | | Change-Id: Ic6ced2ce4a7e9c0ff6333edcac4dfbdfa161b047 Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/5334 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* doc: release-notes for 3.4.0Vijay Bellur2013-07-151-0/+161
| | | | | | | | | Change-Id: I8245e35198b9c5990fa70dea2b2b03e1c227e411 BUG: 825906 Reviewed-on: http://review.gluster.org/5329 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: Provide option to use/not use kernel-readdirpv3.4.0Pranith Kumar K2013-07-127-2/+98
| | | | | | | | | | | | | By default fuse kernel readdirp usage in fuse xlator is off. When mount option use-readdirp=yes is provided it starts using fuse-kernel's readdirp. BUG: 983477 Change-Id: Ibdaf1407d6f2a782a4a1916fad374f36fca6c5e7 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5323 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Correct op-version of some optionsKaushal M2013-07-111-9/+9
| | | | | | | | | | | | | Some of the options have been backported to release-3.3 branch and hence should have their op-version reduced. Some other options had op-version incorrectly set as 1. Change-Id: If40325b7b2da7aa36f90261024117cd18cf51ef0 BUG: 981278 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5320 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: set min-op-version and max-op-version for getspecJeff Darcy2013-07-112-0/+47
| | | | | | | | | | Change-Id: I2185df5d6b560d9367ae404c91812048e1655180 BUG: 969193 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/5119 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5307
* glusterd: Update comment with op-version mappingKaushal M2013-07-041-1/+1
| | | | | | | | | Change-Id: If024921f2ce2c2d7c94b4a490585130dcf108d53 BUG: 981278 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5288 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* store: move glusterd_store functions from mgmt/glusterd to libglusterfsKrishnan Parthasarathi2013-07-0310-870/+918
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/4676 and http://review.gluster.org/5243 Making the glusterd_store_* functions re-usable will help with future changes that need to read/write lists of items. BUG: 904065 Change-Id: I99fb8eced76d12d5a254567eccff9790b43d8da3 Original-author: Niels de Vos <ndevos@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5279 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: sync glusterfs.spec.in with Fedora glusterfs.specKaleb S. KEITHLEY2013-06-282-6/+18
| | | | | | | | | | | | | | | | (this is the release-3.4 branch) * fix the hardening fix for shlibs * use %{__sed} macro * better short ChangeLog * fix hard-coded path in extras/systemd/glusterd.service in, use @prefix@ Change-Id: I267244b68a97cbcd6f6ab62fc322c78db45023bb BUG: 819130 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5270 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: declare lvm_lv_from_name() if it is missing from lvm2app.hv3.4.0beta4Niels de Vos2013-06-272-1/+20
| | | | | | | | | | | | | | | | | | | | | The bd-xlator can not be built successfully on certain Debian distributions due to a missing declaration of lvm_lv_from_name(). This function is available for linking, but it does not exist in the header file. This change adds a detection for lvm_lv_from_name() in both the library for linking, and the declaration in the header file. If the 1st is missing, the bd-xlator can not be built, and if only the 2nd one is missing, we'll declare lvm_lv_from_name() ourselves. This makes it possible to build the bd-xlator on the affected Debian distributions too. Change-Id: If1845f6b6d676793677ebbcc6daf9ff12f7c3fd6 BUG: 976946 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5260 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpm: move the mount/api xlator to the glusterfs-api sub-packageNiels de Vos2013-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | The main glusterfs package included the xlator/api.so file which caused a dependency on the glusterfs-api package: # rpm -i glusterfs-3.4.0-0.6.beta3.el6.x86_64.rpm error: Failed dependencies: libgfapi.so.0()(64bit) is needed by glusterfs-3.4.0-0.6.beta3.el6.x86_64 Moving the mount/api xlator to the glusterfs-api package will prevent the automatic dependency generator to add the dependency to the main package. Change-Id: I333c6b61dfc239a7b0beca313aa5928f4e197937 BUG: 819130 Reported-by: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5254 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: sync glusterfs.spec.in with Fedora glusterfs.specKaleb S. KEITHLEY2013-06-217-984/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This is the release-3.4 branch.) * remove G4S/UFO from community packaging. The Fedora/EPEL packaging will follow suit once the glusterfs-openstack-swift packaging materializes from the G4S team. Note that for the time being 'make dist' still creates a UFO tarball from the .../ufo directory for use by fedora packaging. * add glusterfs-api and glusterfs-api-devel sub-packages * add extras/systemd/glusterd.service. Use it (or extras/init.d/glusterd) instead of the Fedora versions. * restores ability to build glusterfs RPMs from the dist tarball with 'rpmbuild {-ts,-tb,-ta} glusterfs-XXX.tar.gz' * reverse {--with,--without}_fusermount in sync with fedora .spec and master branch * other minor cleanups mostly to sync with fedora .spec and to build from the dist tarball. Any differences will be resolved in the fedora .spec in the next release (i.e. beta4 or GA). * this is nominally for "the impending merge of .../api from master" but should be independent of that change. (still deciding whether to add the fedora glusterfsd.{init,service) files here or remove them from fedora.) BUG: 819130 Change-Id: I90c7355ca02239995b1df7646e3cd10ec227bcc5 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5179 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: fix read past EOF in glfs_preadv()Anand Avati2013-06-201-3/+4
| | | | | | | | | | | | | | | | When syncop_preadv() returns 0, we are returning @size as-is (without modifying user passed buffer). This results in junk data being read when read offset is at or beyond EOF. Change-Id: I8aa9c957359f9a52833b944b452f501b6f5538d3 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5237 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: José Rivera <jrivera@redhat.com> Tested-by: José Rivera <jrivera@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Disable transport before cleaning up rpc objectKrishnan Parthasarathi2013-06-183-19/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5000 Problem: rpc_transport object, which is part of rpc_clnt, is destroyed prematurely. This is because, rpc_transport object is ref'd by socket layer and rpc layer. These ref's, until the synctask'izing of operations, were unref'd sequentially in the epoll thread. With more threads at play, the sequential unref guarantee is off. Fix: Shutting down the transport before proceeding with cleaning up of rpc_clnt object would serialize the unref's on the rpc_transport object and thus eliminating the race. Also, we don't store the address of brickinfo in brick's rpc notify function, to avoid the possibility of referring a freed brickinfo. Instead we use a string based id to 'reach' the corresponding brickinfo. Change-Id: If2739e2eeaee1e8b071ab2b6754b7ea0f81cfceb BUG: 962619 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5214 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc: Cleanup rpc object in TRANSPORT_CLEANUP eventKrishnan Parthasarathi2013-06-182-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5107 (upstream) This is to ensure that unref of rpc_clnt object doesn't race with the unref of the corresponding rpc_transport object. rpc_transport has ref_count 2, in normal scheme of things. One held by the socket layer and the other held by rpc layer. This inequality in ref_count between rpc_clnt and rpc_transport could lead to concurrent destruction of the objects and possibly lead to a crash. To avoid this, we defer the clean up of rpc_clnt obj to TRANSPORT_CLEANUP event. ie, once rpc_transport's ref_count goes to zero. Introduced rpc_clnt_disabled, to allow higher layers to differentiate between the 'final'[1] disconnect, triggered from upper layers, and disconnect seen as a consequence of transport disconnect. This differentiation helps in cleaning up resources, at higher layers, in a race-free manner. [1] - 'final' here means that the rpc and the associated connection, is not to be used anymore. eg - glusterd_brick_disconnect on volume-stop. Change-Id: I2ecf891a36e3b02cd9eacca964e659525d1bbc6e BUG: 962619 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5213 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Add a cmd for getting uuid of local nodeKrishnan Parthasarathi2013-06-184-0/+257
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5175 (upstream) Usage: gluster system:: uuid get This is needed since we generate uuid of a node in a lazy manner. ie, we generate a uuid for the node only on the first volume or peer operation, when the node needs an external identity. With this command, we can force[1] the uuid generation, without a volume or peer operation performed. [1]: Querying for uuid (or uuid get), forces uuid to come into existence. Change-Id: I62c8b6754117756aa4d773dd48af4ddeb1a1d878 BUG: 971661 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5204 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Ignore directories matching *.tmp in storeKrishnan Parthasarathi2013-06-141-0/+1
| | | | | | | | | | | | | | Backport of http://review.gluster.org/5177 store being glusterd's persistent store under /var/lib/glusterd/ Change-Id: I1c01a09a8ce4a73ea612f05e7f14d4ab39ad1628 BUG: 971796 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5212 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Perform delayed changelog wakeups for anon fdv3.4.0beta3Pranith Kumar K2013-06-104-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Nfs xlator never does open on a file for performing writes, afr does not perform changelog wakeup for this fd so operations which do metadata operations as soon as the data operations are completed perceive a delay od 'post-op-delay-secs'. Fix: Perform changelog wakeup on anon-fd if the fd with same pid is not present in inode-list. Note: This approach is a short-term fix. A proper fix needs a new domain for taking metadata locks so that data/metadata locks don't compete with each other. BUG: 966018 Change-Id: Ia9188a253e7943801b665e1b9205e2f551952d87 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5067 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix crash in dht_migration_complete_check_task because of NULL fdEmmanuel Dreyfus2013-06-082-1/+3
| | | | | | | | | | | This is a backport of Ia5a5d40bcea7bfb320ef7096af1e035b8847d4ff BUG: 960055 Change-Id: Ibf3547a775d7ca2f3a097c880cdf38ffafb322da Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/5139 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* api: Fix api.so and libgfapi.so build time dependencyAnand Avati2013-06-081-2/+1
| | | | | | | | | | | | | Not all versions of autoconf handle dependencies expressed as "A: B". Use the xxx_DEPENDENCIES variable to make it version independent Change-Id: Ia0b13399d0bf10995d9845e04cd9eb3ef6518dbe BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5171 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: add new API glfs_dup() to copy a file descriptorAnand Avati2013-06-082-0/+43
| | | | | | | | | | | | Duplicate a glfs_fd file descriptor. Inherit the internal fd_t with a reference. Change-Id: Ib30e9a46b608b9f78202957f4dab6ba6265a9ec0 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5170 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* api/Makefile: link api.so against libgfapi (and dependencies)Anand Avati2013-06-081-1/+6
| | | | | | | | | | | | | | | | | | | | Samba opens vfs_gluster.so with dlopen(..,RTLD_LOCAL). This makes the symobls in the shared module and the library it exclusively links against (specifically gfapi) not resolvable from the .so files which are opened in turn within (like xlator .so files) unless explicitly linked against the dependent libraries. This is not otherwise required in case of glusterfsd as the main executable symbols are always available for resolution from dlopen()'ed shared objects, making Samba's vfs_glusterfs requirement unique, but luckily not incompatible. Change-Id: I894c521daade7d46ec5bf07793f2eea02ebc9700 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5169 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* socket: convert socket functions to file scope (static)Anand Avati2013-06-081-46/+46
| | | | | | | | | | | | | | The function names used in socket.c conflict with Samba's socket functions (samba.git/source4/lib/socket/socket.h). Convert our functions to file scope as they are anyways not called across files. Change-Id: If98ae557d3e2868f257c021b283ede6a5e92de02 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: handle graph switch (cwd, fds, locks)Anand Avati2013-06-085-132/+944
| | | | | | | | | | | | | | - Migrate open fds to new graph - Migrate locks held in open fd to new fd - Refresh CWD, so resolution of relative paths happens on refreshed inode (on new graph). Change-Id: I4b18083b9b290107ebda1f917fc85b635ab72fb4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5167 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: ignore NULL and -1 parameters in glfs_set_logging()Anand Avati2013-06-081-5/+8
| | | | | | | | | | | | | Permit changing either logfile or level by specifying the other as -1 or NULL respectively. Change-Id: I7df05db7b613c57e0106a5cce846ae26d2a160d4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5166 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* pkg-config: present API version and not package versionAnand Avati2013-06-081-1/+2
| | | | | | | | | | | | | | | | | | | This way PKG_MODULE() autoconf test checks for required API rather than release version (e.g required API could be in all all of 3.4.5, 3.5.1, 3.6.4 etc.) With the first "release" of gfapi, the current version (4) will be frozen. Version 3 is sufficient for QEMU's requirement. Version 4 is necessary for Samba VFS Change-Id: Iada3a4c88b9c67413dcd57004fd8a62926a21b42 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5165 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: provide stable st_dev in stat structureAnand Avati2013-06-083-4/+16
| | | | | | | | | | | | | | Samba depends on st_dev being unique and stable for different filesystems (it uses st_dev+st_ino as key to store metadata of a file). Change-Id: Ia022fabadfb5ef3fc9724c1b1ca86f1a20f98af9 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5164 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* dht,posix: support for case discoveryAnand Avati2013-06-083-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is support for discovering a filename in a given directory which has a case insensitive match of a given name. It is implemented as a virtual extended attribute on the directory where the required filename is specified in the key. E.g: sh# getfattr -e "text" -n user.glusterfs.get_real_filename:FiLe-B /mnt/samba/patchy getfattr: Removing leading '/' from absolute path names # file: mnt/samba/patchy user.glusterfs.get_real_filename:FiLe-B="file-b" In reality, there can be multiple "answers" as the backend filesystem is case sensitive and there can be multiple files which can strcasecamp() successfully. In this case we pick the first matched file from the first responding server. If a matching file does not exist, we return ENOENT (and NOT ENODATA). This way the caller can differentiate between "unsupported" glusterfs API and file not existing. This API is used by Samba VFS to perform efficient discovery of the real filename without doing a full scan at the Samba level. Change-Id: I53054c4067cba69e585fd0bbce004495bc6e39e8 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5163 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: link inodes in relevant entry FOPsAnand Avati2013-06-084-15/+105
| | | | | | | | | | | | Do not let inode linking to happen only in lookup(). While that works, it is inefficient. Change-Id: I51bbfb6255ec4324ab17ff00566375f49d120c06 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5162 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* syncop: copy inode pointer in readdirplusAnand Avati2013-06-081-0/+2
| | | | | | | | | Change-Id: I9ab2b8ac2da9fe13f56b8b08f715a0b603ece0cb BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5161 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* md-cache: support negative xattr entriesAnand Avati2013-06-081-10/+31
| | | | | | | | | | | | | | | Add support for negative xattr caching. For this, we need to fetch xattrs in every opportunity (including readdirplus) in order to treat missing key in cached dict as negative entry. This is crucial to detect missing ACL xattrs in Samba workload. Change-Id: I918a2ef4ab804724256f7546b15e808332ed518d BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5160 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: optimistic resolution with ESTALE detectionAnand Avati2013-06-083-60/+248
| | | | | | | | | | | | | | | | | | | Enhance the path resolver to be optimistic. Instead of performing a wasteful ->lookup() fop for every component in every API call, build in speculation logic to consider the previous resolution result temporarily, and if it results in ESTALE either later in the path resolution or in the FOP, then retry resolution with ->lookup() at every level and retry the FOP. This is the same optimistic resolution/retry logic Linux kernel resolver is proposing to use. Change-Id: Iecbc25248754caf0915cd7205910563ff88ce5e7 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5159 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>