Lines Matching refs:rec
290 hfs_cat_rec *rec; member
296 hfs_cat_rec *rec; in hfs_test_inode() local
298 rec = idata->rec; in hfs_test_inode()
299 switch (rec->type) { in hfs_test_inode()
301 return inode->i_ino == be32_to_cpu(rec->dir.DirID); in hfs_test_inode()
303 return inode->i_ino == be32_to_cpu(rec->file.FlNum); in hfs_test_inode()
317 hfs_cat_rec *rec; in hfs_read_inode() local
336 rec = idata->rec; in hfs_read_inode()
337 switch (rec->type) { in hfs_read_inode()
340 hfs_inode_read_fork(inode, rec->file.ExtRec, rec->file.LgLen, in hfs_read_inode()
341 rec->file.PyLen, be16_to_cpu(rec->file.ClpSize)); in hfs_read_inode()
343 hfs_inode_read_fork(inode, rec->file.RExtRec, rec->file.RLgLen, in hfs_read_inode()
344 rec->file.RPyLen, be16_to_cpu(rec->file.ClpSize)); in hfs_read_inode()
347 inode->i_ino = be32_to_cpu(rec->file.FlNum); in hfs_read_inode()
349 if (!(rec->file.Flags & HFS_FIL_LOCK)) in hfs_read_inode()
354 timespec_to_timespec64(hfs_m_to_utime(rec->file.MdDat)); in hfs_read_inode()
360 inode->i_ino = be32_to_cpu(rec->dir.DirID); in hfs_read_inode()
361 inode->i_size = be16_to_cpu(rec->dir.Val) + 2; in hfs_read_inode()
365 timespec_to_timespec64(hfs_m_to_utime(rec->dir.MdDat)); in hfs_read_inode()
384 struct inode *hfs_iget(struct super_block *sb, struct hfs_cat_key *key, hfs_cat_rec *rec) in hfs_iget() argument
386 struct hfs_iget_data data = { key, rec }; in hfs_iget()
390 switch (rec->type) { in hfs_iget()
392 cnid = be32_to_cpu(rec->dir.DirID); in hfs_iget()
395 cnid = be32_to_cpu(rec->file.FlNum); in hfs_iget()
422 hfs_cat_rec rec; in hfs_write_inode() local
464 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
466 if (rec.type != HFS_CDR_DIR || in hfs_write_inode()
467 be32_to_cpu(rec.dir.DirID) != inode->i_ino) { in hfs_write_inode()
470 rec.dir.MdDat = hfs_u_to_mtime(inode->i_mtime); in hfs_write_inode()
471 rec.dir.Val = cpu_to_be16(inode->i_size - 2); in hfs_write_inode()
473 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
476 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
478 hfs_inode_write_fork(inode, rec.file.RExtRec, in hfs_write_inode()
479 &rec.file.RLgLen, &rec.file.RPyLen); in hfs_write_inode()
480 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
485 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
487 if (rec.type != HFS_CDR_FIL || in hfs_write_inode()
488 be32_to_cpu(rec.file.FlNum) != inode->i_ino) { in hfs_write_inode()
492 rec.file.Flags &= ~HFS_FIL_LOCK; in hfs_write_inode()
494 rec.file.Flags |= HFS_FIL_LOCK; in hfs_write_inode()
495 hfs_inode_write_fork(inode, rec.file.ExtRec, &rec.file.LgLen, &rec.file.PyLen); in hfs_write_inode()
496 rec.file.MdDat = hfs_u_to_mtime(inode->i_mtime); in hfs_write_inode()
498 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
510 hfs_cat_rec rec; in hfs_file_lookup() local
531 res = hfs_brec_read(&fd, &rec, sizeof(rec)); in hfs_file_lookup()
533 struct hfs_iget_data idata = { NULL, &rec }; in hfs_file_lookup()