-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
write: try to fetch GLUSTERFS_WRITE_IS_APPEND once, not twice in writ… #4362
Conversation
CLANG-FORMAT FAILURE: index fda0c673c..7e474c194 100644
--- a/xlators/storage/posix/src/posix-handle.h
+++ b/xlators/storage/posix/src/posix-handle.h
@@ -222,5 +222,6 @@ void
posix_disk_space_check(struct posix_private *priv);
dict_t *
-_fill_writev_xdata(inode_t *inode, dict_t *xdata, xlator_t *this, int is_append, gf_boolean_t skip_fetch_write_is_append);
+_fill_writev_xdata(inode_t *inode, dict_t *xdata, xlator_t *this, int is_append,
+ gf_boolean_t skip_fetch_write_is_append);
#endif /* !_POSIX_HANDLE_H */
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index eae8f1e14..7d747266d 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -2133,7 +2133,8 @@ overwrite:
goto out;
}
- rsp_xdata = _fill_writev_xdata(fd->inode, xdata, this, is_append, write_append);
+ rsp_xdata = _fill_writev_xdata(fd->inode, xdata, this, is_append,
+ write_append);
/* writev successful, we also need to get the stat of
* the file we wrote to
*/
@@ -6032,10 +6033,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); |
…e path We fetch it once (in posix_writev() or posix_writev_fill_rsp_dict() in io_uring code) and then again in _fill_writev_xdata(). Signed-off-by: Yaniv Kaul <[email protected]> Updates: gluster#1000
CLANG-FORMAT FAILURE: index cac41f05c..7d747266d 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -6033,10 +6033,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); |
/run regression |
1 test(s) failed 0 test(s) generated core 10 test(s) needed retry 1 flaky test(s) marked as success even though they failed |
/run regression |
./tests/bugs/distribute/bug-1286171.t seems to be flaky - it passed now (it had nothing to do with this patch I believe). I'm not sure there's an open bug on this, but it looks like this is ready for review. |
…e path
We fetch it once (in posix_writev() or posix_writev_fill_rsp_dict() in io_uring code) and then again in _fill_writev_xdata().
Updates: #1000
Signed-off-by: Yaniv Kaul [email protected]