glusterfs
glusterfs copied to clipboard
index: simplify index_dir_create()
Use gf_path_strip_trailing_slashes()
and avoid substring copying
in index_dir_create()
. This tweak also fixes the following warning
from gcc-12:
index.c: In function 'index_dir_create':
index.c:282:9: warning: 'strncpy' output truncated before terminating nul
copying as many bytes from a string as its length [-Wstringop-truncation]
282 | strncpy(path, fullpath, len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
index.c:272:15: note: length computed here
272 | pathlen = strlen(fullpath);
| ^~~~~~~~~~~~~~~~
Signed-off-by: Dmitry Antipov [email protected] Updates: #1000
/run regression
/run regression
1 test(s) failed ./tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t
0 test(s) generated core
6 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/basic/ctime/ctime-rep-rebalance.t ./tests/basic/glusterd/thin-arbiter-volume-probe.t ./tests/bugs/posix/bug-1651445.t ./tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t
2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2692/
/run regression
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.