Lines Matching refs:mdb

76 	struct hfs_mdb *mdb, *mdb2;  in hfs_mdb_get()  local
93 bh = sb_bread512(sb, part_start + HFS_MDB_BLK, mdb); in hfs_mdb_get()
97 if (mdb->drSigWord == cpu_to_be16(HFS_SUPER_MAGIC)) in hfs_mdb_get()
108 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); in hfs_mdb_get()
118 sect = be16_to_cpu(mdb->drAlBlSt) + part_start; in hfs_mdb_get()
131 bh = sb_bread512(sb, part_start + HFS_MDB_BLK, mdb); in hfs_mdb_get()
134 if (mdb->drSigWord != cpu_to_be16(HFS_SUPER_MAGIC)) in hfs_mdb_get()
138 HFS_SB(sb)->mdb = mdb; in hfs_mdb_get()
142 HFS_SB(sb)->fs_ablocks = be16_to_cpu(mdb->drNmAlBlks); in hfs_mdb_get()
144 HFS_SB(sb)->clumpablks = be32_to_cpu(mdb->drClpSiz) / in hfs_mdb_get()
148 HFS_SB(sb)->fs_start = (be16_to_cpu(mdb->drAlBlSt) + part_start) >> in hfs_mdb_get()
152 HFS_SB(sb)->free_ablocks = be16_to_cpu(mdb->drFreeBks); in hfs_mdb_get()
153 HFS_SB(sb)->next_id = be32_to_cpu(mdb->drNxtCNID); in hfs_mdb_get()
154 HFS_SB(sb)->root_files = be16_to_cpu(mdb->drNmFls); in hfs_mdb_get()
155 HFS_SB(sb)->root_dirs = be16_to_cpu(mdb->drNmRtDirs); in hfs_mdb_get()
156 HFS_SB(sb)->file_count = be32_to_cpu(mdb->drFilCnt); in hfs_mdb_get()
157 HFS_SB(sb)->folder_count = be32_to_cpu(mdb->drDirCnt); in hfs_mdb_get()
180 block = be16_to_cpu(mdb->drVBMSt) + part_start; in hfs_mdb_get()
210 attrib = mdb->drAtrb; in hfs_mdb_get()
223 mdb->drAtrb = attrib; in hfs_mdb_get()
224 be32_add_cpu(&mdb->drWrCnt, 1); in hfs_mdb_get()
225 mdb->drLsMod = hfs_mtime(); in hfs_mdb_get()
266 struct hfs_mdb *mdb = HFS_SB(sb)->mdb; in hfs_mdb_commit() local
274 mdb->drLsMod = hfs_mtime(); in hfs_mdb_commit()
275 mdb->drFreeBks = cpu_to_be16(HFS_SB(sb)->free_ablocks); in hfs_mdb_commit()
276 mdb->drNxtCNID = cpu_to_be32(HFS_SB(sb)->next_id); in hfs_mdb_commit()
277 mdb->drNmFls = cpu_to_be16(HFS_SB(sb)->root_files); in hfs_mdb_commit()
278 mdb->drNmRtDirs = cpu_to_be16(HFS_SB(sb)->root_dirs); in hfs_mdb_commit()
279 mdb->drFilCnt = cpu_to_be32(HFS_SB(sb)->file_count); in hfs_mdb_commit()
280 mdb->drDirCnt = cpu_to_be32(HFS_SB(sb)->folder_count); in hfs_mdb_commit()
291 hfs_inode_write_fork(HFS_SB(sb)->ext_tree->inode, mdb->drXTExtRec, in hfs_mdb_commit()
292 &mdb->drXTFlSize, NULL); in hfs_mdb_commit()
293 hfs_inode_write_fork(HFS_SB(sb)->cat_tree->inode, mdb->drCTExtRec, in hfs_mdb_commit()
294 &mdb->drCTFlSize, NULL); in hfs_mdb_commit()
297 memcpy(HFS_SB(sb)->alt_mdb, HFS_SB(sb)->mdb, HFS_SECTOR_SIZE); in hfs_mdb_commit()
312 block = be16_to_cpu(HFS_SB(sb)->mdb->drVBMSt) + HFS_SB(sb)->part_start; in hfs_mdb_commit()
345 HFS_SB(sb)->mdb->drAtrb |= cpu_to_be16(HFS_SB_ATTRIB_UNMNT); in hfs_mdb_close()
346 HFS_SB(sb)->mdb->drAtrb &= cpu_to_be16(~HFS_SB_ATTRIB_INCNSTNT); in hfs_mdb_close()