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
466 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
468 if (rec.type != HFS_CDR_DIR || in hfs_write_inode()
469 be32_to_cpu(rec.dir.DirID) != inode->i_ino) { in hfs_write_inode()
472 rec.dir.MdDat = hfs_u_to_mtime(inode->i_mtime); in hfs_write_inode()
473 rec.dir.Val = cpu_to_be16(inode->i_size - 2); in hfs_write_inode()
475 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
480 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
482 hfs_inode_write_fork(inode, rec.file.RExtRec, in hfs_write_inode()
483 &rec.file.RLgLen, &rec.file.RPyLen); in hfs_write_inode()
484 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
489 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
491 if (rec.type != HFS_CDR_FIL || in hfs_write_inode()
492 be32_to_cpu(rec.file.FlNum) != inode->i_ino) { in hfs_write_inode()
496 rec.file.Flags &= ~HFS_FIL_LOCK; in hfs_write_inode()
498 rec.file.Flags |= HFS_FIL_LOCK; in hfs_write_inode()
499 hfs_inode_write_fork(inode, rec.file.ExtRec, &rec.file.LgLen, &rec.file.PyLen); in hfs_write_inode()
500 rec.file.MdDat = hfs_u_to_mtime(inode->i_mtime); in hfs_write_inode()
502 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode()
515 hfs_cat_rec rec; in hfs_file_lookup() local
536 res = hfs_brec_read(&fd, &rec, sizeof(rec)); in hfs_file_lookup()
538 struct hfs_iget_data idata = { NULL, &rec }; in hfs_file_lookup()