#include "dm-dedup-kvstore.h"
#define MAX_DEV_NAME_LEN (64)
-#define MAX_BACKEND_NAME_LEN (64)
#define MIN_DATA_DEV_BLOCK_SIZE (4 * 1024)
#define MAX_DATA_DEV_BLOCK_SIZE (1024 * 1024)
char hash_algo[CRYPTO_ALG_NAME_LEN];
enum backend backend;
+ char backend_str[MAX_BACKEND_NAME_LEN];
uint32_t flushrq;
};
return -EINVAL;
}
+ strlcpy(da->backend_str, backend, MAX_BACKEND_NAME_LEN);
+
return 0;
}
iparam = &iparam_cowbtree;
}
+ strcpy(dc->backend_str, da.backend_str);
+
md = dc->mdops->init_meta(iparam, &unformatted);
if (IS_ERR(md)) {
ti->error = "failed to initialize backend metadata";
switch (status_type) {
case STATUSTYPE_INFO:
- case STATUSTYPE_TABLE:
data_used_block_count = dc->physical_block_counter;
data_actual_block_count = dc->logical_block_counter;
data_total_block_count = dc->pblocks;
DMEMIT("%llu %llu %llu %llu %llu %llu",
dc->writes, dc->uniqwrites, dc->dupwrites,
dc->reads_on_writes, dc->overwrites, dc->newwrites);
+ break;
+ case STATUSTYPE_TABLE:
+ DMEMIT("%s %s %u %s %s %u",
+ dc->metadata_dev->name, dc->data_dev->name, dc->block_size,
+ dc->crypto_alg, dc->backend_str, dc->flushrq);
}
}
#define CRYPTO_ALG_NAME_LEN 16
#define MAX_DIGEST_SIZE SHA256_DIGEST_SIZE
+#define MAX_BACKEND_NAME_LEN (64)
+
#define MIN_DEDUP_WORK_IO 16
/* Per target instance structure */
struct dm_io_client *io_client; /* used for read-on-write
of misaligned requests */
+ char backend_str[MAX_BACKEND_NAME_LEN];
struct metadata_ops *mdops;
struct metadata *bmd;
struct kvstore *kvs_hash_pbn;