| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The restriction of using fds opened by the same Pid means fds cannot
be shared across threads of multithreaded application. Note that fops
from kernel have different Pid for different threads. Imagine
following sequence of operations:
* Turn off performance.open-behind
* Thread t1 opens an fd - fd1 - on file "file". Let's assume nodeid of
"file" is "nodeid-file".
* Thread t2 does RENAME ("newfile", "file"). Let's assume nodeid of
"newfile" as "nodeid-newfile".
* t2 proceeds to do fstat (fd1)
The above set of operations can sometimes result in ESTALE/ENOENT
errors. RENAME overwrites "file" with "newfile" changing its nodeid
from "nodeid-file" to "nodeid-newfile" and post RENAME, "nodeid-file" is
removed from the backend. If fstat carries nodeid-file as argument,
which can happen if lookup has not refreshed the nodeid of "file" and
since t2 doesn't have an fd opened, fuse_getattr_resume uses STAT
which will fail as "nodeid-file" no longer exists.
Since the above set of operations and sharing of fds across
multiple threads are valid, this is a bug.
The fix is to use any fd opened on the inode. In this specific example
fuse_getattr_resume will find fd1 and winds down the call as fstat
(fd1) which won't fail.
Cross-checked with "Miklos Szeredi" <mszeredi.at.redhat.dot.com> for
any security issues with this solution and he approves the solution.
Thanks to "Miklos Szeredi" <mszeredi.at.redhat.dot.com> for all the
pointers and discussions.
Change-Id: I88dd29b3607cd2594eee9d72a1637b5346c8d49c
BUG: 1510401
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Structured logging infra is available in logging library with
issue #240. Log messages with dynamic content are identified and
converted to structured logging format(`gf_msg` to `gf_smsg` and
`gf_log` to `gf_slog`)
BUG: 1501054
Change-Id: I99b35396455a634f5267eb1379d481ea981e5494
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439,
440, 441, 442, 443
Issue: Event include_recursion
Removed redundant, recursive includes from the files.
Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : In glusterd-snapshot-utils.c:2778 code path is unreachable as it was
intended for n-way replication snapshot support.
Fix : Removed code now, will revert back this change in future once we support
n-way replication in snapshot.
This patch fixes coverity issue 687 from [1].
[1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I163f318e62a7e84d211d9930dedee6587d37b2a0
BUG: 789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I95365c443705f56561cc10138318eb96db3b941e
BUG: 1505660
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If a volume is not having server quorum enabled and in a trusted storage
pool all the glusterd instances from other peers are down, on restarting
glusterd the brick start trigger doesn't happen resulting into the
brick not coming up.
Change-Id: If1458e03b50a113f1653db553bb2350d11577539
BUG: 1509845
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problems: According to Coverity Issue ID 207
issues are as follows-
a-) Dereferencing "this" pointer without checking if it points to NULL.
b-) The IF condition on line 1750 should check
if any *one* of dict, this or peerinfo is NULL
and not *all*.
Fix:
Replace the && operator with || to check if any *one* of
this, dict or peerinfo is NULL and then execute out label.
Change-Id: I40057d6cade71d3862c8e491bf4137cf25dda327
BUG: 789278
Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issues 242 and 453.
Change-Id: If18f40539dccc7c2fcdcf8ef9b6fa3efbb3e462f
BUG: 789278
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issue 536
BUG: 789278
Change-Id: I9fe7b324a3ab1f16b4ee4e63818f93ef71d3405a
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 802
Coverity ID: 741
Coverity ID: 808
Change-Id: If1b3196f0d1ba850c349c65f1626e41dcf42b6b6
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issue 87 from [1].
[1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I5c9c67b4dd43ebf1a5a83532cbd06178000da145
BUG: 789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The include path in glusterfs-api.pc looks like
-I${includedir}/glusterfs
However, client code will include the glusterfs headers using
#include <glusterfs/api/glfs.h>
rather than
#include <api/glfs.h>
which makes the "/glusterfs" part entirely unnecessary.
More importantly, on some platforms such as FreeBSD, the header files
for glusterfs will be installed in /usr/local/include, which is *not*
part of the compiler's default include path, so compilation will fail
with something like
fatal error: 'glusterfs/api/glfs.h' file not found
#include <glusterfs/api/glfs.h>
^~~~~~~~~~~~~~~~~~~~~~
The fix is to simply drop the extra "/glusterfs". The same change
is applied to other *.pc files as well, althought I haven't actually
tested those.
A test program (gfapi-load-volfile) and the glfsxmp example
application were using the wrong include paths, so they had to be
fixed as well.
Change-Id: I9a16de47fee7ab9c12d1cb823bbe061a69352670
BUG: 1508947
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to handle these counters in STACK_WIND/UNWIND macro, and
keep the counters as part of xlator_t structure itself, to provide
infra to monitoring.
Updates #137
Change-Id: Ib54d45e2321c2b095dac5810c37e6cdffe1f71b7
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Return values are not used.
Solution: Removed the unused values.
BUG: 789278
Change-Id: Ica2b95bb659dfc7ec5346de0996b9d2fcd340f8d
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : During snapshot remove lvm cleanup was skipped for deactivated
snapshots by assuming that its mount point is not present.
Fix : Do no skip lvm cleanup by checking active mount point.
Change-Id: I856d2d647c75db8b37b7f430277daef6eb7580a8
BUG: 1509254
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
| |
If condition to check error in lseek wrapper sys_lseek.
Change-Id: Ic96ddbb0898146bbfae11acc86818d6604e5eb98
BUG: 789278
Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 286, 287, 288, 289, 290
Issue: Event unterminated_case: The case for value "27" is not
terminated by a 'break' statement.
Added Fall through in comment between switch cases.
Change-Id: I9e3f205c05ac22a85a87423ef690fc18891eaece
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: fop could be NULL.
Solution: Check has been added to verify fop.
BUG: 789278
Change-Id: I7e8d2c1bdd8960c609aa485f180688a95606ebf7
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 259
Coverity ID: 163
Change-Id: I7f7753b870715e1176826fb8dfbe81119750d113
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 261
Coverity ID: 257
Check if local is NULL or not
Change-Id: I570f87f32e1347f891c6a02ee5641fcc5a262a96
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issues 176
[1] : https://download.gluster.org/pub/gluster/glusterfs/static-analysis/
master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I473323db27218ac784b8eae773a1efe911fcfec0
BUG: 789278
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Source could be negative.
Solution: Check has been added to verify the same.
BUG: 789278
Change-Id: I8cca6297327e7923b25949c20ec8d1a711207a76
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This addresses two issues. First is that we currently keep
traversing the timer list even when it's no longer possible for
us to find a timer that's ready to fire. Second is that we sleep
a full second even when the next timer is due sooner.
Change-Id: I178a460d0176dbb45f972c62ee94c6df66d92ca5
Signed-off-by: Jeff Darcy <jdarcy@fb.com>
|
|
|
|
|
|
|
|
| |
Add peer_count check before checking for brick status
Change-Id: I0179ec29729ab6bbc3571eb6ffd631b7b0d15f7c
BUG: 1510415
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: xattr could be NULL.
Solution: Added check to verify the same.
BUG: 789278
Change-Id: Ie013f5655f4621434e5023dd76cef44b976adc68
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issues 115, 191, 274, 462, 463, 508, 588,
612, 614, 618 and 698 from [1].
Also removed the need for some relatively big arrays as local variables
of some functions.
[1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I4f435dbdbedc1b6de067084cce3050b620b28391
BUG: 789278
Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of the conflicts between changes [1] and [2], a new argument
was missed from the caller of rpcsvc_program_register.
[1] : Id0a2da3632516dc1a5560dde2b151b2e5f0be8e5
[2] : I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
Change-Id: If53f755727f1bb23e0b9fb45ebf25fbc80d770a2
BUG: 1510324
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glusterd_op_stage_rebalance
Coverity ID: 297, 298
Issue: Event unterminated_case
Added Fall through in comment.
Change-Id: Ied742e64d9741cc974906921dcca80f0b738b7d6
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* xdr: add gfid to on wire format for fsetattr/rchecksum
* as it is change in on wire XDR format, needed backward
compatible RPC programs.
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 827334
Change-Id: Id0a2da3632516dc1a5560dde2b151b2e5f0be8e5
|
|
|
|
|
|
|
|
|
| |
Check that elapsed time has crossed 10 mins for at least
one rebalance process before displaying the estimates.
Change-Id: Ib357a6f0d0125a178e94ede1e31514fdc6ce3593
BUG: 1479528
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity Id: 803, 804 from [1]
Problem:
USE_AFTER_FREE code at client3_3_lookup: 3371
USE_AFTER_FREE at client3_3_readdir: 5562
Solution:
Postponed iobuf_unref(rsp_iobuf) to a location after
all dereferences of rsp_iobuf
[1]:https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I34f90d72b1248e5526ff1d2b3273cdab619cf4f8
BUG: 789278
Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the fop program is the first in the program list
so that there's minimum amount of time spent to search the
program for the most frequently needed use case.
Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
BUG: 1509647
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 137
Issue: Event dead_error_begin: Execution cannot reach this statement:
"set_graph_errstr(graph, "in...".
Assigned return value of gf_string2bytesize_uint64 () to ret.
Change-Id: Ibef1b1398b233f6442b23282f5ca205c1869a8ee
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For achieving the above, needed below changes too.
* more sanity into how 'frame->op' is assigned.
* infra to have 'stats' as separate section in 'xlator_t' structure
Updates #137
Change-Id: I36679bf9577f3ed00a695b4e7d92870dcb3db8e1
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
On a service request, the actor is searched using an exclusive mutex
lock which is not really necessary since most of the time the actor
list is going to be searched and not modified.
Solution:
Use a read-write lock instead of a mutex lock.
Only modify operations on a service need to be done under a write-lock
which grants exclusive access to the code.
Change-Id: Ia227351b3f794bd8eee70c7a76d833cc716ab113
BUG: 1509644
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue: Event unterminated_case: The case for value "27" is not
terminated by a 'break' statement.
Function: gf_rdma_get_transport_identifiers, gf_rdma_server_get_local_sockaddr
Added Fall through in comment after case AF_INET_SDP.
Change-Id: Ia30d0143a63a63af2b4b1d9b02551b9260444f35
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity Id: 557,175,177,184,711,182,180,181,178 from [1]
Problem:
Unreachable code at client3_3_fgetxattr: 4771
Unreachable code at client3_3_fxattrop: 5087
Unreachable code at client3_3_getxattr: 4890
Unreachable code at client3_3_lookup: 3412
Unreachable code at client3_3_readdir: 5604
Unreachable code at client3_3_readdirp: 5704
Unreachable code at client3_3_xattrop: 4982
NULL checking deref ptr at client3_3_compound: 6045
Unused Value for op_errno at client3_3_getxattr: 4859
Solution:
Removed The Unreachable Dead Code
Removed NULL Check of dereferenced pointer
Removed assignment of op_errno which is overwritten
later
[1]:https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: Ie26a026dd1475c892faf00dd844bf38092e0a780
BUG: 789278
Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue : "trav->dict.dict_len > 4294967295U" is always false regardless of the values
of its operands. .But dict_serialized_length can return < 0 when error happens.
Solution : Remove the comparison which always turns out to be false and add a new
condition for error checking.
Fix : The if-condition was renewed.
Coverity-Id: 108 from [1]
[1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I9956b6ca7c4bf7444f19aadd3b32fceac011a44e
BUG: 789278
Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 245
Check statvfs received as cbk before using it
Coverity ID: 228
Check NULL loc before freeing it.
Change-Id: I1b153ed5e7b81bcf7033bf710808e95908dcfef4
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issues 810, 248, 491, 499, 85, 786, 811, 43, and 44
from the report at [1].
[1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
BUG: 789278
Change-Id: I27ebae2ffb2256b8eef0757d768cc46e5a942e9f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As 3.13 is branched at a point that includes the features
that are changed with this commit, their minimum supported
op-versions should also change to 3.13.
Change-Id: I7ef8eccc13a16f93939c1edbff9508d1e167c5e4
BUG: 1509412
Signed-off-by: ShyamsundarR <srangana@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 237
Problem: In ec_check_status we are trying to deref fop->answer
which could be NULL.
Solution: Check Null condition before using this pointer.
Change-Id: I4f9a73dc2f062ca9c62b4c4baf0a6fcadade88f2
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
| |
A new option is added to allow independent configuration of eager
locking for regular files and non-regular files.
Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60
BUG: 1502610
Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: bd_do_ioctl_zerofill is called and return value is unchecked
Fix: Check the returned value and goto skip if the returned value < 0
which means its an error.
Coverity Id: 67 from [1]
[1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
Change-Id: I398873cefaca03f9cd188fa0f4ccba1378a60ed9
BUG: 789278
Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issue 780, 88, 692, 747, 357
Change-Id: I44b0fe9119853a6d2210507c7247e168d7c3ae0a
BUG: 789278
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 173
Issue: Event dead_error_line: Execution cannot reach this statement:
"fd_ctx_set(fd, this, 1UL);".
Removed if block as "weight == 0U" cannot be true, so if block will
never execute. Also removed weight variable because it is unused.
Change-Id: I4f028df29bfde91167fb15befa99b1fe1892adc6
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Facebook has offered to take up maintaining gNFS going
forward. This change reflects the same in the MAINTAINERS
file.
Change-Id: I58dde9c833a9465d6e563f1355e4725021f5055c
Signed-off-by: ShyamsundarR <srangana@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issues 179, 59.
Problem: control flow won't enter into if block as volname is always
NULL and return value of function synctask_barrier_init is unchecked.
Fix: remove condition checking which is always resulting in false,
and removing if block which is always unreachable. As a result of
removal of condition checking volname became a unused variable,
so remove declaration of volname.
assign return valur of synctask_barrier_init to ret, if it nonzero
value goto out.
Change-Id: I870aeb020034e97a761e9314f7ace7573f7c520c
BUG: 789278
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
| |
Fixes #303
Change-Id: Icdaa804711c43c65b9684f2649437aae1b5c1ed5
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
| |
Updates #303
Change-Id: Id0b9050c93ea87532dc80b4fda650c5663d285bd
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|