Use OP_WRITE_STABLE in bs_fio

This commit is contained in:
Vitaliy Filippov
2025-07-26 14:12:48 +03:00
parent 93a30efd86
commit 8049e3c14a
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -147,7 +147,7 @@ Output:
struct blockstore_op_t struct blockstore_op_t
{ {
// operation // operation
uint64_t opcode; uint64_t opcode = 0;
// finish callback // finish callback
std::function<void (blockstore_op_t*)> callback; std::function<void (blockstore_op_t*)> callback;
union __attribute__((__packed__)) union __attribute__((__packed__))
@@ -171,9 +171,9 @@ struct blockstore_op_t
uint32_t list_stable_limit; uint32_t list_stable_limit;
}; };
}; };
void *buf; void *buf = NULL;
void *bitmap; void *bitmap = NULL;
int retval; int retval = 0;
uint8_t private_data[BS_OP_PRIVATE_DATA_SIZE]; uint8_t private_data[BS_OP_PRIVATE_DATA_SIZE];
}; };
+6 -6
View File
@@ -5,14 +5,14 @@
// //
// Initialize storage for tests: // Initialize storage for tests:
// //
// dd if=/dev/zero of=test_data.bin bs=1024 count=1048576 // dd if=/dev/zero of=test_data.bin bs=1M count=1024
// dd if=/dev/zero of=test_meta.bin bs=1024 count=256
// dd if=/dev/zero of=test_journal.bin bs=1024 count=4096
// //
// Random write: // Random write:
// //
// fio -thread -ioengine=./libfio_blockstore.so -name=test -bs=4k -direct=1 -fsync=16 -iodepth=16 -rw=randwrite \ // [LD_PRELOAD=libasan.so.8] \
// -bs_config='{"data_device":"./test_data.bin"}' -size=1000M // fio -name=test -thread -ioengine=../build/src/blockstore/libfio_vitastor_blk.so \
// -bs=4k -direct=1 -rw=randwrite -iodepth=16 -size=900M -loops=10 \
// -bs_config='{"data_device":"./test_data.bin","meta_offset":0,"journal_offset":16777216,"data_offset":33554432,"disable_data_fsync":true,"immediate_commit":"all","journal_no_same_sector_overwrites":true}'
// //
// Linear write: // Linear write:
// //
@@ -189,7 +189,7 @@ static enum fio_q_status bs_queue(struct thread_data *td, struct io_u *io)
}; };
break; break;
case DDIR_WRITE: case DDIR_WRITE:
op->opcode = BS_OP_WRITE; op->opcode = BS_OP_WRITE_STABLE;
op->buf = io->xfer_buf; op->buf = io->xfer_buf;
op->oid = { op->oid = {
.inode = 1, .inode = 1,