Lines Matching refs:lba

46 static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
76 static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba, in validate_gpt_header() argument
111 if (le64_to_cpu(gpt_h->my_lba) != lba) { in validate_gpt_header()
114 lba); in validate_gpt_header()
292 dev_desc->rawlba = dev_desc->lba; in part_get_info_efi()
497 dev_desc->rawlba = dev_desc->lba; in part_test_efi()
1049 lbaint_t lba; in write_mbr_and_gpt_partitions() local
1054 dev_desc->rawlba = dev_desc->lba; in write_mbr_and_gpt_partitions()
1072 lba = 0; /* MBR is always at 0 */ in write_mbr_and_gpt_partitions()
1074 if (blk_dwrite(dev_desc, lba, cnt, buf) != cnt) { in write_mbr_and_gpt_partitions()
1076 __func__, "MBR", cnt, lba); in write_mbr_and_gpt_partitions()
1081 lba = GPT_PRIMARY_PARTITION_TABLE_LBA; in write_mbr_and_gpt_partitions()
1083 if (blk_dwrite(dev_desc, lba, cnt, gpt_h) != cnt) { in write_mbr_and_gpt_partitions()
1085 __func__, "Primary GPT Header", cnt, lba); in write_mbr_and_gpt_partitions()
1089 lba = le64_to_cpu(gpt_h->partition_entry_lba); in write_mbr_and_gpt_partitions()
1091 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()
1093 __func__, "Primary GPT Entries", cnt, lba); in write_mbr_and_gpt_partitions()
1100 lba = le64_to_cpu(gpt_h->partition_entry_lba); in write_mbr_and_gpt_partitions()
1102 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()
1104 __func__, "Backup GPT Entries", cnt, lba); in write_mbr_and_gpt_partitions()
1108 lba = le64_to_cpu(gpt_h->my_lba); in write_mbr_and_gpt_partitions()
1110 if (blk_dwrite(dev_desc, lba, cnt, gpt_h) != cnt) { in write_mbr_and_gpt_partitions()
1112 __func__, "Backup GPT Header", cnt, lba); in write_mbr_and_gpt_partitions()
1183 static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba, in is_gpt_valid() argument
1207 if (blk_dread(dev_desc, (lbaint_t)lba * sector, sector, pgpt_head) != sector) { in is_gpt_valid()
1212 if (validate_gpt_header(pgpt_head, (lbaint_t)lba, dev_desc->rawlba)) in is_gpt_valid()