// All write requests
l_librbd_pwl_wr_req, // write requests
+ l_librbd_pwl_wr_bytes, // bytes written
l_librbd_pwl_wr_req_def, // write requests deferred for resources
l_librbd_pwl_wr_req_def_lanes, // write requests deferred for lanes
l_librbd_pwl_wr_req_def_log, // write requests deferred for log entries
l_librbd_pwl_wr_req_def_buf, // write requests deferred for buffer space
l_librbd_pwl_wr_req_overlap, // write requests detained for overlap
l_librbd_pwl_wr_req_queued, // write requests queued for prior barrier
- l_librbd_pwl_wr_bytes, // bytes written
// Write log operations (1 .. n per request that appends to the log)
l_librbd_pwl_log_ops, // log append ops
l_librbd_pwl_cmp_latency,
l_librbd_pwl_cmp_fails,
- l_librbd_pwl_flush,
+ l_librbd_pwl_internal_flush,
+ l_librbd_pwl_writeback_latency,
l_librbd_pwl_invalidate_cache,
l_librbd_pwl_invalidate_discard_cache,
const uint64_t DEFAULT_POOL_SIZE = 1u<<30;
const uint64_t MIN_POOL_SIZE = DEFAULT_POOL_SIZE;
+const uint64_t POOL_SIZE_ALIGN = 1 << 20;
constexpr double USABLE_SIZE = (7.0 / 10);
const uint64_t BLOCK_ALLOC_OVERHEAD_BYTES = 16;
-const uint8_t RWL_POOL_VERSION = 1;
+const uint8_t RWL_LAYOUT_VERSION = 1;
+const uint8_t SSD_LAYOUT_VERSION = 1;
const uint64_t MAX_LOG_ENTRIES = (1024 * 1024);
const double AGGRESSIVE_RETIRE_HIGH_WATER = 0.75;
const double RETIRE_HIGH_WATER = 0.50;
#ifdef WITH_RBD_RWL
union {
struct {
- uint8_t layout_version; /* Version of this structure (RWL_POOL_VERSION) */
+ uint8_t layout_version; /* Version of this structure (RWL_LAYOUT_VERSION) */
};
uint64_t _u64;
} header;
* sync gen number are flushed. */
uint32_t block_size; /* block size */
uint32_t num_log_entries;
- uint32_t first_free_entry; /* Entry following the newest valid entry */
- uint32_t first_valid_entry; /* Index of the oldest valid entry in the log */
+ uint64_t first_free_entry; /* Entry following the newest valid entry */
+ uint64_t first_valid_entry; /* Index of the oldest valid entry in the log */
#ifdef WITH_RBD_SSD_CACHE
DENC(WriteLogPoolRoot, v, p) {