721 Commits

Author SHA1 Message Date
Krishnan Parthasarathi
4e15a0b418 syncop: Fixed indentation and whitespaces.
Change-Id: I90e496b5d5027ac702ab3804ba52f26d537812a0
BUG: 764890
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4554
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-20 14:38:58 -08:00
Anand Avati
f0bfbbd0f2 call-stub: internal refactor
- 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>
2013-02-19 16:07:59 -08:00
Varun Shastry
6ff25bc981 libglusterfs: make gf_string2percent_or_bytesize to convert float numbers.
Change-Id: I0ac6588297bdb8b085c3c9b01848a098f7fd4293
BUG: 912206
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/4533
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-18 11:47:09 -08:00
Vijay Bellur
6c848529cb libglusterfs: Fix memory leaks in fd_lk_insert_and_merge
Change-Id: I666664895fdd7c7199797796819e652557a7ac99
BUG: 834465
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4525
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 17:03:40 -08:00
Vijay Bellur
fc501a57bc Better mechanism to handle memory accounting
Memory accounting will now be enabled if:

1) Any glusterfs process is spawned with argument --mem-accounting.
2) DEBUG is defined.

Change-Id: I3345e114127a57ce61916be0e2c4e0049a4c3432
BUG: 834465
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4523
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 16:55:37 -08:00
Anand Avati
1ffb2558fb synctask: implement setuid-like SYNCTASK_SETID()
synctasks can now call SYNCTASK_SETID(uid,gid) to set the effective
uid/gid of the frame with which the FOP will be performed.

Once called, the uid/gid is set either till the end of the synctask
or till the next call of SYNCTASK_SETID()

Change-Id: I7eb74f7c473099bcae39310d2ab353d58f8eb2ba
BUG: 884597
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4269
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
2013-02-13 09:31:33 -08:00
Krutika Dhananjay
7c0d35b2e7 glusterd: harden 'volume start' staging to check for brick dirs' presence
PROBLEM:

When the brick directory of a volume is absent on any of the servers,
AND an attempt is made to start the volume, commit fails ONLY on the
node where the brick dir is absent, leading to a split-brain like
situation.

FIX:

Harden 'volume start' to check for the presence of brick directories
at the time of staging, thereby preventing commit failure.

Change-Id: I67faeb9afbd3aa76f08645924462db126bf7a977
BUG: 889996
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4365
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 19:13:36 -08:00
Rajesh Amaravathi
0b7cdbf50d rpc: get hostnames of client to allow FQDN based authentication
If FQDNs are used to authenticate clients, then from
this commit forth, the client ip(v4,6) is reverse looked up
using getnameinfo to get a hostname associated with it,
if any, thereby making FQDN-based rpc authentication possible.

Change-Id: I4c5241e7079a2560de79ca15f611e65c0b858f9b
BUG: 903553
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4439
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 16:15:54 -08:00
Raghavendra Bhat
6b292ff33f libglusterfs/core: dump frame and callstack creation times in statedump
Change-Id: I3772602ac264cbca490d77a0343038297faee7df
BUG: 844688
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4087
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 12:18:49 -08:00
Kaushal M
02d653931c glusterd,glusterfsd,libgfapi: Client op-version
This patch introduces op-version support for glusterfs clients.
Now, a client sends its supported op-versions during the volfile fetch request
and glusterd will return the volfile only if the client can support the current
op-version of the cluster.

Change-Id: Iab1f1f1706802962bcf27058657c44e8a344d2f6
BUG: 907311
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4247
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 12:17:06 -08:00
Pranith Kumar K
ee1472336c libglusterfs: Maintain open-fd-count in inode.
Change-Id: I643d02959f92e40f68a53baf165753ed20f8b3e0
BUG: 908146
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4468
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 09:48:23 -08:00
Pranith Kumar K
04e673f14e protocol/client: Periodically attempt reopens
If the brick is taken down and the hard disk is replaced
and the brick is brought back up, the re-opens of the open-fds
will fail because the file is not present on the brick.
Re-opens are not attempted even if the files are re-created by
self-heal until the brick is brought down after the files are
re-created and brought back up. This is a problem with a VM-store
in a replica-setup.  Until the fd is re-opened the writes will
never happen on the brick where the hard-disk is replaced.
To handle this situation gracefully, client xlator is enhanced
to perform finodelk, fxattrop, writev, readv using anonymous fds
if the file is yet to be re-opened. If the fop succeeds then client
xlator attempts re-open.

Change-Id: I1cc6d1bbf8227cd996868ab2ed0a57fb05e00017
BUG: 821056
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4358
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-02-03 11:33:31 -08:00
Anand Avati
12689595ab fd-lk: implement new method to check for empty fd_lk_ctx_t
to use this in fuse-bridge, to conditionally attempt lock migration
to new graph.

Change-Id: I9b10d5839c4ac6051c75e4c020371391cd886ac8
BUG: 808400
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4455
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2013-01-30 23:41:16 -08:00
Raghavendra Bhat
e979c0de9d libglusterfs/syncop: do not hold ref on the fd in cbk
* Do not do fd_ref in cbks of the fops which return a fd (such as
  open, opendir, create).

Change-Id: Ic2f5b234c5c09c258494f4fb5d600a64813823ad
BUG: 885008
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4282
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-30 23:40:37 -08:00
Avra Sengupta
b8d5fd2b88 glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5
BUG: 764890
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 15:27:29 -08:00
Anand Avati
fb9f29e892 fd: expose __fd_ctx_del symbol
used by open-behind for deleting context in locked critical region

Change-Id: I3380152211fed6aacbb719468b720376e6ec1e7c
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-28 16:45:30 -08:00
Anand Avati
a81748c3f4 fd: filter anonymous FD from fd_lookup() result
Those callers whose requirements can accommodate an anonymous FD
need to call fd_anonymous(). fd_lookup() is strictly for open()ed
file descriptors only.

Change-Id: I5d8da3db0f44b2e2161d345d7a662cfd4ef87500
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4404
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-28 16:44:51 -08:00
Amar Tumballi
4faeedc992 "gcc -pedantic": made 'inline' functions as 'static inline' functions
for passing the build with -pedantic flag

Change-Id: I80fd9528321e4c6ea5bec32bf5cdc54cc4e4f65e
BUG: 875913
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/4186
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-23 11:12:15 -08:00
Avra Sengupta
777d395fea core: fixes for gcc's '-pedantic' flag build
* warnings on 'void *' arguments
* warnings on empty initializations
* warnings on empty array (array[0])

Change-Id: Iae440f54cbd59580eb69f3ecaed5a9926c0edf95
BUG: 875913
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-21 22:17:36 -08:00
Raghavendra Bhat
fd8b19af17 debug/trace: save the recent fops received in the event-history
* Make use of event-history in debug/trace xlator to dump the recent fops,
when statedump is given. trace xlator saves the fop it received along
with the time in the event-history and upon statedump signal, dumps its
history. The size of the event-history can be given as a xlator option.

* Make changes in trace to take logging into log-file or logging to
history as an option. By default both are off.

Change-Id: I12baee5805c6efb55735cead4e2093fb94d7a6a0
BUG: 797171
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4088
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-17 21:15:13 -08:00
Avra Sengupta
91cc423b48 logging: Added fflush in _gf_log.
Change-Id: I06444b6bc3b1acc8cabd863087bd3508de3c548c
BUG: 889157
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4344
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-12-21 03:48:48 -08:00
Amar Tumballi
000e65d7af core: remove all the 'inner' functions in codebase
* move 'dict_keys_join()' from api/glfs_fops.c to libglusterfs/dict.c
  - also added an argument which is treated as a filter function if
    required, currently useful for fuse.

* now 'make CFLAGS="-std=gnu99 -pedantic" 2>&1 | grep nested' gives
  no output.

Change-Id: I4e18496fbd93ae1d3942026ef4931889cba015e8
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 875913
Reviewed-on: http://review.gluster.org/4187
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-19 23:35:29 -08:00
Kaushal M
5eb8bac561 glusterd, cli: Task id's for async tasks
This patch introduces task-id's for async tasks like rebalance, remove-brick and
replace-brick. An id is generated for each task when it is started and displayed
to the user in cli output. The status of running tasks is also included in the
output of "volume status" along with its id, so that a user can easily track the
progress of an async task.

Also,
 * added tests for this feature into the regression test suite.
 * added a python script for creating files, 'create-files.py', courtesy
   Vijaykumar Koppad (vkoppad@redhat.com) into the test suite.

This patch reverts the revert commit 698deb33d731df6de84da8ae8ee4045e1543a168.

BUG: 857330
Change-Id: Id43d7cb629a38f47f733fbc18cb4c5f2f0327c7a
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4294
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-19 13:32:49 -08:00
Emmanuel Dreyfus
6dd85beaf9 Spurious reserved port warning fix
reserved ports is a Linux specitic concept. Make no warnings for
other systems.

BUG: 815227
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Change-Id: I40037b9e99e7fcbdd0d153865ee7c2ef3733132e
Reviewed-on: http://review.gluster.org/4308
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-13 12:33:18 -08:00
Krutika Dhananjay
845aba3ddc glusterd: fail vol set when value = empty string/string with all whitespaces
PROBLEM:

'volume set' operation accepts empty strings and strings containing
all whitespaces for value. The result - subsequent attempts to start
glusterd fail.

FIX:

Added relevant checks in xlator_option_validate_* functions in options.c
and in conversion functions in common-utils.c to invalidate wrong option
values.

Change-Id: I33232c6b42ab4fcce85c2d0e0b0da145fc9232c3
BUG: 859927
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4033
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-10 14:18:17 -08:00
Raghavendra Bhat
ee2813f440 rpc: check the ctx->listener before accessing rpcsvc object
Change-Id: I3c913d1fab07deb41eec05c5adc29a3964315b43
BUG: 858487
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 16:28:03 -08:00
Anand Avati
698deb33d7 Revert "glusterd, cli: Task id's for async tasks"
This reverts commit ed15521d4e5af2b52b78fd33711e7562f5273bc6

Strangely, the test scripts are "silently" passing for failures too. Reverting patch for now.

Change-Id: I802ec1634c7863dc373cc7dc4a47bd4baa72764e
Reviewed-on: http://review.gluster.org/4267
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 15:59:52 -08:00
Anand Avati
98879ebddd rpc-transport/socket: implement read-ahead of RPC headers
This reduces the number of read() system calls on the socket to
complete the full RPC fragment reading.

Change-Id: I421a53af195ead4aad70e09e0172a61ad7912d83
BUG: 821087
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3855
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-12-04 14:46:04 -08:00
Kaushal M
7b5a21707e glusterd, cli: Task id's for async tasks
This patch introduces task-id's for async tasks like rebalance, remove-brick and
replace-brick. An id is generated for each task when it is started and displayed
to the user in cli output. The status of running tasks is also included in the
output of "volume status" along with its id, so that a user can easily track the
progress of an async task.

Also,
 * added tests for this feature into the regression test suite.
 * added a python script for creating files, 'create-files.py', courtesy
   Vijaykumar Koppad (vkoppad@redhat.com) into the test suite.

Change-Id: Ib0c0d12e0d6c8f72ace48d303d7ff3102157e876
BUG: 857330
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3942
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 14:44:36 -08:00
Pranith Kumar K
555f1cfe7d libglusterfs: fix unused-but-set-variable warning
Change-Id: Ie152169a70eaec9554382b39d43ae7ffa04f041c
BUG: 762989
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4264
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 01:41:49 -08:00
Raghavendra Bhat
fa1607ea59 socket,rdma: before binding to any port check if it is a reserved port
* The list of ports which are reserved is obtained by reading the file
  /proc/sys/net/ipv4/ip_local_reserved_ports.

Change-Id: I3a832f53efbb79dd719b34a30cbaf28269f25816
BUG: 762989
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4131
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-12-03 03:02:55 -08:00
M. Mohan Kumar
3c72850e8d BD Backend: CLI commands to create/delete image
Cli commands  added to create/delete a LV device.

The following command creates lv in a given vg.
$ gluster bd create <volname>:<vgname>/<lvname> <size>

The following command deletes lv in a given vg.
$ gluster bd delete <volname>:<vgname>/<lvname>

BUG: 805138
Change-Id: Ie4e100eca14e2ee32cf2bb4dd064b17230d673bf
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3718
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:39:53 -08:00
Raghavendra G
8fd4aa7414 features/locks: implement fgetxattr and fsetxattr
implement xattrs for GF_XATTR_LOCKINFO_KEY, which will be used
for posix-locks migration from old to new graph after a switch.

fgetxattr (fd, GF_XATTR_LOCKINFO_KEY) will return a dict.
This dict has a serialized dict stored for key
GF_XATTR_LOCKINFO_KEY. This serialized dict in turn has fdnum
value of locks acquired on this fd with modified pathinfo
(containing hostname and base directory components) as key.

fsetxattr (newfd, GF_XATTR_LOCKINFO_KEY, dict) has following
semantics. dict can be the result of a previous fgetxattr with
GF_XATTR_LOCKINFO_KEY. In that case, a dict_get on dict
constructed using serialized buffer is done on modified pathinfo
as key. If a value is got, that value is treated as fdnum and for
every lock l on newfd->inode we do,
      if (l->fdnum == fdnum) {
         l->fdnum = fd_fdnum (newfd);
         l->transport = <connection identifier of connection on which fsetxattr came>;
      }

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I73a8f43aa0b6077bc19f8de52205ba748f2d8bbe
BUG: 808400
Reviewed-on: http://review.gluster.org/4120
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2012-11-27 22:54:27 -08:00
Raghavendra
228f0ea02b cluster/stripe: handle GF_XATTR_LOCKINFO_KEY in f(get)(set)xattr
Change-Id: I4463006a7f54c05e757d877c56e1330fd91aec45
BUG: 808400
Signed-off-by: Raghavendra <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4125
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-27 22:44:40 -08:00
Raghavendra
6c3eebad5c libglusterfs/mem-pool: implement gf_memdup
Change-Id: I1d7a1e7418f424fe08c041d562098b947c01580f
BUG: 808400
Signed-off-by: Raghavendra <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4124
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-27 22:44:19 -08:00
Pranith Kumar K
76a4afec6e libglusterfs: Implement float percentage
Change-Id: Ia7ea63471f0bbd74686873f5f6f183475880f1a0
BUG: 839595
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.org/4162
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 23:13:39 -08:00
Emmanuel Dreyfus
1469366571 Use more portable mkstemp() instead fo mkostemp()
mkostemp() with O_CREAT|O_EXCL|O_RDWR|O_TRUNC|O_APPEND is mkstemp()
and mkstemp() is available on more systems than mkostemp()

NULL-commit to cause jankins ro rebuild

BUG: 764655
Change-Id: I6ee0f635d3699bd70b0963b24af07bd7d5c2dc58
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/4152
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-22 10:06:45 -08:00
Raghavendra G
79eb7c62e2 libglusterfs: implement gf_strndup
Change-Id: Ifb7bf22e8cf4ad1faccf7999c36919693912093f
BUG: 808400
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4135
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-21 01:41:12 -08:00
Kaleb S. KEITHLEY
4e1c921636 NFS is picking up geo-rep's already open (read-only) file descriptor
Add anonymous member to fd_t and use it instead of over-loading pid for
geo-rep and self heal

Change-Id: I4d6b29a044a8ed4b8f69ff6e3f35ee227739b2af
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
BUG: 874272
Reviewed-on: http://review.gluster.org/4185
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-14 05:37:02 -08:00
Raghavendra Bhat
7997d36ce3 xlator/fuse: integrate fuse with event-history
use event-history framework for saving and dumping (on necessity)
important xlator specific information.

Tests:
Included the regression testcase.

Change-Id: I6c0532e9ffe0b624286cdc4d2637b1bd2c0579e0
BUG: 858215
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: root <root@thinkpad.(none)>
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/3925
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-12 02:24:23 -08:00
Jeff Darcy
c7f7f134a7 core: add STACK_WIND_TAIL for more efficient default_xxx.
Change-Id: Ic38e2183d1320bb17c014aca33779471c8db5d5f
BUG: 867132
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4092
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-25 00:05:10 -07:00
Emmanuel Dreyfus
6decc75807 In some cases AI_ADDRCONFIG confuses NetBSD 6.0
BUG: 764655
Change-Id: I29198c94c6788f9e01f57e11798f3d3d7cd9c8de
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/4105
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2012-10-20 00:32:58 -07:00
Raghavendra Bhat
56d1f81949 glusterfs: add gf_mkostemp api and use it instead of mkostemp of libc
Change-Id: Icc12b99e2233d22037e2c4bb2b6966e45668b7dd
BUG: 764890
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4091
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2012-10-17 23:37:03 -07:00
Anand Avati
f59494ba65 syncop: save and restore THIS from the time of context switch
The current yield() code assumes that the point of yielding
is always in the translator where the synctask was created. This
can be a problem for nested syncops and/or where syncop is issued
by a different translator.

So, save the THIS pointer just before swapcontext() and restore
it right after resuming.

Change-Id: I86aad2329ccbc3ac1f04fbec3835136ff3fa79fb
BUG: 862838
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4085
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>
2012-10-16 14:24:13 -07:00
Raghavendra Bhat
3d10587d9d glusterfs: code cleanup
Change-Id: I99bbb720d8b42c8b3899bb1353c6b73f7fcd50f1
BUG: 764890
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4042
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-15 22:43:02 -07:00
Varun Shastry
397aa9235e features/quota: Accept float numbers for quota limit.
Quota limit can be given a floating value like 2.5GB or 0.5TB, which was not
possible before.

Change-Id: I2c89fd521e8b70be51252677c7986abcfa9d11a2
BUG: 819394
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/4068
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-12 00:14:53 -07:00
Krishnan Parthasarathi
1f2dbafc72 glusterd: Moved peer rsp handling functions to glusterd-utils
- Moved inner functions used in conjunction with synctask, 'out'.

Change-Id: I7fbfd9881ea58645c4295a9fa7163ddd15a45d2f
BUG: 862834
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4066
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-11 11:58:33 -07:00
Anand Avati
43514de5c0 syncop: fix symlink param
make syncop_symlink() accept 'const char *linkname' instead of
'char *linkname'

Change-Id: I7751d552e4a4cc6e8b8e587b9e520213f4e11b45
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4020
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-10-03 14:53:57 -07:00
Anand Avati
5f423c68a1 syncop: Implement some missing operations
- syncop_mkdir()
- syncop_rmdir()
- syncop_rename()

Change-Id: I177db0f9af7c99fc6645d59521c8fb82f73812ca
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-10-03 14:53:37 -07:00
Jeff Darcy
557602e763 core: make sure there are processors for just-queued tasks
Change-Id: I6196ad02fab6c24ac473cda0f78f9e946f0329ce
BUG: 862838
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4031
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-03 14:10:24 -07:00