Lines Matching refs:fibh

47 	struct fileIdentDesc *sfi, struct udf_fileident_bh *fibh,  in udf_write_fi()  argument
50 uint16_t crclen = fibh->eoffset - fibh->soffset - sizeof(tag); in udf_write_fi()
57 int padlen = fibh->eoffset - fibh->soffset - liu - lfi - in udf_write_fi()
60 offset = fibh->soffset + sizeof(struct fileIdentDesc); in udf_write_fi()
67 memcpy(fibh->ebh->b_data + offset, impuse, liu); in udf_write_fi()
71 memcpy(fibh->ebh->b_data, impuse - offset, liu + offset); in udf_write_fi()
82 memcpy(fibh->ebh->b_data + offset, fileident, lfi); in udf_write_fi()
86 memcpy(fibh->ebh->b_data, fileident - offset, lfi + offset); in udf_write_fi()
95 memset(fibh->ebh->b_data + offset, 0x00, padlen); in udf_write_fi()
99 memset(fibh->ebh->b_data, 0x00, padlen + offset); in udf_write_fi()
105 if (fibh->sbh == fibh->ebh) in udf_write_fi()
108 else if (sizeof(struct fileIdentDesc) >= -fibh->soffset) in udf_write_fi()
109 crc = udf_crc(fibh->ebh->b_data + sizeof(struct fileIdentDesc) + fibh->soffset, in udf_write_fi()
114 -fibh->soffset - sizeof(struct fileIdentDesc), crc); in udf_write_fi()
115 crc = udf_crc(fibh->ebh->b_data, fibh->eoffset, crc); in udf_write_fi()
126 if (sizeof(struct fileIdentDesc) <= -fibh->soffset) in udf_write_fi()
130 memcpy((uint8_t *)sfi, (uint8_t *)cfi, -fibh->soffset); in udf_write_fi()
131 memcpy(fibh->ebh->b_data, (uint8_t *)cfi - fibh->soffset, in udf_write_fi()
132 sizeof(struct fileIdentDesc) + fibh->soffset); in udf_write_fi()
135 if (fibh->sbh != fibh->ebh) in udf_write_fi()
136 mark_buffer_dirty_inode(fibh->ebh, inode); in udf_write_fi()
137 mark_buffer_dirty_inode(fibh->sbh, inode); in udf_write_fi()
143 struct udf_fileident_bh *fibh, in udf_find_entry() argument
163 fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2; in udf_find_entry()
185 if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block))) in udf_find_entry()
193 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh); in udf_find_entry()
197 if (fibh->sbh != fibh->ebh) in udf_find_entry()
198 udf_release_data(fibh->ebh); in udf_find_entry()
199 udf_release_data(fibh->sbh); in udf_find_entry()
207 if (fibh->sbh == fibh->ebh) in udf_find_entry()
215 poffset = fibh->soffset + sizeof(struct fileIdentDesc) + liu + lfi; in udf_find_entry()
218 nameptr = (uint8_t *)(fibh->ebh->b_data + poffset - lfi); in udf_find_entry()
223 memcpy(nameptr + lfi - poffset, fibh->ebh->b_data, poffset); in udf_find_entry()
251 if (fibh->sbh != fibh->ebh) in udf_find_entry()
252 udf_release_data(fibh->ebh); in udf_find_entry()
253 udf_release_data(fibh->sbh); in udf_find_entry()
295 struct udf_fileident_bh fibh; in udf_lookup() local
312 if ((fi = udf_find_entry(dir, dentry, &fibh, &cfi))) in udf_lookup()
314 if (fibh.sbh != fibh.ebh) in udf_lookup()
315 udf_release_data(fibh.ebh); in udf_lookup()
316 udf_release_data(fibh.sbh); in udf_lookup()
328 struct udf_fileident_bh *fibh, in udf_add_entry() argument
390 fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2; in udf_add_entry()
406 if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block))) in udf_add_entry()
417 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh); in udf_add_entry()
421 if (fibh->sbh != fibh->ebh) in udf_add_entry()
422 udf_release_data(fibh->ebh); in udf_add_entry()
423 udf_release_data(fibh->sbh); in udf_add_entry()
432 if (fibh->sbh == fibh->ebh) in udf_add_entry()
438 poffset = fibh->soffset + sizeof(struct fileIdentDesc) + liu + lfi; in udf_add_entry()
441 nameptr = (char *)(fibh->ebh->b_data + poffset - lfi); in udf_add_entry()
446 memcpy(nameptr + lfi - poffset, fibh->ebh->b_data, poffset); in udf_add_entry()
460 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name)) in udf_add_entry()
476 if (fibh->sbh != fibh->ebh) in udf_add_entry()
477 udf_release_data(fibh->ebh); in udf_add_entry()
478 udf_release_data(fibh->sbh); in udf_add_entry()
490 fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block); in udf_add_entry()
491 fibh->soffset = fibh->eoffset = udf_file_entry_alloc_offset(dir); in udf_add_entry()
495 fibh->sbh = fibh->ebh = NULL; in udf_add_entry()
496 fibh->soffset = fibh->eoffset = sb->s_blocksize; in udf_add_entry()
503 sb->s_blocksize - fibh->eoffset < nfidlen) in udf_add_entry()
507 fibh->soffset -= udf_ext0_offset(dir); in udf_add_entry()
508 fibh->eoffset -= udf_ext0_offset(dir); in udf_add_entry()
510 if (fibh->sbh != fibh->ebh) in udf_add_entry()
511 udf_release_data(fibh->ebh); in udf_add_entry()
512 udf_release_data(fibh->sbh); in udf_add_entry()
513 if (!(fibh->sbh = fibh->ebh = udf_expand_dir_adinicb(dir, &block, err))) in udf_add_entry()
526 if (sb->s_blocksize - fibh->eoffset >= nfidlen) in udf_add_entry()
528 fibh->soffset = fibh->eoffset; in udf_add_entry()
529 fibh->eoffset += nfidlen; in udf_add_entry()
530 if (fibh->sbh != fibh->ebh) in udf_add_entry()
532 udf_release_data(fibh->sbh); in udf_add_entry()
533 fibh->sbh = fibh->ebh; in udf_add_entry()
542 fi = (struct fileIdentDesc *)(fibh->sbh->b_data + fibh->soffset); in udf_add_entry()
546 fibh->soffset = fibh->eoffset - sb->s_blocksize; in udf_add_entry()
547 fibh->eoffset += nfidlen - sb->s_blocksize; in udf_add_entry()
548 if (fibh->sbh != fibh->ebh) in udf_add_entry()
550 udf_release_data(fibh->sbh); in udf_add_entry()
551 fibh->sbh = fibh->ebh; in udf_add_entry()
557 if (!(fibh->ebh = udf_bread(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2), 1, err))) in udf_add_entry()
560 udf_release_data(fibh->sbh); in udf_add_entry()
564 if (!(fibh->soffset)) in udf_add_entry()
575 udf_release_data(fibh->sbh); in udf_add_entry()
576 fibh->sbh = fibh->ebh; in udf_add_entry()
577 fi = (struct fileIdentDesc *)(fibh->sbh->b_data); in udf_add_entry()
582 (fibh->sbh->b_data + sb->s_blocksize + fibh->soffset); in udf_add_entry()
594 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name)) in udf_add_entry()
607 if (fibh->sbh != fibh->ebh) in udf_add_entry()
608 udf_release_data(fibh->ebh); in udf_add_entry()
609 udf_release_data(fibh->sbh); in udf_add_entry()
616 struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) in udf_delete_entry() argument
621 return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); in udf_delete_entry()
626 struct udf_fileident_bh fibh; in udf_create() local
644 if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err))) in udf_create()
655 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); in udf_create()
661 if (fibh.sbh != fibh.ebh) in udf_create()
662 udf_release_data(fibh.ebh); in udf_create()
663 udf_release_data(fibh.sbh); in udf_create()
671 struct udf_fileident_bh fibh; in udf_mknod() local
682 if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err))) in udf_mknod()
693 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); in udf_mknod()
701 if (fibh.sbh != fibh.ebh) in udf_mknod()
702 udf_release_data(fibh.ebh); in udf_mknod()
703 udf_release_data(fibh.sbh); in udf_mknod()
713 struct udf_fileident_bh fibh; in udf_mkdir() local
728 if (!(fi = udf_add_entry(inode, NULL, &fibh, &cfi, &err))) in udf_mkdir()
741 udf_write_fi(inode, &cfi, fi, &fibh, NULL, NULL); in udf_mkdir()
742 udf_release_data(fibh.sbh); in udf_mkdir()
748 if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err))) in udf_mkdir()
760 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); in udf_mkdir()
765 if (fibh.sbh != fibh.ebh) in udf_mkdir()
766 udf_release_data(fibh.ebh); in udf_mkdir()
767 udf_release_data(fibh.sbh); in udf_mkdir()
776 struct udf_fileident_bh fibh; in empty_dir() local
786 fibh.soffset = fibh.eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2; in empty_dir()
808 if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block))) in empty_dir()
813 fi = udf_fileident_read(dir, &f_pos, &fibh, &cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh); in empty_dir()
817 if (fibh.sbh != fibh.ebh) in empty_dir()
818 udf_release_data(fibh.ebh); in empty_dir()
819 udf_release_data(fibh.sbh); in empty_dir()
830 if (fibh.sbh != fibh.ebh) in empty_dir()
831 udf_release_data(fibh.ebh); in empty_dir()
832 udf_release_data(fibh.sbh); in empty_dir()
841 struct udf_fileident_bh fibh; in udf_rmdir() local
845 fi = udf_find_entry(dir, dentry, &fibh, &cfi); in udf_rmdir()
855 retval = udf_delete_entry(dir, fi, &fibh, &cfi); in udf_rmdir()
873 if (fibh.sbh != fibh.ebh) in udf_rmdir()
874 udf_release_data(fibh.ebh); in udf_rmdir()
875 udf_release_data(fibh.sbh); in udf_rmdir()
884 struct udf_fileident_bh fibh; in udf_unlink() local
889 fi = udf_find_entry(dir, dentry, &fibh, &cfi); in udf_unlink()
907 retval = udf_delete_entry(dir, fi, &fibh, &cfi); in udf_unlink()
919 if (fibh.sbh != fibh.ebh) in udf_unlink()
920 udf_release_data(fibh.ebh); in udf_unlink()
921 udf_release_data(fibh.sbh); in udf_unlink()
931 struct udf_fileident_bh fibh; in udf_symlink() local
1054 if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err))) in udf_symlink()
1071 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); in udf_symlink()
1077 if (fibh.sbh != fibh.ebh) in udf_symlink()
1078 udf_release_data(fibh.ebh); in udf_symlink()
1079 udf_release_data(fibh.sbh); in udf_symlink()
1097 struct udf_fileident_bh fibh; in udf_link() local
1107 if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err))) in udf_link()
1124 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); in udf_link()
1130 if (fibh.sbh != fibh.ebh) in udf_link()
1131 udf_release_data(fibh.ebh); in udf_link()
1132 udf_release_data(fibh.sbh); in udf_link()