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

posix ops: call posix_inode_ctx_get_all() only if needed #4360

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

mykaul
Copy link
Contributor

@mykaul mykaul commented May 24, 2024

In some functions (posix_writev, fallocate, ...) it is used to be called unconditionally. However, it doesn't need to be - only when we need ctx to do locking.

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

In some functions (posix_writev, fallocate, ...) it is used to be called unconditionally.
However, it doesn't need to be - only when we need ctx to do locking.

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 ebb0795e4..dd2d053e9 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -6032,10 +6032,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

1 test(s) failed
./tests/bugs/rpc/bug-884452.t

0 test(s) generated core

3 test(s) needed retry
./tests/basic/quick-read-with-upcall.t
./tests/bugs/glusterd/bug-1696046.t
./tests/bugs/rpc/bug-884452.t
https://build.gluster.org/job/gh_centos7-regression/3401/

@mykaul
Copy link
Contributor Author

mykaul commented Jun 5, 2024

/run regression

@gluster-ant
Copy link
Collaborator

0 test(s) failed

1 test(s) generated core
./tests/bugs/shard/bug-1605056-2.t

2 test(s) needed retry
./tests/bugs/bitrot/bug-1245981.t
./tests/bugs/shard/bug-1605056-2.t
https://build.gluster.org/job/gh_centos7-regression/3413/

@mykaul mykaul added the DO-NOT-MERGE This is equivalent to '-2' on Gerrit. label Oct 29, 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