Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traverse xattrs using a pointer to xattr instead of snprintf() its value #4363

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

mykaul
Copy link
Contributor

@mykaul mykaul commented May 24, 2024

The key can be a pointer, pointing to the xattr, instead of copying it.

Updates: #1000
Signed-off-by: Yaniv Kaul [email protected]

The key can be a pointer, pointing to the xattr, instead of copying it.

Updates: gluster#1000
Signed-off-by: Yaniv Kaul <[email protected]>
@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index 83e295eb8..ceb8f81d4 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -6045,10 +6045,7 @@ posix_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
         if (op_ret >= 0) {
             op_ret = 0;
 
-            list_for_each_entry(entry, &entries.list, list)
-            {
-                op_ret++;
-            }
+            list_for_each_entry(entry, &entries.list, list) { op_ret++; }
         }
 
         STACK_UNWIND_STRICT(readdirp, frame, op_ret, op_errno, &entries, NULL);

@mykaul
Copy link
Contributor Author

mykaul commented May 25, 2024

/run regression

@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index a4223a690..4b8e0e04e 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -6045,10 +6045,7 @@ posix_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
         if (op_ret >= 0) {
             op_ret = 0;
 
-            list_for_each_entry(entry, &entries.list, list)
-            {
-                op_ret++;
-            }
+            list_for_each_entry(entry, &entries.list, list) { op_ret++; }
         }
 
         STACK_UNWIND_STRICT(readdirp, frame, op_ret, op_errno, &entries, NULL);

@mykaul
Copy link
Contributor Author

mykaul commented May 29, 2024

/run regression

@gluster-ant
Copy link
Collaborator

0 test(s) failed

1 test(s) generated core
./tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t

2 test(s) needed retry
./tests/00-geo-rep/georep-basic-dr-rsync-arbiter.t
./tests/bugs/glusterd/bug-1696046.t
https://build.gluster.org/job/gh_centos7-regression/3404/

@mykaul
Copy link
Contributor Author

mykaul commented May 30, 2024

/run regression

@mykaul
Copy link
Contributor Author

mykaul commented May 30, 2024

Filed #4369 on the crash in regression, which I think (hope) is not related to this patch.

@gluster-ant
Copy link
Collaborator

0 test(s) failed

1 test(s) generated core
./tests/bugs/glusterd/brick-mux.t

2 test(s) needed retry
./tests/000-flaky/glusterd-restart-shd-mux.t
./tests/bugs/glusterd/brick-mux.t

1 flaky test(s) marked as success even though they failed
./tests/000-flaky/glusterd-restart-shd-mux.t
https://build.gluster.org/job/gh_centos7-regression/3406/

@mykaul mykaul added the DO-NOT-MERGE This is equivalent to '-2' on Gerrit. label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO-NOT-MERGE This is equivalent to '-2' on Gerrit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants