| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Setting frame->local = local immediately after mem_get0.
In this case, SVC_STACK_UNWIND will take of freeing the memory.
Change-Id: If6433be0e14ed0f4ab4127f70a8875f81bb3e6b8
updates: bz#789278
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
|
| |
We can use memcpy() instead of strncpy() as both are strings that are
37 bytes (GF_UUID_BUF_SIZE) long.
fixes: CID#1405844
Change-Id: Ic74e8817cd790c13e29f3e6be8f18f2bfff77115
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When gNFS is disabled in build time, we have to ensure
taht the .stop(), .start() and other functions of the nfs_svc
are not called, otherwise we'd crash.
In addition, #ifdef more code that is gNFS related.
updates: bz#1793995
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Change-Id: I5081f1670c04ca306aeaab7208829b0f2f149a42
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: At the time of coming up one server node(1x3) after reboot
client is unmounted.The client is unmounted because a client
is getting AUTH_FAILED event and client call fini for the graph.The
client is getting AUTH_FAILED because brick is not attached with a
graph at that moment
Solution: To avoid the unmounting the client graph throw ENOENT error
from server in case if brick is not attached with server at
the time of authenticate clients.
Credits: Xavi Hernandez <xhernandez@redhat.com>
Change-Id: Ie6fbd73cbcf23a35d8db8841b3b6036e87682f5e
Fixes: bz#1793852
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The macro already fetches from the dictionary the gfid-req variable.
Instead of throwing it away, keep it and in 2 cases,
re-use it later.
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Change-Id: Id6d42535132805ab69e7e3b802c140b90f2f8958
|
|
|
|
|
|
|
|
|
|
| |
xlators/features/quota/src/quota.c quota_log_usage function.
The quota_log_helper() function applies memory
for path through inode_path(), should be GF_FREE().
fixes: bz#1792707
Change-Id: I33143bdf272bf10837061df4a1b7b2fc146162d5
Signed-off-by: Xi Jinyu <xijinyu@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This parameter may have been used in the past, but is no longer
needed. Removing it and the few locations it was actually referenced.
This allows to remove an extra memdup as well, that was not needed
in the 1st place in server_setvolume() and unserialize_rsp_direntp()
functions.
A followup separate patch will remove extra_stdfree parmeter
from the dictionary structure.
Change-Id: Ica0ff0a330672373aaa60e808b7e76ec489a0fe3
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
| |
updates: bz#789278
Change-Id: I652d8d4428cf6ce61b712a66d309e78030a5f911
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
| |
It has been a while since we removed lock healing logic from protocol
client. So no need to mention that we healed locks after fd reopen.
Change-Id: I24bd3f9e9f2942e306714b2cb83c229ae57c60ae
Fixes: bz#1193929
Signed-off-by: Anoop C S <anoopcs@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We already have the length of the name, or when we munge it,
we can return the length of it instead of strlen() again.
Also, reduce a bit the code under the lock.
Change-Id: I0141b0725ed1a4134d8d9f81ed1187b551b038b5
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many cases, we were freely allocating long keys with no need.
Smaller char arrays are just fine almost anywhere, so just went ahead
and looked where they we can use smaller ones.
In some cases, annotated the functions as static and the prefixes
passed as const as it was easier to read and understand.
Where relevant, converted the dict functions to use known key length.
Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
| |
convert all gf_msg() to gf_smsg()
Change-Id: I2303aeaa0775b663e2ea5741166a457cd747d2ac
Updates: #657
Signed-off-by: yatipadia <ypadia@redhat.com>
Signed-off-by: yatip <ypadia@redhat.com>
|
|
|
|
|
|
|
|
| |
convert gf_msg() to gf_smsg()
Change-Id: Id03b6a2f6817101650ea6eeffb10e91c09e6ef80
Updates: #657
Signed-off-by: yatipadia <ypadia@redhat.com>
|
|
|
|
|
|
|
|
| |
Do not include ftw.h twice.
Change-Id: Id9e8d1813aafd890940adcd6883d90fa1b4beaf9
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Updates: bz#1193929
|
|
|
|
|
|
|
|
|
| |
Rely on configure-time HAVE_SET_FSID instead of predefined
linux and __GLIBC__, in the same way as fusermount.c does.
Change-Id: If81f821014bbf3fdc43950670e316b4d178b4cac
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Updates: bz#1193929
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code was not ifdef'ed properly when gNFS was not enabled.
Strangely, I could not reproduce the failure on my system (Fedora 31),
but it was reproduced elsehwere and the fix was verified to correct it.
The failure:
gluster volume create testvol replica 3 127.0.0.2:/tests/brick{1..3} force
gluster v set testvol write-behind off
grep -rne write-behind /var/lib/glusterd/vols/testvol/trusted-testvol.tcp-fuse.vol
The last grep was supposed to come out empty.
The issue was that perfxl_option_handler may not have been called when it should
have been.
Change-Id: Ie9f8ec87dabeef6624527c2266ddf9af01ca7373
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
| |
initialize both src and dst if they were not initialized already.
fixes: CID#1397018
Change-Id: Ic91954423953e8bf24eaa11fc2798c554f304d28
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using inode_ctx_get() or inode_ctx_set(), a 'uint64_t *' is expected.
In many cases, the value to retrieve or store is a pointer, which will be
of smaller size in some architectures (for example 32-bits). In this case,
directly passing the address of the pointer casted to an 'uint64_t *' is
wrong and can cause memory corruption.
Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Fixes: bz#1785611
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
FUSE uses failures of communicating with /dev/fuse with various
errnos to indicate in-kernel conditions to userspace. Some of these
shouldn't be handled as an application error. Also the standard
POSIX errno description should not be shown as they are misleading
in this context.
Solution:
When writing to the fuse device, the caller of the respective
convenience routine can mask those errnos which don't qualify to
be an error for the application in that context, so then those
shall be reported at DEBUG level.
The possible non-standard errnos are reported with their
POSIX name instead of their description to avoid confusion.
(Eg. for ENOENT we don't log "no such file or directory",
we log indeed literal "ENOENT".)
Change-Id: I510158843e4b1d482bdc496c2e97b1860dc1ba93
updates: bz#1193929
Signed-off-by: Csaba Henk <csaba@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the structs present inside xlators/features/leases have been
re-aligned into memory efficient way. Changes are made in such a way
that every members are 8 byte aligned and no padding is left out in
the 8 byte line. Manual padding has been added to remove compile time
padding (which happens at the end of the struct). This manual padding
is for development and debugging benefits. It lets to use -Wpadded
option and raise warnings from the remaining structs where compile time
padding happens.
Change-Id: I083d2de80e24f363c97adadcba64825e213050fc
Updates: bz#1754448
Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This volume option was not made avaialble to `gluster volume set` CLI.
Reported-by: epolakis(https://github.com/kinsu) in
https://github.com/gluster/glusterfs/issues/781
fixes: bz#1787554
Change-Id: I7141bdd4e53ee99e22b354edde8d023bfc0b2cd7
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Currently enabling run-with-valgrind will cause the gnfs and quota to
fail to start. The phenomenon is as follows.
------------------------------------------------------------------------------
NFS Server on localhost 2049 0 N 48406
Quota Daemon on localhost N/A N/A N 48428
------------------------------------------------------------------------------
Solution: The cause of the above phenomenon is that the log path of valgrind is
set incorrectly. Gnfs and quota can start with valgrind normally after correcting
the log path.
Updates: #788
Change-Id: Ib91408c08522ff66afff908fbff3fce4b93ea770
Signed-off-by: He Min <hemin@cmss.chinamobile.com>
|
|
|
|
|
|
|
| |
convert gf_msg() to gf_smsg()
Change-Id: I35c6f62c346a75ecb22cd3a4346ad4dc48f09a91
Updates: #657
|
|
|
|
|
|
|
|
|
| |
Convert all gf_msg() to gf_smsg()
Updates: #657
Change-Id: I72215b2518df78174dda8a7bc8de6f21fe1ba10f
Signed-off-by: yatipadia <ypadia@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another location where instead of 2 sys calls we strive to get the
xattr in a single call, by guesstimating the required size
And avoid (or try to) not to first read the xattr len,
then another call to actually fetch. Instead, use a sane size
(256 bytes - worth checking if it makes sense or by default
use a larger size), and see if we can fetch it.
If we fail, we'll read the size and re-fetch.
Such changes are needed elsewhere too (see
https://github.com/gluster/glusterfs/issues/720 )
Change-Id: I466cea9d8b12fc45f6b37d202b1294ca28cd1fdd
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
| |
To avoid memory leak.
Change-Id: Ib802be310fe989223afd623d3e5a9c9016d4fd38
updates: bz#789278
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
|
| |
1. Move them to posix-entry-ops.c and make them static.
2. Remove useless 'val' parameter allocation and snprintf() in
posix_set_gfid2path_xattr(), as it was identical to pgfid_bname.
Change-Id: I41f3946c6c42aee9d7cf1150e21b442438fbcce2
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Perform AFR_COUNT() once, in afr_has_quorum() and pass the result
to afr_lookup_has_quorum()
2. Simplify afr_lookup_has_quorum() - pass less parameters to it.
(Via the change in item 1 above).
3. Make afr_is_add_replica_mount_lookup_on_root() static function.
4. Remove dead code - afr_decide_heal_info() which was not used.
Change-Id: If9168cd01e22788a0e60b91e315787d2aa60e97b
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As a follow up to https://review.gluster.org/#/c/glusterfs/+/23799/
When compiling without gNFS, there were some 'unused' warnings by
the compiler. This patch fixes them.
Change-Id: I621562261f53950e821a450e0e7da304d00ae557
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: default option itransport.address-family is disappered
in volume info output after a volume reset.
Cause: with 3.8.0 onwards volume option transport.address-family
has default value, any volume which is created will have this
option set. So, volume info will show this in its output. But,
with reset volume, this option is not handled.
Solution: In glusterd_enable_default_options(), we should add this
option along with other default options. This function is called
by glusterd_options_reset() with volume reset command.
fixes: bz#1786478
Change-Id: I58f7aa24cf01f308c4efe6cae748cc3bc8b99b1d
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the following:
posix-inode-fd-ops.c: In function ‘posix_common_removexattr’:
../../../../libglusterfs/src/glusterfs/logging.h:231:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
231 | _gf_msg(dom, __FILE__, __FUNCTION__, __LINE__, level, errnum, 0, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232 | msgid, ##fmt); \
| ~~~~~~~~~~~~~
posix-inode-fd-ops.c:4401:13: note: in expansion of macro ‘gf_msg’
4401 | gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_FDSTAT_FAILED,
| ^~~~~~
posix-inode-fd-ops.c:4402:47: note: format string is defined here
4402 | "fdstat operaton failed on %s", real_path);
| ^~
Change-Id: I3f2278d3a05a569dde257d66f44a8655491b4013
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Currently changelog is written in one directory, which over
time, results in very large changelog files.
Solution: Seperate directory under the changelogs directory
is created on daily basis following the format year/month/day.
Updates: #154
Change-Id: I1cdabe33728a0ba1f298c8908bd8c323b1871bda
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sometime fops like posix_writev, posix_fallocate, posix_zerofile
failed and throw error ENOSPC if storage.reserve threshold limit
has reached even fops is overwriting the data
Solution: Retry the fops in case of overwrite if diskspace check
is failed
Credits: kinsu <vpolakis@gmail.com>
Change-Id: I987d73bcf47ed1bb27878df40c39751296e95fe8
Updates: #745
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove TIER_LINKFILE_GFID related code from posix
Tier xlator was removed, but there are some code related to it scattered
around in DHT and Posix xlators. Remove some of it.
Change-Id: I3a878b31ed4a045ed419f936aa1d567ded1a273f
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code like:
f(..., uuid_utoa(x), uuid_utoa(y));
is not valid (causes undefined behaviour) because uuid_utoa()
uses the only static thread-local buffer which will be overwritten
by the subsequent call. All such cases should be converted to use
uuid_utoa_r() with explicitly specified buffer.
Change-Id: I5e72bab806d96a9dd1707c28ed69ca033b9c8d6c
Updates: bz#1193929
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
|
|
|
|
|
|
|
|
| |
convert gf_msg() to gf_smsg()
Change-Id: I3072ba4305b720bea053688d140660d7d5c2d267
Updates: #657
Signed-off-by: yatipadia <ypadia@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This causes mdc_xattr_list_populate() NOT to add "user.swift.metadata"
as an xattr in the list of attrs we look at in some paths of the code.
This is documented @
https://github.com/gluster/glusterfs/issues/775
Change-Id: Ie3d676c74a2f333beeacc302e253efe9f9942d1a
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
| |
convert gf_msg() into gf_smsg()
Change-Id: I8f5b7bbb9caa78902b06f67257502b67adab7405
Updates: #657
Signed-off-by: yatipadia <ypadia@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we are not compiling gNFS (--enable-gnfs is not given in the
./configure script params), there is little point in compiling code
that is related to it.
This patch tries to eliminate it.
My hope (and it's not clear from the code ) is that I did not break
the NFS Ganesha support as well.
Other than that, tried to compile with and without anad it looks sane.
Change-Id: I8d6c98066b9fceab4ec10fc6f5e81ab069e853bd
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
In glusterd_proc_stop(), after killing the pid
we should remove the pidfile.
fixes: bz#1784375
Change-Id: Ib6367aed590932c884b0f6f892fc40542aa19686
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Methods that should have been static were defined as global, and the
other way around.
This patch fixes the issue in order to enforce encapsulation.
updates: bz#1776757
Change-Id: I3eb5781849c5e597c1dd347e03f356c00db62a39
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the code (and only place) that is using this macro is
in dht_inode_ctx_time_update() where it is called 3 times in a row,
which is essentially 3 cycles of LOCK/UNLOCK on the same lock.
Instead, extract the LOCK()/UNLOCK() part of the macro
and wrap those calls with it.
Change-Id: I6312b985e3d97517857b55f342440accc4063db6
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes in locks xlator:
Added support for per-domain inodelk count requests.
Caller needs to set GLUSTERFS_MULTIPLE_DOM_LK_CNT_REQUESTS key in the
dict and then set each key with name
'GLUSTERFS_INODELK_DOM_PREFIX:<domain name>'.
In the response dict, the xlator will send the per domain count as
values for each of these keys.
Changes in AFR:
Replaced afr_selfheal_locked_inspect() with afr_lockless_inspect(). Logic has
been added to make the latter behave same as the former, thus not
breaking the current heal info output behaviour.
fixes: bz#1774011
Change-Id: Ie9e83c162aa77f44a39c2ba7115de558120ada4d
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
| |
updates: bz#1193929
Change-Id: I50f75f730ea6970e99347fcee661ce9dc8477725
Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
|
|
|
|
|
|
|
|
|
|
| |
As a follow up on https://review.gluster.org/#/c/glusterfs/+/23749/,
adding error logging for the entire method.
In addition, converted logging to structured logging in the method.
Fixes: bz#1778457
Change-Id: I1f412159e6849d6f6ddbde53ec4a85ad709bbdf4
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
|
|
|
|
|
|
|
|
|
| |
A negative value was being passed where it shouldn't have been passed
to. Modified code so only a positive value will be passed.
fixes: CID#1274209
Change-Id: I5452ddded77664fdd8b5c975af6bc77806a7ffb1
updates: bz#789278
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
When touch is used to create a file, the ctime is not matching
atime and mtime which ideally should match. There is a difference
in nano seconds.
Cause:
When touch is used modify atime or mtime to current time (UTIME_NOW),
the current time is taken from kernel. The ctime gets updated to current
time when atime or mtime is updated. But the current time to update
ctime is taken from utime xlator. Hence the difference in nano seconds.
Fix:
When utimesat uses UTIME_NOW, use the current time from kernel.
fixes: bz#1773530
Change-Id: I9ccfa47dcd39df23396852b4216f1773c49250ce
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
| |
Change-Id: Ieb7531af19ae89fb8a8387e81663c7f157b10c02
Updates: bz#1765421
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Glusterfs client process has memory leak if create serveral files under one folder, and delete the folder.
According to statedump, the ref counts of readdir-ahead is bigger than zero in the inode table. Readdir-ahead get parent inode by inode_parent in rda_mark_inode_dirty when each rda_writev_cbk,the inode ref count of parent folder will be increased in inode_parent, but readdir-ahead do not unref it later.
The correction is unref the parent inode at the end of rda_mark_inode_dirty
Fixes: bz#1779055
Signed-off-by: HuangShujun <549702281@qq.com>
Change-Id: Iee68ab1089cbc2fbc4185b93720fb1f66ee89524
|
|
|
|
|
|
|
|
|
| |
fixes: bz#1728554
credits: Patrick Matthäi <pmatthaei@debian.org>
Change-Id: Id08dabf54a529dbb86666b544b1f0859aab75aac
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|