6957 Commits

Author SHA1 Message Date
Krutika Dhananjay
258e61adb5 cluster/dht: Fix dict_t leaks in rebalance process' execution path
Two dict_t objects are leaked for every file migrated in success codepath.
It is the caller's responsibility to unref dict that it gets from calls to
syncop_getxattr(); and rebalance performs two syncop_getxattr()s per file
without freeing them.

Also, syncop_getxattr() on GF_XATTR_LINKINFO_KEY doesn't seem to be using
the response dict. Hence, NULL is now passed as opposed to @dict to
syncop_getxattr().

Change-Id: I5a4b5ab834df3633dea994f239bbdbc34cbe9259
BUG: 1142052
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8763
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-19 07:10:24 -07:00
Gu Feng
fb6702b7f8 socket: Fixed parsing RPC records containing multi fragments
In __socket_proto_state_machine(), when parsing RPC records containing
multi fragments, just change the state of parsing process, had not
processed the memory to coalesce the multi fragments.

Change-Id: I5583e578603bd7290814a5d26885b31759c73115
BUG: 1139598
Signed-off-by: Gu Feng <flygoast@126.com>
Reviewed-on: http://review.gluster.org/8662
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2014-09-19 05:37:05 -07:00
Xavier Hernandez
0ee0cfae80 ec: Fix invalid inode lock in ftruncate
The fops 'truncate' and 'ftruncate' share some code and inodelk()
was always made against the inode inside the loc_t structure
instead of that of fd_t. Since ftruncate has the loc initialized
to NULL, this fop was executed without any lock, allowing some
concurrent modifications in the file size.

Also changed the way in which 'fop' and 'ffop' are differentiated
in shared code. Now it uses 'id' field instead of checking if 'fd'
is NULL.

Change-Id: Ibd18accf2652193b395a841b9029729e5f4867c6
BUG: 1140396
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8695
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-19 03:05:25 -07:00
Xavier Hernandez
f32378b660 ec: Fix some size_t vars to 64 bits even on 32 bits machines
The 64 bits 'trusted.ec.size' extended attribute was incorrectly
computed on 32 bits machines due to an overflow on negative
numbers.

Also changed some potentially dangerous uses of size_t in other
places.

Change-Id: Id76cfe49a2f350e564b5c71d8c8644fb9ce86662
BUG: 1125312
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8738
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-19 03:02:47 -07:00
Harshavardhana
c788a7784d extras/checkpatch.pl: linux kernel style patch verification
This is to bring in adherence to coding policy, prior to patch
submission for review.

 - no tabs
 - no whitespace
 - indentation (linux style) etc.

This is in the interest at large for the GlusterFS codebase
to be more cleaner and readable.

./rfc.sh - now supports running this for all patches diverged
from "origin/master" revision.

NOTE: One should take this as a handle for good guidelines and
never use it as a tool for correctness, use common-sense in all
the cases ;-)

Change-Id: Ib9a5ed207cde152cb92b8d38cec83e8ce9ef7f28
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8181
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anders Blomdell <anders.blomdell@control.lth.se>
2014-09-18 12:55:26 -07:00
Raghavendra G
1e1b709a4b storage/posix: Log when mkdir is on an existing gfid but non-existent
path.

consider following steps on a distribute volume

1. rename (src, dst) on hashed subvolume
2. snapshot taken
3. restore snapshots and do stat on src and dst

Now, we end up with two directories src and dst having same gfid,
because of distribute creating directories on non-existent subvolumes
as part of directory healing.

This can happen even with race between rename and directory healing in
dht-lookup. This can lead to undefined behaviour while accessing any
of both directories. Hence, we are logging paths of both
directories, so that a sysadmin can take some corrective action when
(s)he sees this log. One of the corrective action can be to copy
contents of both directories from backend into a new directory and
delete both directories.

Since effort involved to fix this issue is non-trivial, giving this
workaround till we come up with a fix.

Change-Id: I38f4520e6787ee33180a9cd1bf2f36f46daea1ea
BUG: 1105082
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8008
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-09-18 10:15:55 -07:00
Vijay Bellur
331e9e2051 syncop: Invoke dict_unref() in inodelk only if dictionary is not NULL
In the absence of this check, logs can get flooded with messages like this when rebalance is run:

[2014-09-04 17:48:07.148262] W [dict.c:480:dict_unref] (-->/lib64/libc.so.6()
[0x30daa47a00] (-->/usr/local/lib/libglusterfs.so.0(synctask_wrap+0x12)
[0x7fa20b7c6ec2]
(-->/usr/local/lib/glusterfs/3.7dev/xlator/cluster/distribute.so(dht_migrate_file+0x23f)
[0x7fa200fdb58f]))) 0-dict: dict is NULL


Change-Id: I4c93e4485293b35d86ba07df4d583d2758ec3f49
BUG: 1130888
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/8601
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2014-09-17 07:13:50 -07:00
Anuradha
6f5bb1bfc5 cluster/afr: Set all the xattrs needed by index xlator
Index xlator removes the index file from indices
xattrop directory in case the value for keys sent
are zero.

If all the required keys are not set by afr
then index file might be removed in an invalid
way.

With this change all the keys required by index
xlator are set by afr such that invalid removal of
files does not occur.

Change-Id: Idbed0764a95157fd5cab8d6685057a43788fc7df
BUG: 1139230
Signed-off-by: Anuradha <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/8652
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-09-16 19:49:32 -07:00
Emmanuel Dreyfus
68e062ea6e Regression test portability: arequal-checksum
Emulate GNU libc extension FTW_SKIP_SUBTREE for system that lack it.
FTW_ACTIONRETVAL is another GNU libc extension we just ignore now.

BUG: 764655
Change-Id: I25d9641055a30fe72b4e248f51b53b2a3ba637e9
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8427
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-16 05:18:33 -07:00
Emmanuel Dreyfus
b30f9e56cd Do not assume sizeof(size_t)
This fixes an assumption that sizeof(size_t) == sizeof(uint64_t), which
is not guaranteed. At least on NetBSD/i386, size_t is 32 bit long.

Caught by tests/basics/file-snapshot.t

BUG: 764655
Change-Id: Ib7620a2ffe8758521886af37bc280101a040d860
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8441
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2014-09-16 04:47:15 -07:00
Venkatesh Somyajulu
c7437f35df cluster/dht: Changed log level to DEBUG
Change-Id: Ia4dde95367b44d63f57f0840c2a2f351b1cfb072
BUG: 1138602
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8697
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-16 02:32:13 -07:00
Justin Clift
323ac2adb6 Typo fix THANKS message
BUG: 1142045
Change-Id: I9323453d475779a01516adcb4c959e6ac4cf689c
Reviewed-on: http://review.gluster.org/8174
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-16 02:30:36 -07:00
Xavier Hernandez
d97863562b ec: Optimize read/write performance
This patch significantly improves performance of read/write
operations on a dispersed volume by reusing previous inodelk/
entrylk operations on the same inode/entry. This reduces the
latency of each individual operation considerably.

Inode version and size are also updated when needed instead
of on each request. This gives an additional boost.

Change-Id: I4b98d5508c86b53032e16e295f72a3f83fd8fcac
BUG: 1122586
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8369
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2014-09-15 23:12:16 -07:00
Xavier Hernandez
2be5458500 ec: Only heal data/metadata when inode has enough information
Sometimes loc_t structure in a heal request doesn't contain enough
information to do an inodelk call (basically the gfid is missing).
In these cases, self heal only recovers entry information.

Change-Id: I459990c7df728ff4baf164df046672ddcde3efa5
BUG: 1122581
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8368
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2014-09-15 23:11:53 -07:00
Raghavendra G
3e1935c814 features/quota: fixes to dentry management code in rename.
1. After a successful rename (src, dst), the dentry
 <dst-parent, dst-basename> would be associated with src-inode.

2. Its src inode that survives if both of src and dst are present.

The fixes are done based on the above two observation.

Change-Id: I7492a512e3732b1455c243b02fae12d489532bfb
BUG: 1140084
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8687
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-15 11:24:03 -07:00
Pranith Kumar K
245eec73fb cluster/afr: Handle EAGAIN properly in inodelk
Problem:
When one of the brick is taken down and brough back up in a replica pair, locks
on that brick will be allowed. Afr returns inodelk success even when one of the
bricks already has the lock taken.

Fix:
If any brick returns EAGAIN return failure to parent xlator.

Change-Id: I5b842d0fc094359cc4231494053d2bfeb606bbbe
BUG: 1141539
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8710
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-15 10:09:46 -07:00
Justin Clift
7c2c5afb8d osx: LaunchDaemon plist filename should start with org instead of com
Change-Id: I5e06bcc473224667387c555355d7e1e81bf4911b
BUG: 1141659
Reviewed-on: http://review.gluster.org/8734
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:50 -07:00
Justin Clift
926522a3fe osx: Remove legacy extras/MacOSX directory
BUG: 1141682
Change-Id: Ic84171b070985a11b70d4548aa5e507a121d2164
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/8736
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:30 -07:00
Pranith Kumar K
63b1c2e2a4 tests: Fix typo in M2 definition
Thanks to Anoop CS for finding the bug

Change-Id: I237e3a396967096b8e49200aed279af970e0a4d5
BUG: 1141167
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8707
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-09-12 20:20:51 -07:00
Raghavendra Bhat
5d6f55ed9f snapview-server: get the handle if its absent before doing any fop
* Now that NFS server does inode linking in readdirp, it can resolve the
  gfid (i.e. find the right inode from its inode table) present in the
  filehandle sent by the NFS client on which a fop came. So instead of
  sending the lookup on that entry, it directly sends the fop. But
  snapview-server does not get the handle for the entries in readdirp
  (because doing a lookup on each entry via gfapi would be costly. So it
   waits till a lookup is done on that inode, to get the handle and the
   fs instance and fill it in the inode context). So when NFS resoves the
   gfid and directly sends the fop, snapview-server will not be able to
   perform the fop as the inode contet would not contain the fs instance
   and the handle. So fops should check for the handle before doing gfapi
   calls. If the handle and fs instance are not present in the inode context
   they should get them by doing an explicit lookup on the entry.

Change-Id: Idd648fbcc3ff6aadc3b63ff236561ca967b92f5d
BUG: 1115949
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/8324
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-12 10:55:06 -07:00
hchiramm
2bce69036f doc: Move bd translator documentation to xlators directory.
Change-Id: I21bd1cc6d0220035d28ca15e1e32b25a6c5a184a
Signed-off-by: hchiramm <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8700
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-09-12 03:28:28 -07:00
Atin Mukherjee
f1fecf5fb3 test: cleanup should clean all left over (stale) mounts
This is a temporary work around to fix the spurious failures seen in ec
testcases. As per the initial analysis it looks like quota
(glusterd_quota_initiate_fs_crawl) is causing a mount point in /tmp to be stale.
Once the root cause is identified this fix can be reverted as well.

Change-Id: I8686f144ed298124074f749e75c13028ec00be01
BUG: 1092850
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/8703
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-12 03:27:47 -07:00
Xavier Hernandez
51becaa5e8 ec: Do not destroy inode context on inode invalidation
Currently there is no need to handle inode invalidation requests,
so this callback has been removed.

Change-Id: I0ac2e47679bf62b1493e0403178305923bc036e8
BUG: 1126932
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8420
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-11 22:50:06 -07:00
Xavier Hernandez
26be0b3a9f ec: Removed SSE2 dependency
This patch implements the Galois Field multiplications using pure C
code without any assembler support. This makes the ec xlator portable
to other architectures.

In the future it will be possible to use an optimized implementation
of the multiplications using architecture dependent facilities (it
will be automatically detected and configured). To allow bricks with
different machine word sizes to be able to work seamlessly in the
same volume, the minimum fragment length to be stored in any brick
has been fixed to 512 bytes. Otherwise, different implementations
will corrupt the data (SSE2 used 128 bytes, while new implementation
would have used 64).

This patch also removes the '-msse2' option added on patch
http://review.gluster.org/8395/

Change-Id: Iaf6e4ef3dcfda6c68f48f16ca46fc4fb61a215f4
BUG: 1125166
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8413
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2014-09-11 22:44:12 -07:00
Xavier Hernandez
5157914bac tests/ec: Avoid spurious umount failures
Change-Id: Id22d64a95adf3666a5e4208f87f9a6d91c40b267
BUG: 1092850
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8694
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-11 06:33:12 -07:00
Venkatesh Somyajulu
976ecc99b4 cluster/dht: Changed log level to DEBUG
Change-Id: I7a4ee0c5a6a94bd4f31aff510a2971750913ed45
BUG: 1138602
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8621
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-11 03:17:51 -07:00
Susant Palai
1c8d4bf6ab CLI: Show warning on remove-brick commit
Signed-off-by: Susant Palai <spalai@redhat.com>

Change-Id: I48a4168f81bd272216549c76b0bc1b23e34894d6
BUG: 1136702
Reviewed-on: http://review.gluster.org/8664
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-09 22:06:43 -07:00
Raghavendra G
ed4a754f7b cluster/dht: fix memory corruption in locking api.
<man 3 qsort>

     The  contents  of the array are sorted in ascending order
     according to a comparison function pointed to by compar, which is
     called with two arguments that "point to the objects being
     compared".

</man 3 qsort>

qsort passes "pointers to members of the array" to comparision
function. Since the members of the array happen to be (dht_lock_t *),
the arguments passed to dht_lock_request_cmp are of type (dht_lock_t
**). Previously we assumed them to be of type (dht_lock_t *), which
resulted in memory corruption.

Change-Id: Iee0758704434beaff3c3a1ad48d549cbdc9e1c96
BUG: 1139506
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8659
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-09 20:29:42 -07:00
Shyam
b3314ea6e8 cluster/dht: Fixed double UNWIND in lookup everywhere code
In dht_lookup_everywhere_done:
Line: 1194 we call DHT_STACK_UNWIND
and in the same if condition we go ahead and call, goto
unwind_hashed_and_cached; which at Line 1371 calls another UNWIND.

As is obvious, higher frames could cleanup their locals and on
receiving the next unwind could cause a coredump of the process.

Fixed the same by calling the required return post the first unwind

Change-Id: Ic5d57da98255b8616a65b4caaedabeba9144fd49
BUG: 1139812
Signed-off-by: Shyam <srangana@redhat.com>
Reviewed-on: http://review.gluster.org/8666
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: susant palai <spalai@redhat.com>
2014-09-09 20:29:18 -07:00
Vijay Bellur
c2513927b3 doc: Remove volume rename from gluster's man page.
Change-Id: I5cde789088417f26d0c8319a1b24fdaa2c37dfe6
BUG:  1031328
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/8656
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-09 06:29:57 -07:00
Ravishankar N
7d0a305e23 quota/marker: Fix dict leaks
Unref dicts in quota and marker functions before they return.

Change-Id: I772edc7b46657a70fb136e037576c65e9beeaca8
BUG: 1139327
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8655
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2014-09-09 03:12:15 -07:00
Raghavendra Bhat
822cf315a5 snapview-server: register a callback with glusterd to get notifications
* As of now snapview-server is polling (sending rpc requests to glusterd) to
  get the latest list of snapshots at some regular time intervals
  (non configurable). Instead of that register a callback with glusterd so that
  glusterd sends notifications to snapd whenever a snapshot is created/deleted
  and snapview-server can configure itself.

Change-Id: I17a274fd2ab487d030678f0077feb2b0f35e5896
BUG: 1119628
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/8150
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-08 07:14:19 -07:00
Santosh Kumar Pradhan
5c869aea79 gNFS: Fix memory leak in setacl code path
If ACL is set on a file in Gluster NFS mount (setfacl command),
and it succeed, then the NFS call state data is leaked. Though
all the failure code path frees up the memory.

Impact: There is a OOM kill i.e. vdsm invoked oom-killer during
rebalance and Killed process 4305, UID 0, (glusterfs nfs process)

FIX:
Make sure to deallocate the memory for call state in acl3_setacl_cbk()
using nfs3_call_state_wipe();

Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>

Change-Id: I9caa3f851e49daaba15be3eec626f1f2dd8e45b3
BUG: 1139195
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/8651
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-09-08 06:01:24 -07:00
Emmanuel Dreyfus
72324ef5e6 Always check for ENODATA with ENOATTR
Linux defines ENODATA and ENOATTR with the same value, which means that
code can miss on on the two without breaking.

FreeBSD does not have ENODATA and GlusterFS defines it as ENOATTR just
like Linux does.

On NetBSD, ENODATA != ENOATTR, hence we need to check for both values
to get portable behavior.

BUG: 764655
Change-Id: I003a3af055fdad285d235f2a0c192c9cce56fab8
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8447
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-09-08 02:06:52 -07:00
Raghavendra Talur
165cf459cf tests: Don't check for init process.
As a way of checking for existence of pidof
we were checking for init process, which may
not be true in case of Containers.

Change-Id: I402e7ab4f2459057826ed24094e87dd605eaac8a
BUG: 1073168
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/8600
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-09-06 09:33:47 -07:00
Ravishankar N
15a2088da5 cluster/afr: perform list-xattr during lookup
Detect and heal mismatching user extended attributes during lookup.
'Forward' port of http://review.gluster.org/#/c/7444/

Change-Id: Id03c9746f083ffd3014711d0b3a2e5a71a45eed4
BUG: 1134691
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8558
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-09-05 22:19:33 -07:00
Lalatendu Mohanty
d2600dfda2 RPM spec file: Fixed the description for glusterfs
Previously description was saying glusterfs is a
clustered file-system which changed to ditsributed
file-system.

Change-Id: I3ee80024ba317e912890ceff2080b82ce111be95
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/8619
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-05 11:05:45 -07:00
Emmanuel Dreyfus
fa696f2f0b Build fix: -lz for qemu-block xlator
LIBZ_LIBS has been changed into ZLIB_LIBS everywhere in the
sources, except in qemu-block xlator. Fix it so that it can
find -lz and link correctly.

BUG: 1129939
Change-Id: I34ded175f056d1a0898804fe602e3d2d2cba27f5
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8623
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-09-05 10:17:48 -07:00
Harshavardhana
fd500d4396 porting: Provide setfattr/getfattr implementation
- Use 'getfattr' properly avoid redundant options during xattr query
- Untabify certain parts of tests (remove tabs)
- Avoid backtick evaluation for certain values to make code more portable.
- Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds
  spurious spaces in its output.

Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a
BUG: 1131713
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8520
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
2014-09-05 10:04:20 -07:00
Atin Mukherjee
88159becd9 barrier: features.barrier should be a NO_DOC
features.barrier is turned on/off internally by snapshot feature and hence it
should not be exposed to the customer and this option should not be documented.

Change-Id: Id9a421f94e291f1dc77044904bb18dd730c2d43e
BUG: 1135691
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/8572
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-09-05 02:45:15 -07:00
Emmanuel Dreyfus
dfe1229668 Regression test portability: EXPECT
Make sure test_expect_not_footer() and test_expect_footer() work on
non empty strings, otherwise it may produce errors such as in pgfid_feat.t
on NetBSD:
not ok 12 Got "" instead of ""

This a a missing bit from previosuly merged patchset:
 I9cb76ba863897126534c3808fb0c9e564659835f

BUG: 1129939
Change-Id: I2635b67deec9cf60295faab52e7421947b1f7bda
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8576
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-04 09:42:37 -07:00
Vipul Nayyar
271cdc1e06 io-stats: Adding private data dumping method
For the glusterfsiostat tool to be able to gather stats about mounted volumes
from meta xlator, private information in the io-stats xlator needs to be dumped
in the .meta folder.

Added functionality for total data being read/written to be dumped along with
latency related information for all fop functions present in io-stats.

Change-Id: I75486f0ca361844a643861789f6c1406f439674c
BUG: 1130023
Signed-off-by: Vipul Nayyar <nayyar_vipul@yahoo.com>
Reviewed-on: http://review.gluster.org/8244
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-03 11:01:40 -07:00
Anuradha
6064c22084 cluster/afr : Mark pending changelog xattrs for new creations
Based on type of file, set appropriate pending changelogs
for new entries.

Change-Id: Ifd124bf9bc54b996ce83ab9f39d03b3ccca7eb3c
BUG: 1130892
Signed-off-by: Anuradha <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/8555
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-09-03 10:30:26 -07:00
Venkatesh Somyajulu
bb2d5f49b5 cluster/dht: Added code to capture races in dht-lookup path
Change-Id: I9270d2d40ebd4b113ff961583dfda7754741f15b
BUG: 1116150
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8430
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-03 04:21:59 -07:00
Krutika Dhananjay
1f094f2519 cluster/afr: Minor fixes to #8574
* Fixed a bug in afr_selfheal_name_type_mismatch_check()
* Fixed indentation
* Removed redundant 'continue' statements

Change-Id: Ie58b5dec9085ce9fe46ae9f244ebae1b1cef7ac5
BUG: 1132469
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8586
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-09-03 04:10:37 -07:00
Nithya Balachandran
e03559c20a storage/posix : Missing space in log message
Added a space in a log message

Change-Id: Iabd50e6b5c9ff4673f59d6b52b785894b3dcdaf9
BUG: 1116150
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/8585
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-03 03:40:19 -07:00
Krishnan Parthasarathi
2c4c1918e3 glusterd: Improve debugging experience for glusterd locks
Today, when glusterd's internal locking mechanism fails
with invalid type or when another competing lock is being
held, the log message doesn't provide enough information
directly as to which command saw this (first). Following
is a snippet of how a failure would look in the log file.
This would greatly assist in debugging.

[2014-09-03 04:57:58.549418] E
[glusterd-locks.c:520:glusterd_mgmt_v3_lock]
(-->/usr/local/lib/glusterfs/3.7dev/xlator/mgmt/glusterd.so(__glusterd_handle_create_volume+0x801)
[0x7f30b071e651]
(-->/usr/local/lib/glusterfs/3.7dev/xlator/mgmt/glusterd.so(glusterd_op_begin_synctask+0x2c)
[0x7f30b072e19c]
(-->/usr/local/lib/glusterfs/3.7dev/xlator/mgmt/glusterd.so(gd_sync_task_begin+0x55d)
[0x7f30b072de6d]))) 0-management: Invalid entity. Cannot perform locking
operation on vol types

Change-Id: I0595f49d60e620e8b065f3506bdb147ccee383a7
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/8580
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-09-03 03:16:44 -07:00
Kaushal M
312b339190 glusterd: Prevent rebalance starting with old clients
Glusterd will prevent rebalance from starting when clients older than
glusterfs-v3.6.0 are connected to a volume. This is needed as running
rebalance with old clients connected could lead to data loss in some
cases. The DHT xlator on newer clients (>= 3.6.0) has been fixed to
prevent the data loss issues.

Change-Id: If58640236382a2fc13f73f6b43777f01713859f7
BUG: 1136201
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/8583
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-09-03 02:38:08 -07:00
Vijaikumar M
60f33e6d12 glusterd: Set the rlimit for Open FDs to higher value
Default 'open FD limit' is 1024. As the number of volumes/bricks
increases, brick-to-glusterd socket FDs also increases in glusterd and
runs out of the limit.

Solution is to set the 'Open FD' limit to higher value in glusterd

Change-Id: Iaa60b2155df2fa5a0759e054bdebffbc09f63ec1
BUG: 1136352
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8578
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-09-03 02:37:24 -07:00
Susant Palai
b81cec326d CLI: Adding warning message in case remove-brick commit executed
Change-Id: Ia2f1b2cd2687ca8e739e7a1e245e668a7424ffac
BUG: 1136702
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/8577
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-09-03 01:46:05 -07:00