Lines Matching refs:mst_node
107 memcpy(c->mst_node, snod->node, snod->len); in scan_for_master()
126 if (ubifs_compare_master_node(c, c->mst_node, snod->node)) in scan_for_master()
135 if (ubifs_hmac_zero(c, c->mst_node->hmac)) { in scan_for_master()
136 err = mst_node_check_hash(c, c->mst_node, in scan_for_master()
141 err = ubifs_node_verify_hmac(c, c->mst_node, in scan_for_master()
317 ubifs_dump_node(c, c->mst_node, c->mst_node_alsz); in validate_master()
333 c->mst_node = kzalloc(c->mst_node_alsz, GFP_KERNEL); in ubifs_read_master()
334 if (!c->mst_node) in ubifs_read_master()
350 c->mst_node->flags &= cpu_to_le32(~UBIFS_MST_RCVRY); in ubifs_read_master()
352 c->max_sqnum = le64_to_cpu(c->mst_node->ch.sqnum); in ubifs_read_master()
353 c->highest_inum = le64_to_cpu(c->mst_node->highest_inum); in ubifs_read_master()
354 c->cmt_no = le64_to_cpu(c->mst_node->cmt_no); in ubifs_read_master()
355 c->zroot.lnum = le32_to_cpu(c->mst_node->root_lnum); in ubifs_read_master()
356 c->zroot.offs = le32_to_cpu(c->mst_node->root_offs); in ubifs_read_master()
357 c->zroot.len = le32_to_cpu(c->mst_node->root_len); in ubifs_read_master()
358 c->lhead_lnum = le32_to_cpu(c->mst_node->log_lnum); in ubifs_read_master()
359 c->gc_lnum = le32_to_cpu(c->mst_node->gc_lnum); in ubifs_read_master()
360 c->ihead_lnum = le32_to_cpu(c->mst_node->ihead_lnum); in ubifs_read_master()
361 c->ihead_offs = le32_to_cpu(c->mst_node->ihead_offs); in ubifs_read_master()
362 c->bi.old_idx_sz = le64_to_cpu(c->mst_node->index_size); in ubifs_read_master()
363 c->lpt_lnum = le32_to_cpu(c->mst_node->lpt_lnum); in ubifs_read_master()
364 c->lpt_offs = le32_to_cpu(c->mst_node->lpt_offs); in ubifs_read_master()
365 c->nhead_lnum = le32_to_cpu(c->mst_node->nhead_lnum); in ubifs_read_master()
366 c->nhead_offs = le32_to_cpu(c->mst_node->nhead_offs); in ubifs_read_master()
367 c->ltab_lnum = le32_to_cpu(c->mst_node->ltab_lnum); in ubifs_read_master()
368 c->ltab_offs = le32_to_cpu(c->mst_node->ltab_offs); in ubifs_read_master()
369 c->lsave_lnum = le32_to_cpu(c->mst_node->lsave_lnum); in ubifs_read_master()
370 c->lsave_offs = le32_to_cpu(c->mst_node->lsave_offs); in ubifs_read_master()
371 c->lscan_lnum = le32_to_cpu(c->mst_node->lscan_lnum); in ubifs_read_master()
372 c->lst.empty_lebs = le32_to_cpu(c->mst_node->empty_lebs); in ubifs_read_master()
373 c->lst.idx_lebs = le32_to_cpu(c->mst_node->idx_lebs); in ubifs_read_master()
374 old_leb_cnt = le32_to_cpu(c->mst_node->leb_cnt); in ubifs_read_master()
375 c->lst.total_free = le64_to_cpu(c->mst_node->total_free); in ubifs_read_master()
376 c->lst.total_dirty = le64_to_cpu(c->mst_node->total_dirty); in ubifs_read_master()
377 c->lst.total_used = le64_to_cpu(c->mst_node->total_used); in ubifs_read_master()
378 c->lst.total_dead = le64_to_cpu(c->mst_node->total_dead); in ubifs_read_master()
379 c->lst.total_dark = le64_to_cpu(c->mst_node->total_dark); in ubifs_read_master()
381 ubifs_copy_hash(c, c->mst_node->hash_root_idx, c->zroot.hash); in ubifs_read_master()
385 if (c->mst_node->flags & cpu_to_le32(UBIFS_MST_NO_ORPHS)) in ubifs_read_master()
395 ubifs_dump_node(c, c->mst_node, c->mst_node_alsz); in ubifs_read_master()
411 c->mst_node->leb_cnt = cpu_to_le32(c->leb_cnt); in ubifs_read_master()
412 c->mst_node->empty_lebs = cpu_to_le32(c->lst.empty_lebs); in ubifs_read_master()
413 c->mst_node->total_free = cpu_to_le64(c->lst.total_free); in ubifs_read_master()
414 c->mst_node->total_dark = cpu_to_le64(c->lst.total_dark); in ubifs_read_master()
454 c->mst_node->highest_inum = cpu_to_le64(c->highest_inum); in ubifs_write_master()
456 ubifs_copy_hash(c, c->zroot.hash, c->mst_node->hash_root_idx); in ubifs_write_master()
457 err = ubifs_write_node_hmac(c, c->mst_node, len, lnum, offs, in ubifs_write_master()
469 err = ubifs_write_node_hmac(c, c->mst_node, len, lnum, offs, in ubifs_write_master()