Add vitastor_c_inode_get_immediate_commit
Test / buildenv (push) Successful in 10s Details
Test / build (push) Successful in 3m24s Details
Test / npm_lint (push) Successful in 9s Details
Test / test_cas (push) Successful in 10s Details
Test / make_test (push) Successful in 39s Details
Test / test_change_pg_size (push) Successful in 8s Details
Test / test_change_pg_count (push) Successful in 36s Details
Test / test_change_pg_count_ec (push) Successful in 33s Details
Test / test_create_nomaxid (push) Successful in 8s Details
Test / test_etcd_fail (push) Successful in 1m1s Details
Test / test_add_osd (push) Successful in 2m41s Details
Test / test_interrupted_rebalance_imm (push) Successful in 2m37s Details
Test / test_interrupted_rebalance (push) Successful in 2m45s Details
Test / test_interrupted_rebalance_ec (push) Successful in 1m46s Details
Test / test_failure_domain (push) Successful in 9s Details
Test / test_minsize_1 (push) Successful in 15s Details
Test / test_snapshot (push) Successful in 24s Details
Test / test_snapshot_ec (push) Successful in 29s Details
Test / test_rm (push) Successful in 15s Details
Test / test_move_reappear (push) Successful in 19s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m34s Details
Test / test_snapshot_down (push) Successful in 28s Details
Test / test_snapshot_down_ec (push) Successful in 27s Details
Test / test_splitbrain (push) Successful in 22s Details
Test / test_snapshot_chain (push) Successful in 2m10s Details
Test / test_snapshot_chain_ec (push) Successful in 2m48s Details
Test / test_rebalance_verify_imm (push) Successful in 2m58s Details
Test / test_root_node (push) Successful in 9s Details
Test / test_rebalance_verify (push) Successful in 3m33s Details
Test / test_switch_primary (push) Successful in 35s Details
Test / test_write (push) Successful in 40s Details
Test / test_write_no_same (push) Successful in 18s Details
Test / test_write_xor (push) Successful in 1m3s Details
Test / test_rebalance_verify_ec (push) Successful in 4m12s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 4m41s Details
Test / test_heal_pg_size_2 (push) Successful in 3m30s Details
Test / test_heal_ec (push) Successful in 4m46s Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m6s Details
Test / test_heal_csum_32k_dj (push) Successful in 6m33s Details
Test / test_heal_csum_32k (push) Successful in 6m38s Details
Test / test_osd_tags (push) Successful in 33s Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m59s Details
Test / test_enospc (push) Successful in 2m16s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m48s Details
Test / test_enospc_imm (push) Successful in 1m42s Details
Test / test_enospc_xor (push) Successful in 2m26s Details
Test / test_enospc_imm_xor (push) Successful in 2m11s Details
Test / test_heal_csum_4k (push) Successful in 6m15s Details
Test / test_scrub_zero_osd_2 (push) Successful in 29s Details
Test / test_scrub (push) Successful in 37s Details
Test / test_scrub_xor (push) Successful in 36s Details
Test / test_scrub_ec (push) Successful in 38s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 40s Details
Test / test_scrub_pg_size_3 (push) Successful in 47s Details
Test / test_nfs (push) Successful in 15s Details

master
Vitaliy Filippov 2024-05-19 01:57:18 +03:00
parent a12d328793
commit 50e56b3b92
3 changed files with 19 additions and 0 deletions

View File

@ -20,9 +20,11 @@
#define MAX_DATA_BLOCK_SIZE 128*1024*1024
#define DEFAULT_BITMAP_GRANULARITY 4096
#ifndef IMMEDIATE_NONE
#define IMMEDIATE_NONE 0
#define IMMEDIATE_SMALL 1
#define IMMEDIATE_ALL 2
#endif
struct etcd_kv_t
{

View File

@ -384,4 +384,12 @@ int vitastor_c_inode_get_readonly(void *handle)
return watch->cfg.readonly;
}
uint32_t vitastor_c_inode_get_immediate_commit(vitastor_c *client, uint64_t inode_num)
{
auto pool_it = client->cli->st_cli.pool_config.find(INODE_POOL(inode_num));
if (pool_it == client->cli->st_cli.pool_config.end())
return 0;
return pool_it->second.immediate_commit;
}
}

View File

@ -12,6 +12,13 @@
#ifndef POOL_ID_BITS
#define POOL_ID_BITS 16
#endif
#ifndef IMMEDIATE_NONE
#define IMMEDIATE_NONE 0
#define IMMEDIATE_SMALL 1
#define IMMEDIATE_ALL 2
#endif
#include <stdint.h>
#include <sys/uio.h>
@ -65,6 +72,8 @@ uint64_t vitastor_c_inode_get_num(void *handle);
uint32_t vitastor_c_inode_get_block_size(vitastor_c *client, uint64_t inode_num);
uint32_t vitastor_c_inode_get_bitmap_granularity(vitastor_c *client, uint64_t inode_num);
int vitastor_c_inode_get_readonly(void *handle);
// Returns IMMEDIATE_ALL, IMMEDIATE_SMALL or IMMEDIATE_NONE
uint32_t vitastor_c_inode_get_immediate_commit(vitastor_c *client, uint64_t inode_num);
#ifdef __cplusplus
}