Searched refs:fibh (Results 1 - 3 of 3) sorted by relevance

/linux-4.1.27/fs/udf/
H A Ddirectory.c21 struct udf_fileident_bh *fibh, udf_fileident_read()
32 fibh->soffset = fibh->eoffset; udf_fileident_read()
40 &(fibh->eoffset)); udf_fileident_read()
44 *nf_pos += fibh->eoffset - fibh->soffset; udf_fileident_read()
52 if (fibh->eoffset == dir->i_sb->s_blocksize) { udf_fileident_read()
69 brelse(fibh->sbh); udf_fileident_read()
70 fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block); udf_fileident_read()
71 if (!fibh->sbh) udf_fileident_read()
73 fibh->soffset = fibh->eoffset = 0; udf_fileident_read()
95 } else if (fibh->sbh != fibh->ebh) { udf_fileident_read()
96 brelse(fibh->sbh); udf_fileident_read()
97 fibh->sbh = fibh->ebh; udf_fileident_read()
100 fi = udf_get_fileident(fibh->sbh->b_data, dir->i_sb->s_blocksize, udf_fileident_read()
101 &(fibh->eoffset)); udf_fileident_read()
106 *nf_pos += fibh->eoffset - fibh->soffset; udf_fileident_read()
108 if (fibh->eoffset <= dir->i_sb->s_blocksize) { udf_fileident_read()
111 } else if (fibh->eoffset > dir->i_sb->s_blocksize) { udf_fileident_read()
127 fibh->soffset -= dir->i_sb->s_blocksize; udf_fileident_read()
128 fibh->eoffset -= dir->i_sb->s_blocksize; udf_fileident_read()
130 fibh->ebh = udf_tread(dir->i_sb, block); udf_fileident_read()
131 if (!fibh->ebh) udf_fileident_read()
134 if (sizeof(struct fileIdentDesc) > -fibh->soffset) { udf_fileident_read()
137 memcpy((uint8_t *)cfi, (uint8_t *)fi, -fibh->soffset); udf_fileident_read()
138 memcpy((uint8_t *)cfi - fibh->soffset, udf_fileident_read()
139 fibh->ebh->b_data, udf_fileident_read()
140 sizeof(struct fileIdentDesc) + fibh->soffset); udf_fileident_read()
146 *nf_pos += fi_len - (fibh->eoffset - fibh->soffset); udf_fileident_read()
147 fibh->eoffset = fibh->soffset + fi_len; udf_fileident_read()
20 udf_fileident_read(struct inode *dir, loff_t *nf_pos, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t *elen, sector_t *offset) udf_fileident_read() argument
H A Dnamei.c44 struct fileIdentDesc *sfi, struct udf_fileident_bh *fibh, udf_write_fi()
47 uint16_t crclen = fibh->eoffset - fibh->soffset - sizeof(struct tag); udf_write_fi()
52 int padlen = fibh->eoffset - fibh->soffset - liu - lfi - udf_write_fi()
59 offset = fibh->soffset + sizeof(struct fileIdentDesc); udf_write_fi()
65 memcpy(fibh->ebh->b_data + offset, impuse, liu); udf_write_fi()
68 memcpy(fibh->ebh->b_data, impuse - offset, udf_write_fi()
79 memcpy(fibh->ebh->b_data + offset, fileident, lfi); udf_write_fi()
83 memcpy(fibh->ebh->b_data, fileident - offset, udf_write_fi()
93 memset(fibh->ebh->b_data + offset, 0x00, padlen); udf_write_fi()
96 memset(fibh->ebh->b_data, 0x00, padlen + offset); udf_write_fi()
102 if (fibh->sbh == fibh->ebh) { udf_write_fi()
106 } else if (sizeof(struct fileIdentDesc) >= -fibh->soffset) { udf_write_fi()
107 crc = crc_itu_t(crc, fibh->ebh->b_data + udf_write_fi()
109 fibh->soffset, udf_write_fi()
114 -fibh->soffset - sizeof(struct fileIdentDesc)); udf_write_fi()
115 crc = crc_itu_t(crc, fibh->ebh->b_data, fibh->eoffset); udf_write_fi()
122 if (adinicb || (sizeof(struct fileIdentDesc) <= -fibh->soffset)) { udf_write_fi()
126 memcpy((uint8_t *)sfi, (uint8_t *)cfi, -fibh->soffset); udf_write_fi()
127 memcpy(fibh->ebh->b_data, (uint8_t *)cfi - fibh->soffset, udf_write_fi()
128 sizeof(struct fileIdentDesc) + fibh->soffset); udf_write_fi()
134 if (fibh->sbh != fibh->ebh) udf_write_fi()
135 mark_buffer_dirty_inode(fibh->ebh, inode); udf_write_fi()
136 mark_buffer_dirty_inode(fibh->sbh, inode); udf_write_fi()
143 struct udf_fileident_bh *fibh, udf_find_entry()
166 fibh->sbh = fibh->ebh = NULL; udf_find_entry()
167 fibh->soffset = fibh->eoffset = f_pos & (sb->s_blocksize - 1); udf_find_entry()
181 fibh->sbh = fibh->ebh = udf_tread(sb, block); udf_find_entry()
182 if (!fibh->sbh) udf_find_entry()
191 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, udf_find_entry()
199 if (fibh->sbh == fibh->ebh) { udf_find_entry()
204 poffset = fibh->soffset + sizeof(struct fileIdentDesc) + udf_find_entry()
208 nameptr = (uint8_t *)(fibh->ebh->b_data + udf_find_entry()
215 fibh->ebh->b_data, poffset); udf_find_entry()
243 if (fibh->sbh != fibh->ebh) udf_find_entry()
244 brelse(fibh->ebh); udf_find_entry()
245 brelse(fibh->sbh); udf_find_entry()
258 struct udf_fileident_bh fibh; udf_lookup() local
278 if (udf_find_entry(dir, &dentry->d_name, &fibh, &cfi)) { udf_lookup()
281 if (fibh.sbh != fibh.ebh) udf_lookup()
282 brelse(fibh.ebh); udf_lookup()
283 brelse(fibh.sbh); udf_lookup()
296 struct udf_fileident_bh *fibh, udf_add_entry()
315 fibh->sbh = fibh->ebh = NULL; udf_add_entry()
341 fibh->soffset = fibh->eoffset = f_pos & (dir->i_sb->s_blocksize - 1); udf_add_entry()
348 fibh->soffset = fibh->eoffset = sb->s_blocksize; udf_add_entry()
360 fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block); udf_add_entry()
361 if (!fibh->sbh) { udf_add_entry()
370 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, udf_add_entry()
389 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, udf_add_entry()
404 sb->s_blocksize - fibh->eoffset < nfidlen) { udf_add_entry()
407 fibh->soffset -= udf_ext0_offset(dir); udf_add_entry()
408 fibh->eoffset -= udf_ext0_offset(dir); udf_add_entry()
410 if (fibh->sbh != fibh->ebh) udf_add_entry()
411 brelse(fibh->ebh); udf_add_entry()
412 brelse(fibh->sbh); udf_add_entry()
413 fibh->sbh = fibh->ebh = udf_add_entry()
415 if (!fibh->sbh) udf_add_entry()
424 if (sb->s_blocksize - fibh->eoffset >= nfidlen) { udf_add_entry()
425 fibh->soffset = fibh->eoffset; udf_add_entry()
426 fibh->eoffset += nfidlen; udf_add_entry()
427 if (fibh->sbh != fibh->ebh) { udf_add_entry()
428 brelse(fibh->sbh); udf_add_entry()
429 fibh->sbh = fibh->ebh; udf_add_entry()
436 fibh->soffset - udf_add_entry()
444 (fibh->sbh->b_data + fibh->soffset); udf_add_entry()
457 fibh->soffset = fibh->eoffset - sb->s_blocksize; udf_add_entry()
458 fibh->eoffset += nfidlen - sb->s_blocksize; udf_add_entry()
459 if (fibh->sbh != fibh->ebh) { udf_add_entry()
460 brelse(fibh->sbh); udf_add_entry()
461 fibh->sbh = fibh->ebh; udf_add_entry()
466 fibh->ebh = udf_bread(dir, udf_add_entry()
468 if (!fibh->ebh) udf_add_entry()
476 if (!fibh->soffset) { udf_add_entry()
483 brelse(fibh->sbh); udf_add_entry()
484 fibh->sbh = fibh->ebh; udf_add_entry()
485 fi = (struct fileIdentDesc *)(fibh->sbh->b_data); udf_add_entry()
488 (fibh->sbh->b_data + sb->s_blocksize + udf_add_entry()
489 fibh->soffset); udf_add_entry()
503 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name)) { udf_add_entry()
530 if (fibh->sbh != fibh->ebh) udf_add_entry()
531 brelse(fibh->ebh); udf_add_entry()
532 brelse(fibh->sbh); udf_add_entry()
540 struct udf_fileident_bh *fibh, udf_delete_entry()
548 return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); udf_delete_entry()
555 struct udf_fileident_bh fibh; udf_add_nondir() local
559 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_add_nondir()
570 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_add_nondir()
573 if (fibh.sbh != fibh.ebh) udf_add_nondir()
574 brelse(fibh.ebh); udf_add_nondir()
575 brelse(fibh.sbh); udf_add_nondir()
639 struct udf_fileident_bh fibh; udf_mkdir() local
652 fi = udf_add_entry(inode, NULL, &fibh, &cfi, &err); udf_mkdir()
666 udf_write_fi(inode, &cfi, fi, &fibh, NULL, NULL); udf_mkdir()
667 brelse(fibh.sbh); udf_mkdir()
670 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_mkdir()
683 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_mkdir()
689 if (fibh.sbh != fibh.ebh) udf_mkdir()
690 brelse(fibh.ebh); udf_mkdir()
691 brelse(fibh.sbh); udf_mkdir()
701 struct udf_fileident_bh fibh; empty_dir() local
712 fibh.soffset = fibh.eoffset = f_pos & (dir->i_sb->s_blocksize - 1); empty_dir()
715 fibh.sbh = fibh.ebh = NULL; empty_dir()
728 fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block); empty_dir()
729 if (!fibh.sbh) { empty_dir()
739 fi = udf_fileident_read(dir, &f_pos, &fibh, &cfi, &epos, &eloc, empty_dir()
742 if (fibh.sbh != fibh.ebh) empty_dir()
743 brelse(fibh.ebh); empty_dir()
744 brelse(fibh.sbh); empty_dir()
751 if (fibh.sbh != fibh.ebh) empty_dir()
752 brelse(fibh.ebh); empty_dir()
753 brelse(fibh.sbh); empty_dir()
759 if (fibh.sbh != fibh.ebh) empty_dir()
760 brelse(fibh.ebh); empty_dir()
761 brelse(fibh.sbh); empty_dir()
771 struct udf_fileident_bh fibh; udf_rmdir() local
776 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); udf_rmdir()
787 retval = udf_delete_entry(dir, fi, &fibh, &cfi); udf_rmdir()
801 if (fibh.sbh != fibh.ebh) udf_rmdir()
802 brelse(fibh.ebh); udf_rmdir()
803 brelse(fibh.sbh); udf_rmdir()
813 struct udf_fileident_bh fibh; udf_unlink() local
819 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); udf_unlink()
833 retval = udf_delete_entry(dir, fi, &fibh, &cfi); udf_unlink()
843 if (fibh.sbh != fibh.ebh) udf_unlink()
844 brelse(fibh.ebh); udf_unlink()
845 brelse(fibh.sbh); udf_unlink()
1003 struct udf_fileident_bh fibh; udf_link() local
1007 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_link()
1017 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_link()
1021 if (fibh.sbh != fibh.ebh) udf_link()
1022 brelse(fibh.ebh); udf_link()
1023 brelse(fibh.sbh); udf_link()
1180 struct udf_fileident_bh fibh; udf_get_parent() local
1182 if (!udf_find_entry(d_inode(child), &dotdot, &fibh, &cfi)) udf_get_parent()
1185 if (fibh.sbh != fibh.ebh) udf_get_parent()
1186 brelse(fibh.ebh); udf_get_parent()
1187 brelse(fibh.sbh); udf_get_parent()
43 udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi, struct fileIdentDesc *sfi, struct udf_fileident_bh *fibh, uint8_t *impuse, uint8_t *fileident) udf_write_fi() argument
141 udf_find_entry(struct inode *dir, const struct qstr *child, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) udf_find_entry() argument
294 udf_add_entry(struct inode *dir, struct dentry *dentry, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi, int *err) udf_add_entry() argument
539 udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) udf_delete_entry() argument
H A Ddir.c42 struct udf_fileident_bh fibh = { .sbh = NULL, .ebh = NULL}; udf_readdir() local
79 fibh.soffset = fibh.eoffset = nf_pos & (sb->s_blocksize - 1); udf_readdir()
98 if (!(fibh.sbh = fibh.ebh = udf_tread(sb, block))) { udf_readdir()
128 fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &epos, &eloc, udf_readdir()
136 if (fibh.sbh == fibh.ebh) { udf_readdir()
141 poffset = fibh.soffset + sizeof(struct fileIdentDesc) + liu + lfi; udf_readdir()
144 nameptr = (char *)(fibh.ebh->b_data + poffset - lfi); udf_readdir()
150 fibh.ebh->b_data, poffset); udf_readdir()
183 if (fibh.sbh != fibh.ebh) udf_readdir()
184 brelse(fibh.ebh); udf_readdir()
185 brelse(fibh.sbh); udf_readdir()

Completed in 112 milliseconds