Lines Matching refs:dr
52 static int adfs_checkdiscrecord(struct adfs_discrecord *dr) in adfs_checkdiscrecord() argument
58 if (dr->log2secsize != 8 && in adfs_checkdiscrecord()
59 dr->log2secsize != 9 && in adfs_checkdiscrecord()
60 dr->log2secsize != 10) in adfs_checkdiscrecord()
64 if (dr->idlen < dr->log2secsize + 3) in adfs_checkdiscrecord()
71 if (le32_to_cpu(dr->disc_size_high) >> dr->log2secsize) in adfs_checkdiscrecord()
79 max_idlen = dr->format_version ? 19 : 16; in adfs_checkdiscrecord()
80 if (dr->idlen > max_idlen) in adfs_checkdiscrecord()
84 for (i = 0; i < sizeof(dr->unused52); i++) in adfs_checkdiscrecord()
85 if (dr->unused52[i] != 0) in adfs_checkdiscrecord()
252 struct adfs_discrecord *dr = adfs_map_discrecord(sbi->s_map); in adfs_statfs() local
258 buf->f_blocks = adfs_disc_size(dr) >> sb->s_blocksize_bits; in adfs_statfs()
325 static struct adfs_discmap *adfs_read_map(struct super_block *sb, struct adfs_discrecord *dr) in adfs_read_map() argument
333 zone_size = (8 << dr->log2secsize) - le16_to_cpu(dr->zone_spare); in adfs_read_map()
362 dm[i].dm_endbit = (adfs_disc_size(dr) >> dr->log2bpmb) + in adfs_read_map()
380 struct adfs_discrecord *dr; in adfs_fill_super() local
420 dr = (struct adfs_discrecord *)(b_data + ADFS_DR_OFFSET); in adfs_fill_super()
425 if (adfs_checkdiscrecord(dr)) { in adfs_fill_super()
430 blocksize = 1 << dr->log2secsize; in adfs_fill_super()
448 dr = (struct adfs_discrecord *)(b_data + ADFS_DR_OFFSET); in adfs_fill_super()
462 asb->s_idlen = dr->idlen; in adfs_fill_super()
463 asb->s_map_size = dr->nzones | (dr->nzones_high << 8); in adfs_fill_super()
464 asb->s_map2blk = dr->log2bpmb - dr->log2secsize; in adfs_fill_super()
465 asb->s_log2sharesize = dr->log2sharesize; in adfs_fill_super()
467 asb->s_map = adfs_read_map(sb, dr); in adfs_fill_super()
480 dr = adfs_map_discrecord(asb->s_map); in adfs_fill_super()
482 root_obj.parent_id = root_obj.indaddr = le32_to_cpu(dr->root); in adfs_fill_super()
495 if (dr->format_version) { in adfs_fill_super()
496 root_obj.size = le32_to_cpu(dr->root_size); in adfs_fill_super()