| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
1. Use small arrays, 32 or 64 bytes should suffice.
2. Do not repeat the pattern of
snprintf '%s.%d', prefix, count
over and over.
Change-Id: Ief6de78b766d9a07acb6256fc4830f4f3cfba7c9
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Along with fixing few defect, put the required annotations for the defects which
are marked ignore/false positive/intentional as per the coverity defect sheet.
This should avoid the per component graph showing many defects as open in the
coverity glusterfs web page.
Updates: bz#789278
Change-Id: I19461dc3603a3bd8f88866a1ab3db43d783af8e4
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
| |
updates: bz#1693692
Change-Id: Ib188c5fddea8c762e89ff15aa83b08c35cdb21e1
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
| |
different volume profile sub options are added in the test.
Change-Id: I93100c37f51afc10870e60b91fcd86e7859e734a
updates: bz#1693692
Signed-off-by: rishubhjain <rishubhjain47@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Add testcase to test snapshot creation
while I/O is happening with changelog
enabled.
updates: bz#1193929
Change-Id: Ice4cb596286c583ed7308484d65902007a48396c
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Currently glusterd spawn bulkvoldict in brick_mux
environment while no. of volumes are less than configured
glusterd.vol_count_per_thread
Solution: Correct the logic to spawn bulkvoldict thread
1) Calculate endindex only while total thread is non zero
2) Update end index correctly to pass index for bulkvoldict
thread
Fixes: bz#1704252
Change-Id: I1def847fbdd6a605e7687bfc4e42b706bf0eb70b
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
|
| |
CID 1401087: Null pointer dereferences (REVERSE_INULL)
CID 1401088: Null pointer dereferences (FORWARD_NULL)
Change-Id: I71bf67af80e1b22bcd2eb997b01a1a5ef0b4d80b
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Minor code changes (less variables and if statements)
and use dict_get_strn(), since all options are fixed strings.
Similar changes could be done to GF_OPTION_INIT() as well.
Change-Id: I4a523f67183f4c4852a3d4de5e3cac52df68d3cf
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
| |
updates: bz#1693692
Change-Id: If69702990af273be1f38855ba56b3b89fabff167
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation made it possible to consider that a file was not
fresh even if it was created less than a second ago. This patch fixes
the way in which the delay is computed to ensure that at least one
second has elapsed.
Change-Id: I05f7b99e7e8dd97e31f7ebaaec6c39eecf98b00f
Updates: bz#1193929
Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
|
|
|
|
|
|
| |
Change-Id: Ie0a5c522dfa0123ca45f9decf5015d39b92cb0f3
updates: bz#1693692
Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compound fops are kept on wire as a backward compatibility with
older AFR modules. The AFR module used beyond 4.x releases are
not using compound fops. Hence removing the compound fop in the
protocol code.
Note that, compound-fops was already an 'option' in AFR, and
completely removed since 4.1.x releases.
So, point to note is, with this change, we have 2 ways to upgrade
when clients of 3.x series are present.
i) set 'use-compound-fops' option to 'false' on any volume which
is of replica type. And then upgrade the servers.
ii) Do a two step upgrade. First from current version (which will
already be EOL if it's using compound) to a 4.1..6.x version,
and then an upgrade to 7.x.
Consider the overall code which we are removing for the option
seems quite high, I believe it is worth it.
updates: bz#1693692
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Change-Id: I0a8876d0367a15e1410ec845f251d5d3097ee593
|
|
|
|
|
|
|
|
| |
anymore
updates: bz#1693692
Change-Id: Id5932b11e115ca6da1c2bfff7ae1460787109e06
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: statedump is not capturing information related to glusterd
Solution: statdump is not capturing glusterd info because
trav->dumpops is null in gf_proc_dump_single_xlator_info ()
where trav is glusterd xlator object. trav->dumpops is null
because we missed to define dumpops in xlator_api of glusterd.
defining dumpops in xlator_api of glusterd fixes the issue.
fixes: bz#1703629
Change-Id: If85429ecb1ef580aced8d5b88d09fc15258bfc4c
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some of the fops generated by generator.py, xdata request
was not being wound to the child xlator correctly.
This was happening because when though the logic in
cloudsync-fops-c.py was correct, generator.py was generating
a resultant code that omits this logic.
Made changes in cloudsync-fops-c.py so that correct code is
produced.
Change-Id: I6f25bdb36ede06fd03be32c04087a75639d79150
updates: bz#1642168
Signed-off-by: Anuradha Talur <atalur@commvault.com>
|
|
|
|
|
|
| |
Change-Id: Icbe53e78e9c4f6699c7a26a806ef4b14b39f5019
updates: bz#1642168
Signed-off-by: Anuradha Talur <atalur@commvault.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1400775 - USE_AFTER_FREE
1400742 - Missing Unlock
1400736 - CHECKED_RETURN
1398470 - Missing Unlock
Missing unlock is the tricky one, we have had annotation added, but
coverity still continued to complaint. Added pthread_mutex_unlock to
clean up the lock before destroying it to see if it makes coverity
happy.
Updates: bz#789278
Change-Id: I1d892612a17f805144d96c1b15004a85a1639414
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...during volume create if the cluster op-version is >=GD_OP_VERSION_7_0.
This option itself was introduced in GD_OP_VERSION_4_0_0 via commit 6daa65356.
We missed enabling it by default for new volume creates in that commit.
If we are to do it now safely, we need to use op version
GD_OP_VERSION_7_0 and target it for release-7.
fixes: bz#1702303
Change-Id: I7c6d4a8abe0816367e7069cb5cad01744f04858f
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Validate a session name(during create) for the following:
1. minimum 2 character length.
2. Maximum 256 characters.
3. No special characters apart from underscore, hyphen allowed.
Also, validate volume(expect, while using glusterfind list).
Change-Id: I1b1e64e218f93d0a531d3cf69fc2ce7e2ed11d01
BUG: 1241494
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Geo-rep fails to sync the rename properly if destination exists.
It results in source to be remained on slave causing more number of
files on slave. Also heavy rename workload like logrotate caused
lot of ESTALE errors
Cause:
Geo-rep fails to sync rename if destination exists if creation
of source file also falls into single batch of changelogs being
processed. This is because, after fixing problematic gfids verifying
from master, while re-processing original entries, CREATE also was
re-processed causing more files on slave and rename to be failed.
Solution:
Entries need to be removed from retrial list after fixing
problematic gfids on slave so that it's not re-created again on slave.
Also treat ESTALE as EEXIST so that the error is properly handled
verifying the op on master volume.
Change-Id: I50cf289e06b997adddff0552bf2466d9201dd1f9
fixes: bz#1694820
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Sometimes we find that developers forget to assign lk-owner for an
inodelk/entrylk/lk before writing code to wind these fops. locks
xlator at the moment allows this operation. This leads to multiple
threads in the same client being able to get locks on the inode
because lk-owner is same and transport is same. So isolation
with locks can't be achieved.
Fix:
Disallow locks with lk-owner zero.
fixes bz#1624701
Change-Id: I1aadcfbaaa4d49308f7c819505857e201809b3bc
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
| |
fixes: bz#1702952
Change-Id: I650a3695d702c03dc60660ff197676c6d536a2ea
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change got missed while the initial changes were sent.
Should have been a part of :
https://review.gluster.org/#/c/glusterfs/+/21757/
Gist of the change:
Function that fills in stat info for dirents is
invoked in readdirp in posix when cloudsync populates xdata
request with GF_CS_OBJECT_STATUS.
Change-Id: Ide0c4e80afb74cd2120f74ba934ed40123152d69
updates: bz#1642168
Signed-off-by: Anuradha Talur <atalur@commvault.com>
|
|
|
|
|
|
| |
Change-Id: I56cc09243dab23b3be86a7faac45001dda77181f
updates: bz#1693692
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addresses the following:
* CID 1124776: Resource leaks (RESOURCE_LEAK) - Variable "aa" going out
of scope leaks the storage it points to in glusterd-volgen.c
* Bunch of CHECKED_RETURN defects in the callers of synctask_barrier_init
* CID 1400755: Error handling issues (CHECKED_RETURN) - Calling
"gf_is_service_running" without checking return value in
xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 671 in
glusterd_shdsvc_stop()
* CID 1400745: Memory - illegal accesses (USE_AFTER_FREE) - Dereferencing
freed pointer "volinfo" in /xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 460 in glusterd_shdsvc_start()
* CID 1400742: Program hangs (LOCK) - adding annotation to fix this
false positive
Updates: bz#789278
Change-Id: I02f16e7eeb8c5cf72f7d0b29d00df4f03b3718b3
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently bit-rot feature has an issue with disabling and reenabling it
on the same volume. Consider enabling bit-rot detection which goes on to
crawl and sign all the files present in the volume. Then some files are
modified and the bit-rot daemon goes on to sign the modified files with
the correct signature. Now, disable bit-rot feature. While, signing and
scrubbing are not happening, previous checksums of the files continue to
exist as extended attributes. Now, if some files with checksum xattrs get
modified, they are not signed with new signature as the feature is off.
At this point, if the feature is enabled again, the bit rot daemon will
go and sign those files which does not have any bit-rot specific xattrs
(i.e. those files which were created after bit-rot was disabled). Whereas
the files with bit-rot xattrs wont get signed with proper new checksum.
At this point if scrubber runs, it finds the on disk checksum and the actual
checksum of the file to be different (because the file got modified) and
marks the file as corrupted.
FIX:
The fix is to unconditionally sign the files when the bit-rot daemon
comes up (instead of skipping the files with bit-rot xattrs).
Change-Id: Iadfb47dd39f7e2e77f22d549a4a07a385284f4f5
fixes: bz#1700078
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I385063b757ae71db70f22a2f7c94e6abeedff426
updates: bz#1701337
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to reduce the number of sprintf() and string copies until we finally
log a log line.
Specifically, do not sprintf separately the timestr string and
do not sprintf/strcpy the appmsgstr separately - just stick it with
the header.
Hoping I did not leak anything or changed the log line formatting.
Also, allocate 4K (GF_LOG_BACKTRACE_SIZE) of memory
dynamically for trace output -
only if trace was actually requested (previously, it was
unconditionally)
In addition, some minor code formatting (unrelated to the above).
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Change-Id: Id2ccc85f9213a2b1c6eaa4a2f58ce043eac1824f
|
|
|
|
|
|
|
|
|
|
| |
Part 2: Modify dht_revalidate_cbk to call
dht_selfheal_directory instead of separate calls
to heal attrs and xattrs.
Change-Id: Id41ac6c4220c2c35484812bbfc6157fc3c86b142
updates: bz#1590385
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Entries counter was incremented twice and decremented only
once. And entries count was being used in place of metadata
entries. This patch fixes both of them.
fixes: bz#1512093
Change-Id: I5601a5fe8d25c9d65b72eb529171e7117ebbb67f
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
| |
Added pause and resume test case for geo-rep
fixes: bz#1696077
Change-Id: Ib6fcc1926c3be1263bca1235194f737b895c8333
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Tests added for gluster volume top and profile
with and without xml output
Change-Id: I66aa6390b53ca448014059a3d27dc72e405216d2
updates: bz#1693692
Signed-off-by: rishubhjain <rishubhjain47@gmail.com>
|
|
|
|
|
|
|
| |
updates: bz#1693692
Change-Id: I848e622d7b8562e864f0e208aafdc21d9cb757d3
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The log "posix set mdata failed, No ctime" logged repeatedly
after the fix [1]. Those could be internal fops. This patch
fixes the same.
[1] https://review.gluster.org/22540
fixes: bz#1701457
Change-Id: I42799a90b976982cedb0ca11fa224d555eb05650
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some interdependencies between logging and memory management functions
make it impossible to use the logging framework before initializing
memory subsystem because they both depend on Thread Local Storage
allocated through pthread_key_create() during initialization.
This causes a crash when we try to log something very early in the
initialization phase.
To prevent this, several dynamically allocated TLS structures have
been replaced by static TLS reserved at compile time using '__thread'
keyword. This also reduces the number of error sources, making
initialization simpler.
Updates: bz#1193929
Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When svc attach execute for multiplexing a daemon, we have to keep
a ref on volinfo until it finish the execution. Because, if the attach
is an aysnc call, then a parallel volume delete can lead to free the
volinfo
Change-Id: Ibc02b89557baaed2f63db63d7fb1a7480444ae0d
fixes: bz#1702185
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't Require: rpcbind in glusterd.service when gnfs isn't built
Also add .../gluster-ta-volume.service to .gitignore
See https://github.com/gluster/glusterfs/issues/647
Change-Id: I4d90cf66b12c378c0a9aace89a3a4bbf3784c284
Fixes: #647
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently EC tries to reopen fd's that have been opened while a brick
was down. This is done as part of regular write operations, just after
having acquired the locks, and it's sent as a sub-fop of the main write
fop.
There were two problems:
1. The reopen was attempted on all UP bricks, even if a previous lock
didn't succeed. This is incorrect because most probably the open will
fail.
2. If reopen is sent and fails, the error is propagated to the main
operation, causing it to fail when it shouldn't.
To fix this, we only attempt reopens on bricks where the current fop
owns a lock, and we prevent any error to be propagated to the main
fop.
To implement this behaviour an argument used to indicate the minimum
number of required answers has overloaded to also include some flags. To
make the change consistent, it has been necessary to rename the
argument, which means that a lot of files have been changed. However
there are no functional changes.
This change has also uncovered a problem in discard code, which didn't
correctely process requests of small sizes because no real discard fop
was being processed, only a write of 0's on some region. In this case
some fields of the fop remained uninitialized or with incorrect values.
To fix this, a new function has been created to simulate success on a
fop and it's used in the discard case.
Thanks to Pranith for providing a test script that has also detected an
issue in this patch. This patch includes a small modification of this
script to force data to be written into bricks before stopping them.
Change-Id: If272343873369186c2fb8f43c1d9c52c3ea304ec
Fixes: bz#1699866
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently GF_ASSERT is done under mem_accounting lock at some places.
On a GF_ASSERT failure, gf_msg_callingfn is called which calls gf_malloc
internally and it takes the same mem_accounting lock leading to deadlock.
This is a temporary fix to avoid any hang issue in master.
https://review.gluster.org/#/c/glusterfs/+/22589/ is being worked on
in the mean while so that GF_ASSERT can be used under mem_accounting
lock.
Change-Id: I6d67f23979e7edd2695bdc6aab2997dae4a4060a
updates: bz#1700865
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sdfs is supposed to serialize entry fops by doing entrylk, but all the locks
are being done with all-zero lk-owner. In essence sdfs doesn't achieve its goal
of mutual exclusion when conflicting operations are executed by same client
because two locks on same entry with same all-zero-owner will get locks.
Fixed this up by assigning lk-owner before taking entrylk
updates bz#1624701
Change-Id: Ifabfc998c9f1724915d38e90ed8287e05797d769
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1624701
Change-Id: I7152c28ad85925abccdcc4cd6de8cb2a2b847a51
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before calling strtok_r a check for null pointer is necessary to avoid
dereferencing of null pointer
CID:1398617
CID:1274074
Change-Id: I34956c6e04af1faa22d550e6474909ecd36f5d6c
updates: bz#789278
Signed-off-by: rishubhjain <rishubhjain47@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a translator stops, memory accounting for that translator is not
destroyed (because there could remain memory allocated that references
it), but mutexes that coordinate updates of memory accounting were
destroyed. This caused incorrect memory accounting and even crashes in
debug mode.
This patch also fixes some other things:
* Reduce the number of atomic operations needed to manage memory
accounting.
* Correctly account memory when realloc() is used.
* Merge two critical sections into one.
* Cleaned the code a bit.
Change-Id: Id5eaee7338729b9bc52c931815ca3ff1e5a7dcc8
Updates: bz#1659334
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the following NULL dereferences identified by Coverity:
* CID 1398619
* CID 1398621
* CID 1398623
* CID 1398625
* CID 1398626
Change-Id: Id6af0d7cba0bb3346005376bc27180e8476255a4
Updates: bz#789278
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
| |
Fixes: bz#1542072
Change-Id: Ia5fa1df81bbaec3a84653d136a331c76b457f42c
Signed-off-by: Milan Zink <zeten30@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Commit efbf8ab wasn't handling all the scenarios of toggling ctime
option correctly and more over a ! had completely tossed up the logic.
Fixes: bz#1697907
Change-Id: If12e2f69045e59878992ee2cd0518cc0eabcce0d
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3883887427a7f2dc458a9773e05f7c8ce8e62301 as it has
broken sdfs-sanity.t.
Updates: bz#1624701
Change-Id: Icb2b0d6bfcce4d556f1cd0f11695c03ffc138736
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When bit-rot feature is disabled, the signer thread from the bit-rot-stub
xlator (the thread which performs the setxattr of the signature on to the
disk) is cancelled. But, if the cancelled signer thread had already held
the mutex (&priv->lock) which it uses to monitor the queue of files to
be signed, then the mutex is never released. This creates problems in
future when the feature is enabled again. Both the new instance of the
signer thread and the regular thread which enqueues the files to be
signed will be blocked on this mutex.
So, as part of cancelling the signer thread, unlock the mutex associated
with it as well using pthread_cleanup_push and pthread_cleanup_pop.
Change-Id: Ib761910caed90b268e69794ddeb108165487af40
updates: bz#1700078
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
|
|
| |
It was hardcoded and with a wrong value.
Fixes: bz#1699339
Change-Id: Ibabe2424a0d35e172a9259bd8849c9bb7cebff1e
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
| |
updates: bz#1699866
Change-Id: I7ccd1fc5fc134eeb6d443c755962a20819320d48
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|