summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* quick-read: prune cache on write/[f]truncateAnand Avati2013-06-081-0/+43
| | | | | | | | | | | | | Cache needs to be pruned on write and [f]truncate. The lack of this is causing Samba ping-pong test to return wierd 'data increment' values during startup. Change-Id: I9cd6a839bcd02de738d78638211b78f382f58e0a BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: add new API glfs_set_xlator_option()Anand Avati2013-06-083-1/+45
| | | | | | | | | | | | This is the equivalent of specifying --xlator-option command line argument to glusterfsd. Change-Id: I1171dd518a85db4bd456fa0790f450e889a956cd BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5157 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* posix-acl: fetch ACLs in readdirplusAnand Avati2013-06-081-0/+6
| | | | | | | | | | | | | Not fetching ACLs in readdirplus can potentially result in spurious wrong ACL decisions (which magically go away on a lookup() which populates the ACLs) Change-Id: Ided38b4d868fab482b477ce51b4878289ef9eed0 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5156 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: POSIX locking supportAnand Avati2013-06-085-0/+90
| | | | | | | | | Change-Id: I37d9e1fb4a715094876be6af3856c1b4cf398021 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5155 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: implement readdirplus_r supportAnand Avati2013-06-082-8/+26
| | | | | | | | | | | This call is used by Samba VFS. Change-Id: Ib371502ad5a71b3b0e993f6b30e3dfb1f839c020 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5154 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* syncop: set credentials of running process in @frameAnand Avati2013-06-081-1/+18
| | | | | | | | | | | | | | | Inherit the pid/euid/egid/groups of the running process in the frame. Do this only in cases where a loaded frame was not presented to the synctask. This behavior is required for Samba VFS. Change-Id: Ib181c90f47c6741197b9ce9f67a19e2914b647d2 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5153 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: handle root (/) resolution gracefully for realpath()Anand Avati2013-06-081-1/+4
| | | | | | | | | | | Resolving path of / is crucial for realpath() to work properly. Change-Id: I8a1b482beba37f01afbd20446d9e6f6125f2ec34 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5152 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: support for chdir() and familyAnand Avati2013-06-086-10/+302
| | | | | | | | | | | | Add support for chdir, fchdir, getcwd, realpath equivalents in GFAPI. These are required for the Samba VFS plugin. Change-Id: I91d2db9146994403c98961c489c7640c51d5add2 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5151 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Avoid order mismatch in blocking entrylksPranith Kumar K2013-06-063-6/+27
| | | | | | | | | | | | | | | | | | | | | | Problem: When taking blocking entrylks, afr orders the entrylks based on uuid_compare of gfids of parent dirs, if they are equal then it orders them based on the basenames. While this approach works fine, the implementation assumes loc->gfids to be populated at the time of the comparison, but loc may have gfid in loc->inode->gfid instead of loc->gfid which was leading to order mismatches and dead-locks. Fix: Implemented loc_gfid which gives gfid by checking both loc->gfid, loc->inode->gfid. Used this for ordering the blocking entrylks. Change-Id: I2743fcaff3d670fbeb6b8e0a496f106a3585dde1 BUG: 965987 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5063 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd-volgen: Improve volume op-versions calculationKaushal M2013-06-057-480/+591
| | | | | | | | | | | | | | | | | | Backport of patch on master branch, under review at http://review.gluster.org/4952 Volume op-versions calculations now take into account if an option, a. enables/disables an xlator, or b. is a boolean option. This prevents op-versions from being updated when a feature is disabled. BUG: 954256 Change-Id: Ic68032b9e55a3f0191f8fc3ecd6b5ced385ad943 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5094 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd-volgen: Enable open-behind based on op-versionKaushal M2013-06-053-11/+50
| | | | | | | | | | | | | | | | Backport of patch on master branch, under review at http://review.gluster.org/4866 This patch enables the open-behind by default only when the op-version allows it. Also the volume op-version calculations take account of this enablement. BUG: 954256 Change-Id: Ie739bc23ba90ec2f009feecef28187912a37487c Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5095 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Set op-version on startup based on install statusKaushal M2013-06-051-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of change fa227c0 glusterd: Set op-version on startup based on install status from master. If the current installation of glusterfs doesn't have a stored op-version and is, a. a fresh install, then set op-version to maximum b. an upgrade from release which didn't have op-version support, set it to minimum. The install status is detected using the peer-uuid. If both peer-uuid and op-version are not present in the store, the installation is fresh. If peer-uuid is present, but op-version is absent in the store, the installation has been upgraded from a version which didn't support op-versions. By setting the initial op-version as above, we can ensure that a. features are not enabled accidentally during upgrades b. a fresh install starts with all possible features enabled. BUG: 954256 Change-Id: I5cdd0c63fd16ecfa2fede99684da6fd6167823a8 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5001 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>