| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of querying for the file size and allocating a char array
according to its size, let's just use a fixed size.
Those calls are not really needed, and are either expensive or
cached anyway. Since we do dynamic allocation/free, let's just use
a fixed array instead.
I'll see if there are other sys_stat() calls that are not really
useful and try to eliminate them in separate patches.
Change-Id: I76b40e78a52ab38f613fc0cdef4be60e6253bf20
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The check we had for subnet mask validation wasn't checking in
proper sequence. Corrected the order of calling `inet_pton()` as
the fix.
Fixes: #765
Change-Id: I5d31468eb917aa94cbb85f573b37c60023e9daf3
Signed-off-by: Amar Tumballi <amar@kadalu.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that in posix_do_futimes() we may not need to
unconditionally execute sys_fstat(). Avoid it and use the
existing stbuf atime and mtime if possible.
If not, we execute it.
Change-Id: I0bdd471e5c821fcd28f057c75046c673a212d347
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a small difference when structs are defined static.
Whenever possible, define them as such.
Specifically, before:
text data bss dec hex filename
678 216 0 894 37e ./cli/src/cli-cmd-misc.o
150024 1264 16 151304 24f08 ./cli/src/cli-rpc-ops.o
71980 64 0 72044 1196c ./cli/src/cli-cmd-parser.o
66189 4 16 66209 102a1 ./cli/src/cli-xml-output.o
After:
text data bss dec hex filename
670 216 0 886 376 ./cli/src/cli-cmd-misc.o
149848 1392 16 151256 24ed8 ./cli/src/cli-rpc-ops.o
70346 1320 0 71666 117f2 ./cli/src/cli-cmd-parser.o
66157 4 16 66177 10281 ./cli/src/cli-xml-output.o
Change-Id: I206bd895290595d79fac7b26eee66f4279b50f92
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In glusterfs_handle_attach() we can:
1. Move an INFO level to be executed before the LOCK.
2. Skip the LOCK altogether, if there's no active graph.
I hope it's safe - I've seen that in other functions
you could look at ctx->active outside of a lock.
Change-Id: I3e1ec5b1430d5fddee46883d468ff4f5bd6ca54b
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Remove dead code and declarations
2. Move some dict functions to use more efficient ones.
3. Use more constants, where possible.
4. Align messages - easier to grep the code for them.
5. Aligned structures and adding padding where needed.
Change-Id: Ifc2639afe65a935fab5238d3e4a121b662836d3d
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1193929
Change-Id: Idb98394c51917e9b132aeb32facccd112effe672
Signed-off-by: Amar Tumballi <amarts@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Pass the maximum buffer (PATH_MAX) to posix_handle_path to
avoid the posix_handle_path call again.
Change-Id: I7d18313870218dc028c5f7fc94d6ec85a2bdb332
Updates #761
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skip fetching "skip-CLIOT" unconditionally on every
invocation of volgen_graph_set_options_generic().
Instead, fetch only if the vme->key matches to it.
We calculate the length of vme->key (but we would have
done it anyway in dict_get() later on, so now we can use
dict_getn() instead and re-use that key length) and check
if the lengths match before doing a strcmp() between them.
Lastly, if they match, we actually do the fetch.
Change-Id: I9d9a7104f9e920bf81477128adb5fc87f5d30627
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
| |
* Also make sure to provide log-level in systemd file,
instead of volfile itself.
Updates: bz#1193929
Change-Id: I45a0b0ff3ebb4b3e095b4eed14b7bdf5816926d0
Signed-off-by: Amar Tumballi <amarts@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Add comments to the code to explain what is
being done and why.
Change-Id: I50831d7bd4bb73e75f6cda05fafaeb5a8619baae
Updates: bz#1765421
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit "ccf33e789 - dict.c: remove redundant checks"
removed some NULL checks in certain dict functions. This caused
flooding of fuse mount logs when I/O was done on the mount on a replica
volume:
Message:
W [dict.c:1478:dict_get_with_refn]
(-->/usr/local/lib/libglusterfs.so.0(dict_get_uint32+0x4d)
[0x7ff9121ec963] -->/usr/local/lib/libglusterfs.so.0(dict_get_with_ref+0x90)
[0x7ff9121eb93f] -->/usr/local/lib/libglusterfs.so.0(+0x229be)
[0x7ff9121eb9be] ) 0-dict: dict OR key (glusterfs.lk.lkmode) is NULL [Invalid argument]
Fix:
In the relevant AFR functions, check that dict is not NULL before trying
to perform operations on it.
See bug description for more details.
fixes: bz#1772006
Change-Id: I30c89c0b5d6c80cc86a6047aae70127769412120
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: On RHEL-8 ssl test case is failing when trying to
connect with a peer after using the specific cipher.
Solution: If cipher is not supported by openssl on rhel-8 then
test case is failed.To avoid the issue validate the
cipher before connecting with peer.
Change-Id: I96d92d3602cf7fd40337126c8305a3f8925faf9b
Fixes: bz#1756900
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch floods of dict_log at the time accessing key from dict if
dict is not valid so revert the patch.
This reverts commit ccf33e789f2cbd202e21340f684e2140d844a129.
Change-Id: I81fa3b080a2f784254b519044ad284858583ec66
updates: bz#1193929
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When gsyncd failed with tracebacks during start, it prints
only exception object but not the error string. This patch
adds the error string as well.
Earlier:
"failed with ImportError"
Now:
"failed with ImportError: No module named _io."
fixes: bz#1771895
Change-Id: I0d772a250d4c2010a0c35053aa7b165b71f8434e
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Don't strip out entries with invalid stats in
dht_readdirp_cbk.
Change-Id: I136ab342762d020a3c0f43e51e0090aed2af4120
Fixes: bz#1769754
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
| |
Ref: #84
Updates: bz#1193929
Change-Id: If346dbe421d3e301ae035165b2e01ee0a7176d36
Signed-off-by: Amar Tumballi <amarts@gmail.com>
|
|
|
|
|
|
|
|
|
| |
the JBR and FDL experimental xlators were apparently removed.
Removed additional leftovers scattered in the code.
Change-Id: I78b6fa5fd9044dc48cdcb1fb094b8c267c2d1323
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Geo-rep fails to start on python2 only machine like
centos6. It fails with "ImportError no module named _io".
This patch fixes the same.
fixes: bz#1771577
Change-Id: I8228458a853a230546f9faf29a0e9e0f23b3efec
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
| |
fixes: bz#1771365
Change-Id: Id31687c4704cbbfea1084f912ed0420c7d1cc1ec
Signed-off-by: Xi Jinyu <xijinyu@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
| |
To avoid process "TRANSLATOR INFO" "BARRIER" if graph is not ready,
also see commit ee630e25.
Updates: bz#1769712
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
Change-Id: Ibd446a35962206d3689667cda7e6712d72e4ec2f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last major change to the file happened 2 years 5 months back.
For the better health of the project, and to motivate the active
contributors, and keeping the file up-to-date with who is working
on what, it is critical for us to keep refreshing the file once
every 2 years (at least).
This is one such effort.
Highlighted changes:
* Moving both Jeff and Vijay from Maintainers to 'Special Thanks'
section.
* Moving Amar and Xavi as Maintainers, and Atin as Peer, mainly
looking at the activities (patches, reviews, merges) across
the codebase, and also the contributions in discussions.
* Moving Shyam and Niels out of Peer list highlighting the 6+
months of changed priorities.
* Changed Xavi's contact from Datalab's to Red Hat's
* Changed Amar's contact from Red Hat's to his Personal.
* Removed:
- Block Device (BD)
- Experimental (RIO / JBR)
- Gluster Object
- Gluster Hadoop Plugin
- Nagios Monitoring
- GlusterD2 (and renamed glusterd1 to glusterd)
* Marked 'NFS (gluster-NFS)' component as 'Deprecated / Orphan'
* Moved few people, who stopped major contribution, mainly
because of changing companies, changing projects inside
their own company etc, to 'Special Thanks' section.
* Additions:
- Kotresh added as Peer in Posix
- Raghavendra Gowdappa added as Peer in FUSE Bridge,
Maintainer of readdir-ahead
- Nithya Added as peer in readdir-ahead
- Hari Gowtham as Peer in Quota, Maintainer in Releases
- Yaniv Kaul for xxhash
- Rinku Kothiya added as Peer in releases.
- Sheetal Pamecha and Shwetha Acharya added as Peers in
packaging for Debian/Ubuntu and OpenSUSE.
Updates: bz#1193929
Change-Id: I0d6eccfee4306e26cdbc2b94f43ac493e2c25a61
Signed-off-by: Amar Tumballi <amarts@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure the list of gluster servers in the key
GLUSTERD_BRICK_SERVERS at the time of GETSPEC RPC CALL
and access the value in client side to update volfile
serve list so that client would be able to connect
next volfile server in case of current volfile server
is down
Updates #741
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Change-Id: I23f36ddb92982bb02ffd83937a8bd8a2c97e8104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: When one of the node is down in cluster,
rebalance status is not displaying detailed
information.
Cause: In glusterd_volume_rebalance_use_rsp_dict()
we are aggregating rsp from all the nodes into a
dictionary and sending it to cli for printing. While
assigning a index to keys we are considering all the
peers instead of considering only the peers which are
up. Because of which, index is not reaching till 1.
while parsing the rsp cli unable to find status-1
key in dictionary and going out without printing
any information.
Solution: The simplest fix for this without much
code change is to continue to look for other keys
when status-1 key is not found.
fixes: bz#1764119
Change-Id: I0062839933c9706119eb85416256eade97e976dc
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
| |
Avoid one function call to set the gfid_path in buffer
Change-Id: If9b95801b05c34d262fac9a275492c794d12bf58
Updates #748
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: At the time of cleanup rpc object ssl specific data
is not freeing so it has become a leak.
Solution: To avoid the leak cleanup ssl specific data at the
time of cleanup rpc object
Credits: l17zhou <cynthia.zhou@nokia-sbell.com.cn>
Fixes: bz#1768407
Change-Id: I37f598673ae2d7a33c75f39eb8843ccc6dffaaf0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Both read and write tests required writing first. Either just
writing (write test) or write and then read (read test).
So the code is now unified.
2. There's no reason to read zeros from /dev/zero. Just use a
CALLOC'ed buffer.
I don't think we should read and write zeros, but I did not change
the code yet (I think compression and/or dedup will offset results)
It appears neither read-perf nor write-perf were tested, so added
basic tests for them.
Change-Id: I24b1f249fa0335ed652a8982e99c0687d940230e
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
| |
It removes ~2% of the object size, and did not add meaningful checks
whatsoever or to readability (IMHO).
Change-Id: I54346c2af47dcab13bd8d5c8ad52fc765e6afad4
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Align structures
- gf_iobuf_get_pagesize() will now also return the index, reducing the need
for an additional very similar call.
- Removal of an inefficient loop I've inadvertently added previously.
It was harmless, but just inefficient.
- New pool initialization does not need to be done under lock - no
one can touch that pool yet, so no need to protect it.
Change-Id: I61c50f2f14fa79edc131e515e9615a9928ee2dca
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, the script mangles statedump records
to JSON, which has two benefits:
- easier machine processing
- more friendly with line oriented tools, as one
line will correspond to one record
'--format=memstat' is also available which displays
memory allocation types along the size of their allocations.
Change-Id: I1685d3afcea6009fbcfafb33798f85bcd645c82f
updates: bz#1193929
Signed-off-by: Csaba Henk <csaba@redhat.com>
|
|
|
|
|
|
| |
updates bz#1193929
Signed-off-by: Csaba Henk <csaba@redhat.com>
Change-Id: I12cbe1d87f60fb497654d0e13e12171940867f76
|
|
|
|
|
|
|
|
|
|
|
|
| |
- libgfchangelog is simplified by removing unnecessary API Class
- Merged Agent logic into Worker instead of running Worker and Agent as
two separate processes and maintaining RPC between Worker and Agent.
- Geo-rep command Pause and Resume will continue without any changes.
But Agent functionality also gets paused with that.
Updates: #755
Change-Id: Ie2c00fa7dddf21f180f0649e0aaf084d29023c98
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Minor changes - remove unused functions and unused variables.
Switch dict functions to use sizen() when relevant.
Change-Id: I737ce04a4beaf4df9b1eea25a90100d315627c14
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
posix_xattr_fill() is called from several POSIX functions.
Made minor changes to it and the functions called from it:
1. Dict functions to use known lengths (dict_getn() instead of dict_get(), etc.)
2. Re-ordered some static char[] arrays, to account (hopefully)
to the frequency of the xattrs usage (based on grep in the code...)
3. Before strcmp(), check if the strings lengths match.
4. Removed some dead code.
Hopefully, no functional changes.
Change-Id: I510c0d2785e54ffe0f82c4c449782f2302d63a32
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: One of the prints in the script have been using
%i as the format for printing which doesn't work.
Fix: use %s as the format in the place of %i
Fixes: bz#1764129
Change-Id: I4480ede7bf62906ddedbe5f880a1e89c76946641
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
|
|
|
|
|
|
|
|
| |
Re-aligned a struct and added manual padding to avoid compile time padding.
Change-Id: I8c6fc67a1b635dc7d8e2522bd4fd8587c09f74e9
Updates: bz#1754448
Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
|
|
|
|
|
|
|
|
| |
It's not needed in some cases, where we can pass the key length.
Change-Id: I2e8ed0b69c50a35f5858bae7c1755a0dfd2c77e5
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
ec_getxattr_heal_cbk was called with NULL as second argument
in case heal was failing.
This function was dereferencing "cookie" argument which caused crash.
Solution:
Cookie is changed to carry the value that was supposed to be
stored in fop->data, so even in the case when fop is NULL in error
case, there won't be any NULL dereference.
Thanks to Xavi for the suggestion about the fix.
Change-Id: I0798000d5cadb17c3c2fbfa1baf77033ffc2bb8c
fixes: bz#1729085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As was found out in a different patch, passing a pointer
to a constant string still calculates the size of the pointer
and not the string. This is not catastrophic as the dictionary
is matching not just hashes but key names, but is certainly what
was intended to be done.
Instead, pass explicitly the key lenth.
I've looked for additional cases for such an issue and did not
find them, luckily.
Change-Id: I644a07a77dd541e9cf4886811ab54897e0c9d483
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on rhel8 machine cleanup of shards is not happening properly for a
sharded file with hard-links. It needs to refresh the hard link count
to make it successful
The problem occurs when a sharded file with hard-links gets removed.
When the last link file is removed, all shards need to be cleaned up.
But in the current code structure shard xlator, instead of sending a lookup
to get the link count uses stale cache values of inodectx. Therby removing
the base shard but not the shards present in /.shard directory.
This fix will make sure that it marks in the first unlink's callback that
the inode ctx needs a refresh so that in the next operation, it will be
refreshed by looking up the file on-disk.
fixes: bz#1764110
Change-Id: I81625c7451dabf006c0864d859b1600f3521b648
Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
glusterfind is unable to copy remote output file to local node when a
remove-brick is in progress on the remote node. After copying remote
files, in the --full output listing path, a "sort -u" command is run on
the collected files. However, "sort" exits with an error code if it
finds any file missing.
Solution:
Maintain a map of (pid, output file) when the node commands are started
and remove the mapping for the pid for which the command returns an
error. Use the list of files present in the map for the "sort" command.
Change-Id: Ie6e019037379f4cb163f24b1c65eb382efc2fb3b
fixes: bz#1410439
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I774710273702f1d093601035435989d3caba449c
Signed-off-by: Kotresh HR <khiremat@redhat.com>
fixes: bz#1765542
|
|
|
|
|
|
| |
Fixes: bz#1764418
Change-Id: If14c5ce4527844df5251b4b5a720b617815fb1a1
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements lock healing for gluster-block fencing use case.
If mandatory lock is enabled:
- Add domain lock/unlock to afr_lk fop.
- Maintain a list of locks to be healed in afr_private_t.
- Add lock to the list if afr_lk(F_SETLK or F_SETLKW) was sucessful.
- Remove it from the list during afr_lk(F_UNLCK).
- On child_down, mark lock as needing heal on that child. If lock is
lost on quorum no. of bricks, remove it from the list and mark fd bad.
- For fds marked as bad, fail the subsequent fd based fops.
- On parent up, traverse the list and heal the locks IFF the client is
the lk owner and has quorum. (shd does not heal any locks).
updates: #613
Change-Id: I03c46ceaea30f5e6236d5ec13f71d843d827f1bc
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Afr adds its own xattrs to the req, so it should take a copy of the
dictionary to prevent parent xlator re-using the modified xattr-req
to another subvolume
fixes: bz#1765155
Change-Id: I268e2dbd1b12323135d369e90a22a8bdde2cf7c2
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
| |
To avoid double free
updates: bz#789278
Change-Id: I15ae54ed696295d4cb015668722e77983b062ccb
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
glfsheal program uses unix-socket-based volfile server.
volfile server will be the path to socket in this case.
gf_event expects this to be hostname in all cases. So getaddrinfo
will fail on the unix-socket path, events won't be sent in this case.
Fix:
In case of unix sockets, default to localhost
fixes: bz#1765017
Change-Id: I60d27608792c29d83fb82beb5fde5ef4754bece8
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a rhel-8 machine, we need to have a key length
greater than or eaual to 2048. So changing the values
to 2048 to pass the test.
Credits: Mohit Agrawal <moagrawal@redhat.com>
Change-Id: I0f21db4d737203d0b2e44e7e61f50ae1279795ad
Updates: bz#1756900
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: After Configure the Cgroup(CPU/MEM) limit to a gluster processes
resource(CPU/MEM) limits are not applicable to the gluster
processes.Cgroup limits are not applicable because all threads are
not moved into a newly created cgroup to apply restriction.
Solution: To move a gluster thread to newly created cgroup change the
condition in script
Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c
Fixes: bz#1764208
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
| |
Export of env variable is required for ssh-copy-id command.
fixes: bz#1765426
Change-Id: Icaf7a848cb8f4ae9f887d885a8c5bb71f26633b4
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|