Fix misleading COPY_BUF_JOURNAL flag on hole slices #78
Reference in New Issue
Block a user
No description provided.
Delete Branch "changwei.ye/vitastor:fix-misleading-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Fix misleading COPY_BUF_JOURNAL flag on hole slices
Fix compilation errors regarding type conversions and pointer arithmetic
compile under clang 18.1.3
‘‘’
[build] /home/yecw/ws/src/vitastor/src/client/msgr_receive.cpp:530:43: error: arithmetic on a pointer to void
[build] 530 | cl->recv_list[i].iov_base += result;
[build] | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
uild] /home/yecw/ws/src/vitastor/src/blockstore/v1/init.cpp:1009:34: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
[build] 1009 | .state = (BS_ST_SMALL_WRITE | BS_ST_SYNCED | (je->type == JE_SMALL_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] /home/yecw/ws/src/vitastor/src/blockstore/v1/init.cpp:1009:34: note: insert an explicit cast to silence this issue
[build] 1009 | .state = (BS_ST_SMALL_WRITE | BS_ST_SYNCED | (je->type == JE_SMALL_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] | static_cast<uint32_t>( )
[build] /home/yecw/ws/src/vitastor/src/blockstore/v1/init.cpp:1093:34: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
[build] 1093 | .state = (BS_ST_BIG_WRITE | BS_ST_SYNCED | (je->type == JE_BIG_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] /home/yecw/ws/src/vitastor/src/blockstore/v1/init.cpp:1093:34: note: insert an explicit cast to silence this issue
[build] 1093 | .state = (BS_ST_BIG_WRITE | BS_ST_SYNCED | (je->type == JE_BIG_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] | static_cast<uint32_t>(
“
Contributor Name
Changwei Ye
CLA
99ea4c6acbto980096e0c2980096e0c2to31dfebbbe8Fix misleading COPY_BUF_JOURNAL flag on hole slicesto WIP: Fix misleading COPY_BUF_JOURNAL flag on hole slices31dfebbbe8to10a6782bdfWIP: Fix misleading COPY_BUF_JOURNAL flag on hole slicesto Fix misleading COPY_BUF_JOURNAL flag on hole slices