summaryrefslogtreecommitdiffstats
path: root/xlators/features
Commit message (Collapse)AuthorAgeFilesLines
* bitrot/stub: Fix memory leak gf_br_stub_mt_version_tMohammed Rafi KC2020-09-302-31/+42
| | | | | | | | | | The data type gf_br_stub_mt_version_t is leaking because the data type has been added to the dict as static type and the memory is not free'd from anywhere else Change-Id: Ib10134f41f45a39be849af1708b1960c77fb62fd Fixes: #1427 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* locks: null dereferencenik-redhat2020-09-291-0/+3
| | | | | | | | | | | Added a null check before executing the strtok_r() to avoid null dereference in case of strdup() failure. CID: 1407938 Updates: #1060 Change-Id: Iec6e72ae8cb54f6d0a287615c43756325b2026ec Signed-off-by: nik-redhat <nladha@redhat.com>
* xlators: prefer libglusterfs time APIDmitry Antipov2020-09-071-1/+1
| | | | | | | | | | Prefer timespec_now_realtime() and gf_time() over clock_gettime() and time(), use gf_tvdiff() and gf_tsdiff() where appropriate, drop unused time_elapsed() and leftovers in 'struct posix_private'. Change-Id: Ie1f0229df5b03d0862193ce2b7fb91d27b0981b6 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* core: Avoid dict OR key is NULL message in brick logsMohit Agrawal2020-09-041-1/+1
| | | | | | | | | | | | | | Problem: At the time of mount a volume server_first_lookup call's syncop_lookup with a NULL xattr so index_lookup is throwing a message at the time of fetching "link-count" from a dictionary Solution: Call dict_get_str_sizen instead of calling dict_get_str to avoid a warning message Fixes: #1464 Change-Id: I2b1ee3123ab817fa09f3abe39998c0d66ac0b824 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* features/quota: simplify and cleanup internal time managementDmitry Antipov2020-08-242-45/+19
| | | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Simplify and convert quota_timeout() to static as well. Change-Id: I0e042cdd759dd9fca25fcf8bc780e5fc4934f7e1 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* features/changelog: simplify and cleanup internal time managementDmitry Antipov2020-08-224-83/+29
| | | | | | | | | | Drop extra point of failure in changelog_fill_rollover_data(), changelog_init() and reconfigure(), consistently use time_t and gf_time() where appropriate, adjust all related users. Change-Id: Id8e4236e96789cd74da5fdc3da05f0c1df98a62b Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* metadisp: new translator for data and metadata separationSheena Artrip2020-08-2117-1/+1157
| | | | | | | | | | | | | | | | | | | Summary: feature/metadisp is an xlator for performing "metadata dispersal" across multiple children. it does this by flattening the complex POSIX paths into /$GFID style paths, then forwarding the metadata operations to its first child and forwarding the data operations to its second child. The purpose of this xlator is to allow separation of data and metadata, in cases where metadata might be stored in another format (embedded kv?), on another disk (ssd), on another host (dht2). Change-Id: I392c8bd0c867a3237d144aea327323f700a2728d Updates: #816 Signed-Off-By: Sheena Artrip <sheenobu@fb.com> Tested-By: Amar Tumballi <amar@kadalu.io>
* features/locks: simplify and cleanup internal time managementDmitry Antipov2020-08-215-43/+26
| | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Change-Id: Ib2c81376c093613124bdbed184516077cbe80dac Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* features/bit-rot: simplify and cleanup internal time managementDmitry Antipov2020-08-213-49/+35
| | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Adjust comments and style as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: I2e5900ccb5da2478656d80e5f570487e3ba70966 Updates: #1002
* features/shard: optimization over shard lookup in case of preallocVinayakswami Hariharmath2020-08-201-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Assume that we are preallocating a VM of size 1TB with a shard block size of 64MB then there will be ~16k shards. This creation happens in 2 steps shard_fallocate() path i.e 1. lookup for the shards if any already present and 2. mknod over those shards do not exist. But in case of fresh creation, we dont have to lookup for all shards which are not present as the the file size will be 0. Through this, we can save lookup on all shards which are not present. This optimization is quite useful in the case of preallocating big vm. Also if the file is already present and the call is to extend it to bigger size then we need not to lookup for non- existent shards. Just lookup preexisting shards, populate the inodes and issue mknod on extended size. Fixes: #1425 Change-Id: I60036fe8302c696e0ca80ff11ab0ef5bcdbd7880 Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
* libglusterfs: add library wrapper for time()Dmitry Antipov2020-08-176-16/+19
| | | | | | | | | Add thin convenient library wrapper gf_time(), adjust related users and comments as well. Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* features/shard: Convert shard block indices to uint64Krutika Dhananjay2020-07-082-7/+10
| | | | | | | | | | | | | | This patch fixes a crash in FOPs that operate on really large sharded files where number of participant shards could sometimes exceed signed int32 max. The patch also adds GF_ASSERTs to ensure that number of participating shards is always greater than 0 for files that do have more than one shard. Change-Id: I354de58796f350eb1aa42fcdf8092ca2e69ccbb6 Fixes: #1348 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* build: Pass $(LIB_DL) using prog_LDADD or lib_LIBADDAnoop C S2020-07-021-2/+2
| | | | | | | | | | | | | | | | | | "Program and Library Variables" section from Automake manual suggests the following: . . . _LDADD and _LIBADD are inappropriate for passing program-specific linker flags (except for -l, -L, -dlopen and -dlpreopen). Use the _LDFLAGS variable for this purpose. . . . Therefore it is reasonable to move $(LIB_DL) additon from _LDFLAGS to _LDADD and _LIBADD variables for program and library respectively. Change-Id: Id8b4734c207ab28a08bcce683d316cdc7acb0bcd Updates: #1000 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* features/locks: posixlk-clear-lock should set error as EINTRPranith Kumar K2020-06-181-2/+2
| | | | | | | | | | | | | | Problem: fuse on receiving interrupt for setlk sends clear-lock "fop" using virtual-getxattr. At the moment blocked locks which are cleared return EAGAIN errno as opposed to EINTR errno Fix: Return EINTR errno. Updates: #1310 Change-Id: I47de0fcaec370b267f2f5f89deeb37e1b9c0ee9b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* locks: prevent deletion of locked entriesXavi Hernandez2020-06-176-95/+623
| | | | | | | | | | | | | | To keep consistency inside transactions started by locking an entry or an inode, this change delays the removal of entries that are currently locked by one or more clients. Once all locks are released, the removal is processed. It has also been improved the detection of stale inodes in the locking code of EC. Fixes: #990 Change-Id: Ic8ba23d9480f80c7f74e7a310bf8a15922320fd5 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* Indicate timezone offsets in timestampsCsaba Henk2020-06-153-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logs and other output carrying timestamps will have now timezone offsets indicated, eg.: [2020-03-12 07:01:05.584482 +0000] I [MSGID: 106143] [glusterd-pmap.c:388:pmap_registry_remove] 0-pmap: removing brick (null) on port 49153 To this end, - gf_time_fmt() now inserts timezone offset via %z strftime(3) template. - A new utility function has been added, gf_time_fmt_tv(), that takes a struct timeval pointer (*tv) instead of a time_t value to specify the time. If tv->tv_usec is negative, gf_time_fmt_tv(... tv ...) is equivalent to gf_time_fmt(... tv->tv_sec ...) Otherwise it also inserts tv->tv_usec to the formatted string. - Building timestamps of usec precision has been converted to gf_time_fmt_tv, which is necessary because the method of appending a period and the usec value to the end of the timestamp does not work if the timestamp has zone offset, but it's also beneficial in terms of eliminating repetition. - The buffer passed to gf_time_fmt/gf_time_fmt_tv has been unified to be of GF_TIMESTR_SIZE size (256). We need slightly larger buffer space to accommodate the zone offset and it's preferable to use a buffer which is undisputedly large enough. This change does *not* do the following: - Retaining a method of timestamp creation without timezone offset. As to my understanding we don't need such backward compatibility as the code just emits timestamps to logs and other diagnostic texts, and doesn't do any later processing on them that would rely on their format. An exception to this, ie. a case where timestamp is built for internal use, is graph.c:fill_uuid(). As far as I can see, what matters in that case is the uniqueness of the produced string, not the format. - Implementing a single-token (space free) timestamp format. While some timestamp formats used to be single-token, now all of them will include a space preceding the offset indicator. Again, I did not see a use case where this could be significant in terms of representation. - Moving the codebase to a single unified timestamp format and dropping the fmt argument of gf_time_fmt/gf_time_fmt_tv. While the gf_timefmt_FT format is almost ubiquitous, there are a few cases where different formats are used. I'm not convinced there is any reason to not use gf_timefmt_FT in those cases too, but I did not want to make a decision in this regard. Change-Id: I0af73ab5d490cca7ed8d07a2ce7ac22a6df2920a Updates: #837 Signed-off-by: Csaba Henk <csaba@redhat.com>
* features/shard: Use fd lookup post file openVinayakswami Hariharmath2020-06-111-43/+76
| | | | | | | | | | | | | | | Issue: When a process has the open fd and the same file is unlinked in middle of the operations, then file based lookup fails with ENOENT or stale file Solution: When the file already open and fd is available, use fstat to get the file attributes Change-Id: I0e83aee9f11b616dcfe13769ebfcda6742e4e0f4 Fixes: #1281 Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
* features/shard: Aggregate file size, block-count before unwinding removexattrKrutika Dhananjay2020-05-262-70/+196
| | | | | | | | | | | | | Posix translator returns pre and postbufs in the dict in {F}REMOVEXATTR fops. These iatts are further cached at layers like md-cache. Shard translator, in its current state, simply returns these values without updating the aggregated file size and block-count. This patch fixes this problem. Change-Id: I4b2dd41ede472c5829af80a67401ec5a6376d872 Fixes: #1243 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* afr/changelog: fix NULL dereferences and error handlingAshish Pandey2020-05-261-9/+9
| | | | | | | | | This patch includes the following CID from Coverity Scan: *1419116 *1420206 Change-Id: Id92fd6a78c8a00726a61aa4697b5c126ced8ed4d Updates: #1202
* features/shard: Aggregate size, block-count in iatt before unwinding setxattrKrutika Dhananjay2020-05-211-17/+191
| | | | | | | | | | | | | Posix translator returns pre and postbufs in the dict in {F}SETXATTR fops. These iatts are further cached at layers like md-cache. Shard translator, in its current state, simply returns these values without updating the aggregated file size and block-count. This patch fixes this problem. Change-Id: I4da0eceb4235b91546df79270bcc0af8cd64e9ea Fixes: #1243 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* features/bit-rot: invalid snprintf() buffer sizeDmitry Antipov2020-05-181-2/+2
| | | | | | | | | | | | | | | | Found with clang-10 -Wfortify-source: bit-rot-scrub.c:1802:15: warning: 'snprintf' size argument is too large; destination buffer has size 32, but size argument is 4096 [-Wfortify-source] len = snprintf(key, PATH_MAX, "quarantine-%d", j); ^ bit-rot-scrub.c:1813:9: warning: 'snprintf' size argument is too large; destination buffer has size 32, but size argument is 4096 [-Wfortify-source] snprintf(main_key, PATH_MAX, "quarantine-%d", tmp_count); Change-Id: I9b9c09ef2223ed181d81215154345de976b82f13 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1221
* core, cli, quota: cleanup malloc debugging and statsDmitry Antipov2020-05-041-6/+0
| | | | | | | | | | | | 1. Since mcheck()/mprobe() etc. features are no longer used, mcheck.h isn't required to be included. 2. Since mallinfo() is used to obtain malloc statistics, it should be detected instead of malloc_stats(). Change-Id: I54c7d2ee568e06ab29938efc01d1a2153c5bd5db Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1172
* features/utime: Don't access frame after stack-windPranith Kumar K2020-04-031-15/+20
| | | | | | | | | | | | | Problem: frame is accessed after stack-wind. This can lead to crash if the cbk frees the frame. Fix: Use new frame for the wind instead. Updates: #832 Change-Id: I64754609f1114b0bbd4d1336fa81a56f2cca6e03 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* add clean local after grant lockl17zhou2020-04-011-7/+8
| | | | | | | | | found by flock test, without correct ref number of fd, lock will not be correctly released. Fixes: bz#1779089 Change-Id: I3e466b17c852eb219c8778e43af8ad670a8449cc Signed-off-by: l17zhou <cynthia.zhou@nokia-sbell.com>
* Marker: Logically deadcode found by coverityHari Gowtham2020-03-311-15/+11
| | | | | | | | Have removed the deadcode found by the coverity id:1356503 Change-Id: Ieaa41e864538fb82dc967b4a214d4db09e267098 Updates: #1060 Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
* core[brick_mux]: brick crashed when creating and deleting volumes over timeMohit Agrawal2020-03-275-6/+70
| | | | | | | | | | | | | | | | | Problem: In brick_mux environment, while volumes are created/stopped in a loop after running a long time the main brick is crashed.The brick is crashed because the main brick process was not cleaned up memory for all objects at the time of detaching a volume. Below are the objects that are missed at the time of detaching a volume 1) xlator object for a brick graph 2) local_pool for posix_lock xlator 3) rpc object cleanup at quota xlator 4) inode leak at brick xlator Solution: To avoid the crash resolve all leak at the time of detaching a brick Change-Id: Ibb6e46c5fba22b9441a88cbaf6b3278823235913 updates: #977 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* features/shard: Fix crash during shards cleanup in error casesKrutika Dhananjay2020-03-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | A crash is seen during a reattempt to clean up shards in background upon remount. And this happens even on remount (which means a remount is no workaround for the crash). In such a situation, the in-memory base inode object will not be existent (new process, non-existent base shard). So local->resolver_base_inode will be NULL. In the event of an error (in this case, of space running out), the process would crash at the time of logging the error in the following line - gf_msg(this->name, GF_LOG_ERROR, local->op_errno, SHARD_MSG_FOP_FAILED, "failed to delete shards of %s", uuid_utoa(local->resolver_base_inode->gfid)); Fixed that by using local->base_gfid as the source of gfid when local->resolver_base_inode is NULL. Change-Id: I0b49f2b58becd0d8874b3d4b14ff8d92a89d02d5 Fixes: #1127 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* worm-xlator: fix newly introduced coverity issueSunny Kumar2020-03-201-4/+0
| | | | | | | | | This patch fixes CID: 1420405 updates: #1060 Change-Id: I0524e999fa1d36ed5a713eabf65482c04ad43a1a Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* WORM-Xlator: Initial write of a file succeeds if auto-commit-period 0David Spisla2020-03-171-17/+60
| | | | | | | | | | | | | | | | | | | If worm-file-level enabled and auto-commit-period 0 an initial write of a file (e.g. $ echo test >> file1.txt) would lead to an zero byte file because the WORM xlator immediately WORMed the file when it was created. To avoid this we move the setting of trusted.worm_file from worm_create_cbk to worm_release . This means that this xattr will set when the filehandle is closed and all initial WRITE FOPs succeed. Finally we also perform gf_worm_state_transition in worm_release to ensure that the file will be immediately WORMed after the file handle was closed. Change-Id: I5d02e18975b646ca1a27ed41d836e9d0dc333204 Fixes: bz#1808421 Signed-off-by: David Spisla <david.spisla@iternity.com>
* utime: resolve an issue of permission denied logsAmar Tumballi2020-03-131-0/+10
| | | | | | | | | | | | In case where uid is not set to be 0, there are possible errors from acl xlator. So, set `uid = 0;` with pid indicating this is set from UTIME activity. The message "E [MSGID: 148002] [utime.c:146:gf_utime_set_mdata_setxattr_cbk] 0-dev_SNIP_data-utime: dict set of key for set-ctime-mdata failed [Permission denied]" repeated 2 times between [2019-12-19 21:27:55.042634] and [2019-12-19 21:27:55.047887] Change-Id: Ieadf329835a40a13ac0bf908dac776e66954466c Fixes: #832 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* feature/changelog: Avoid thread creation if xlator is not enabledMohit Agrawal2020-02-093-40/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Changelog creates threads even if the changelog is not enabled Background: Changelog xlator broadly does two things 1. Journalling - Cosumers are geo-rep and glusterfind 2. Event Notification for registered events like (open, release etc) - Consumers are bitrot, geo-rep The existing option "changelog.changelog" controls journalling and there is no option to control event notification and is enabled by default. So when bitrot/geo-rep is not enabled on the volume, threads and resources(rpc and rbuf) related to event notifications consumes resources and cpu cycle which is unnecessary. Solution: The solution is to have two different options as below. 1. changelog-notification : Event notifications 2. changelog : Journalling This patch introduces the option "changelog-notification" which is not exposed to user. When either bitrot or changelog (journalling) is enabled, it internally enbales 'changelog-notification'. But once the 'changelog-notification' is enabled, it will not be disabled for the life time of the brick process even after bitrot and changelog is disabled. As of now, rpc resource cleanup has lot of races and is difficult to cleanup cleanly. If allowed, it leads to memory leaks and crashes on enable/disable of bitrot or changelog (journal) in a loop. Hence to be safer, the event notification is not disabled within lifetime of process once enabled. Change-Id: Ifd00286e0966049e8eb9f21567fe407cf11bb02a Updates: #475 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* bitrot: Make number of signer threads configurableKotresh HR2020-02-073-21/+45
| | | | | | | | | | | | | The number of signing process threads (glfs_brpobj) is set to 4 by default. The recommendation is to set it to number of cores available. This patch makes it configurable as follows gluster vol bitrot <volname> signer-threads <count> fixes: bz#1797869 Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc Signed-off-by: Kotresh HR <khiremat@redhat.com>
* xlator/bit-rot: structure loggingyatipadia2020-02-042-137/+153
| | | | | | | | convert all gf_msg() to gf_smsg() Change-Id: Ifa45b5089f83ddfcf69132bb8d9c0dc6d012464b Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com>
* xlator/snapview: structure loggingyatip2020-02-042-225/+189
| | | | | | | | | convert gf_msg() to gf_smsg() Updates: #657 Change-Id: I2dd09a205c11d1c05abc7106e67802d2aa3bca79 Signed-off-by: yatip <ypadia@redhat.com>
* Improve logging in EC, client and lock translatorAshish Pandey2020-02-031-4/+8
| | | | | Change-Id: I98af8672a25ff9fd9dba91a2e1384719f9155255 Fixes: bz#1779760
* snapview: fix memory leakXie Changlong2020-01-231-3/+2
| | | | | | | | | 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>
* Fix possible resource leaks.Xi Jinyu2020-01-211-0/+3
| | | | | | | | | | 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>
* multiple xlators: reduce key lengthYaniv Kaul2020-01-142-14/+15
| | | | | | | | | | | | | | | 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>
* xlator/changelog: structure loggingyatipadia2020-01-148-155/+209
| | | | | | | | | 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>
* xlator/bit-rot-stub-helpers: structure loggingyatipadia2020-01-143-71/+76
| | | | | | | | convert gf_msg() to gf_smsg() Change-Id: Id03b6a2f6817101650ea6eeffb10e91c09e6ef80 Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com>
* multiple: fix bad type castXavi Hernandez2020-01-101-1/+2
| | | | | | | | | | | | 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
* leases: re-alignment of structuresPurna Pavan Chandra Aekkaladevi2020-01-091-15/+20
| | | | | | | | | | | | | | | 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>
* lock: fix Coverity CID 1412107Xie Changlong2020-01-061-0/+2
| | | | | | | | To avoid memory leak. Change-Id: Ib802be310fe989223afd623d3e5a9c9016d4fd38 updates: bz#789278 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
* features/changelog: Optimization in changelogShwetha K Acharya2020-01-012-3/+31
| | | | | | | | | | | | 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>
* xlator/bit-rot-stub: structure loggingyatipadia2019-12-272-148/+141
| | | | | | | | convert gf_msg() to gf_smsg() Change-Id: I3072ba4305b720bea053688d140660d7d5c2d267 Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com>
* afr: make heal info locklessRavishankar N2019-12-123-14/+115
| | | | | | | | | | | | | | | | | | | 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>
* cloudsync - fixing a coverity issueBarak Sason Rofman2019-12-101-5/+1
| | | | | | | | | 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
* ctime: Fix ctime inconsisteny with utimensatKotresh HR2019-12-101-0/+10
| | | | | | | | | | | | | | | | | | | | 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>
* core: fix spelling mistakesSanju Rakonde2019-12-091-2/+2
| | | | | | | | | fixes: bz#1728554 credits: Patrick Matthäi <pmatthaei@debian.org> Change-Id: Id08dabf54a529dbb86666b544b1f0859aab75aac Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Revert "afr: make heal info lockless"Ravishankar N2019-11-283-102/+14
| | | | | | | | This reverts commit fce5f68bc72d448490a0d41be494ac54a9181b3c. I merged the wrong patch by mistake! Hence reverting it. updates: bz#1774011 Change-Id: Id7d6ed1d727efc02467c8a9aea3374331261ebd5