ppl_conf
ppl_conf->mismatch_count++;
ppl_conf->recovered_entries++;
pplhdr->signature = cpu_to_le32(log->ppl_conf->signature);
struct ppl_conf *ppl_conf = log->ppl_conf;
ppl_conf->signature = signature;
} else if (ppl_conf->signature != signature) {
__func__, signature, ppl_conf->signature,
ppl_conf->mismatch_count++;
struct ppl_conf *ppl_conf; /* shared between all log instances */
__func__, ret, ppl_conf->mismatch_count,
ppl_conf->recovered_entries);
static int ppl_load(struct ppl_conf *ppl_conf)
for (i = 0; i < ppl_conf->count; i++) {
struct ppl_log *log = &ppl_conf->child_logs[i];
if (ppl_conf->mddev->external) {
signature = ppl_conf->signature;
} else if (signature != ppl_conf->signature) {
mdname(ppl_conf->mddev));
__func__, ret, ppl_conf->mismatch_count,
ppl_conf->recovered_entries);
static void __ppl_exit_log(struct ppl_conf *ppl_conf)
clear_bit(MD_HAS_PPL, &ppl_conf->mddev->flags);
clear_bit(MD_HAS_MULTIPLE_PPLS, &ppl_conf->mddev->flags);
kfree(ppl_conf->child_logs);
bioset_exit(&ppl_conf->bs);
bioset_exit(&ppl_conf->flush_bs);
mempool_exit(&ppl_conf->io_pool);
kmem_cache_destroy(ppl_conf->io_kc);
kfree(ppl_conf);
struct ppl_conf *ppl_conf = conf->log_private;
if (ppl_conf) {
__ppl_exit_log(ppl_conf);
&log->ppl_conf->mddev->flags);
struct ppl_conf *ppl_conf;
ppl_conf = kzalloc_obj(struct ppl_conf);
if (!ppl_conf)
ppl_conf->mddev = mddev;
ppl_conf->io_kc = KMEM_CACHE(ppl_io_unit, 0);
if (!ppl_conf->io_kc) {
ret = mempool_init(&ppl_conf->io_pool, conf->raid_disks, ppl_io_pool_alloc,
ppl_io_pool_free, ppl_conf->io_kc);
ret = bioset_init(&ppl_conf->bs, conf->raid_disks, 0, BIOSET_NEED_BVECS);
ret = bioset_init(&ppl_conf->flush_bs, conf->raid_disks, 0, 0);
ppl_conf->count = conf->raid_disks;
ppl_conf->child_logs = kzalloc_objs(struct ppl_log, ppl_conf->count);
if (!ppl_conf->child_logs) {
atomic64_set(&ppl_conf->seq, 0);
INIT_LIST_HEAD(&ppl_conf->no_mem_stripes);
spin_lock_init(&ppl_conf->no_mem_stripes_lock);
ppl_conf->signature = ~crc32c(~0, mddev->uuid, sizeof(mddev->uuid));
ppl_conf->block_size = 512;
ppl_conf->block_size =
for (i = 0; i < ppl_conf->count; i++) {
struct ppl_log *log = &ppl_conf->child_logs[i];
log->ppl_conf = ppl_conf;
ret = ppl_load(ppl_conf);
ppl_conf->recovered_entries > 0 &&
ppl_conf->mismatch_count == 0) {
} else if (mddev->pers && ppl_conf->mismatch_count > 0) {
conf->log_private = ppl_conf;
set_bit(MD_HAS_PPL, &ppl_conf->mddev->flags);
__ppl_exit_log(ppl_conf);
struct ppl_conf *ppl_conf = conf->log_private;
if (rdev->raid_disk >= ppl_conf->count)
log = &ppl_conf->child_logs[rdev->raid_disk];
struct ppl_conf *ppl_conf = log->ppl_conf;
io = mempool_alloc(&ppl_conf->io_pool, GFP_NOWAIT);
pplhdr->signature = cpu_to_le32(ppl_conf->signature);
io->seq = atomic64_inc_return(&ppl_conf->seq);
struct ppl_conf *ppl_conf = conf->log_private;
log = &ppl_conf->child_logs[sh->pd_idx];
spin_lock_irq(&ppl_conf->no_mem_stripes_lock);
list_add_tail(&sh->log_list, &ppl_conf->no_mem_stripes);
spin_unlock_irq(&ppl_conf->no_mem_stripes_lock);
struct ppl_conf *ppl_conf = log->ppl_conf;
md_error(ppl_conf->mddev, log->rdev);
struct ppl_conf *ppl_conf = log->ppl_conf;
ilog2(ppl_conf->block_size >> 9));
if ((ppl_conf->child_logs[i].wb_cache_on) &&
&ppl_conf->bs);
struct ppl_conf *ppl_conf = conf->log_private;
for (i = 0; i < ppl_conf->count; i++) {
log = &ppl_conf->child_logs[i];
struct ppl_conf *ppl_conf = log->ppl_conf;
struct r5conf *conf = ppl_conf->mddev->private;
mempool_free(io, &ppl_conf->io_pool);
spin_lock(&ppl_conf->no_mem_stripes_lock);
if (!list_empty(&ppl_conf->no_mem_stripes)) {
sh = list_first_entry(&ppl_conf->no_mem_stripes,
spin_unlock(&ppl_conf->no_mem_stripes_lock);
struct ppl_conf *ppl_conf = log->ppl_conf;
struct r5conf *conf = ppl_conf->mddev->private;
struct ppl_conf *ppl_conf = log->ppl_conf;
struct r5conf *conf = ppl_conf->mddev->private;
GFP_NOIO, &ppl_conf->flush_bs);
struct ppl_conf *ppl_conf = conf->log_private;
for (i = 0; i < ppl_conf->count; i++) {
struct ppl_log *log = &ppl_conf->child_logs[i];
struct ppl_conf *ppl_conf = log->ppl_conf;
struct mddev *mddev = ppl_conf->mddev;
int block_size = ppl_conf->block_size;
struct ppl_conf *ppl_conf = log->ppl_conf;