Lines Matching refs:sfep

23 				     xfs_dir2_sf_entry_t *sfep,
60 struct xfs_dir2_sf_entry *sfep) in xfs_dir2_sf_nextentry() argument
62 return (void *)sfep + xfs_dir2_sf_entsize(mp, hdr, sfep->namelen); in xfs_dir2_sf_nextentry()
75 struct xfs_dir2_sf_entry *sfep) in xfs_dir2_sf_get_ino() argument
77 uint8_t *from = sfep->name + sfep->namelen; in xfs_dir2_sf_get_ino()
91 struct xfs_dir2_sf_entry *sfep, in xfs_dir2_sf_put_ino() argument
94 uint8_t *to = sfep->name + sfep->namelen; in xfs_dir2_sf_put_ino()
136 struct xfs_dir2_sf_entry *sfep) in xfs_dir2_sf_get_ftype() argument
139 uint8_t ftype = sfep->name[sfep->namelen]; in xfs_dir2_sf_get_ftype()
151 struct xfs_dir2_sf_entry *sfep, in xfs_dir2_sf_put_ftype() argument
157 sfep->name[sfep->namelen] = ftype; in xfs_dir2_sf_put_ftype()
267 struct xfs_dir2_sf_entry *sfep; /* shortform entry */ in xfs_dir2_block_to_sf() local
287 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_block_to_sf()
316 sfep->namelen = dep->namelen; in xfs_dir2_block_to_sf()
317 xfs_dir2_sf_put_offset(sfep, offset); in xfs_dir2_block_to_sf()
318 memcpy(sfep->name, dep->name, dep->namelen); in xfs_dir2_block_to_sf()
319 xfs_dir2_sf_put_ino(mp, sfp, sfep, in xfs_dir2_block_to_sf()
321 xfs_dir2_sf_put_ftype(mp, sfep, in xfs_dir2_block_to_sf()
324 sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep); in xfs_dir2_block_to_sf()
328 ASSERT((char *)sfep - (char *)sfp == size); in xfs_dir2_block_to_sf()
375 xfs_dir2_sf_entry_t *sfep = NULL; /* shortform entry */ in xfs_dir2_sf_addname() local
411 xfs_dir2_sf_addname_pick(args, objchange, &sfep, &offset)) == 0) { in xfs_dir2_sf_addname()
434 xfs_dir2_sf_addname_easy(args, sfep, offset, new_isize); in xfs_dir2_sf_addname()
459 xfs_dir2_sf_entry_t *sfep, /* pointer to new entry */ in xfs_dir2_sf_addname_easy() argument
469 byteoff = (int)((char *)sfep - (char *)sfp); in xfs_dir2_sf_addname_easy()
479 sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + byteoff); in xfs_dir2_sf_addname_easy()
483 sfep->namelen = args->namelen; in xfs_dir2_sf_addname_easy()
484 xfs_dir2_sf_put_offset(sfep, offset); in xfs_dir2_sf_addname_easy()
485 memcpy(sfep->name, args->name, sfep->namelen); in xfs_dir2_sf_addname_easy()
486 xfs_dir2_sf_put_ino(mp, sfp, sfep, args->inumber); in xfs_dir2_sf_addname_easy()
487 xfs_dir2_sf_put_ftype(mp, sfep, args->filetype); in xfs_dir2_sf_addname_easy()
525 xfs_dir2_sf_entry_t *sfep; /* entry in new dir */ in xfs_dir2_sf_addname_hard() local
569 sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + nbytes); in xfs_dir2_sf_addname_hard()
573 sfep->namelen = args->namelen; in xfs_dir2_sf_addname_hard()
574 xfs_dir2_sf_put_offset(sfep, offset); in xfs_dir2_sf_addname_hard()
575 memcpy(sfep->name, args->name, sfep->namelen); in xfs_dir2_sf_addname_hard()
576 xfs_dir2_sf_put_ino(mp, sfp, sfep, args->inumber); in xfs_dir2_sf_addname_hard()
577 xfs_dir2_sf_put_ftype(mp, sfep, args->filetype); in xfs_dir2_sf_addname_hard()
585 sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep); in xfs_dir2_sf_addname_hard()
586 memcpy(sfep, oldsfep, old_isize - nbytes); in xfs_dir2_sf_addname_hard()
612 xfs_dir2_sf_entry_t *sfep; /* shortform entry */ in xfs_dir2_sf_addname_pick() local
620 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_addname_pick()
629 holefit = offset + size <= xfs_dir2_sf_get_offset(sfep); in xfs_dir2_sf_addname_pick()
630 offset = xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_addname_pick()
631 xfs_dir2_data_entsize(mp, sfep->namelen); in xfs_dir2_sf_addname_pick()
632 sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep); in xfs_dir2_sf_addname_pick()
661 *sfepp = sfep; in xfs_dir2_sf_addname_pick()
680 xfs_dir2_sf_entry_t *sfep; /* shortform dir entry */ in xfs_dir2_sf_check() local
688 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_check()
690 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep)) { in xfs_dir2_sf_check()
691 ASSERT(xfs_dir2_sf_get_offset(sfep) >= offset); in xfs_dir2_sf_check()
692 ino = xfs_dir2_sf_get_ino(mp, sfp, sfep); in xfs_dir2_sf_check()
695 xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_check()
696 xfs_dir2_data_entsize(mp, sfep->namelen); in xfs_dir2_sf_check()
697 ASSERT(xfs_dir2_sf_get_ftype(mp, sfep) < XFS_DIR3_FT_MAX); in xfs_dir2_sf_check()
700 ASSERT((char *)sfep - (char *)sfp == dp->i_disk_size); in xfs_dir2_sf_check()
715 struct xfs_dir2_sf_entry *sfep; in xfs_dir2_sf_verify() local
749 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_verify()
756 if (((char *)sfep + sizeof(*sfep)) >= endp) in xfs_dir2_sf_verify()
760 if (sfep->namelen == 0) in xfs_dir2_sf_verify()
768 next_sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep); in xfs_dir2_sf_verify()
773 if (xfs_dir2_sf_get_offset(sfep) < offset) in xfs_dir2_sf_verify()
777 ino = xfs_dir2_sf_get_ino(mp, sfp, sfep); in xfs_dir2_sf_verify()
784 filetype = xfs_dir2_sf_get_ftype(mp, sfep); in xfs_dir2_sf_verify()
788 offset = xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_verify()
789 xfs_dir2_data_entsize(mp, sfep->namelen); in xfs_dir2_sf_verify()
791 sfep = next_sfep; in xfs_dir2_sf_verify()
795 if ((void *)sfep != (void *)endp) in xfs_dir2_sf_verify()
868 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_lookup() local
906 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_lookup()
907 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep)) { in xfs_dir2_sf_lookup()
913 cmp = xfs_dir2_compname(args, sfep->name, sfep->namelen); in xfs_dir2_sf_lookup()
916 args->inumber = xfs_dir2_sf_get_ino(mp, sfp, sfep); in xfs_dir2_sf_lookup()
917 args->filetype = xfs_dir2_sf_get_ftype(mp, sfep); in xfs_dir2_sf_lookup()
920 ci_sfep = sfep; in xfs_dir2_sf_lookup()
948 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_removename() local
964 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_removename()
965 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep)) { in xfs_dir2_sf_removename()
966 if (xfs_da_compname(args, sfep->name, sfep->namelen) == in xfs_dir2_sf_removename()
968 ASSERT(xfs_dir2_sf_get_ino(mp, sfp, sfep) == in xfs_dir2_sf_removename()
981 byteoff = (int)((char *)sfep - (char *)sfp); in xfs_dir2_sf_removename()
1047 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_replace() local
1097 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_replace()
1098 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep)) { in xfs_dir2_sf_replace()
1099 if (xfs_da_compname(args, sfep->name, sfep->namelen) == in xfs_dir2_sf_replace()
1101 ino = xfs_dir2_sf_get_ino(mp, sfp, sfep); in xfs_dir2_sf_replace()
1103 xfs_dir2_sf_put_ino(mp, sfp, sfep, in xfs_dir2_sf_replace()
1105 xfs_dir2_sf_put_ftype(mp, sfep, args->filetype); in xfs_dir2_sf_replace()
1166 xfs_dir2_sf_entry_t *sfep; /* new sf entry */ in xfs_dir2_sf_toino4() local
1201 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp), in xfs_dir2_sf_toino4()
1204 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep), in xfs_dir2_sf_toino4()
1206 sfep->namelen = oldsfep->namelen; in xfs_dir2_sf_toino4()
1207 memcpy(sfep->offset, oldsfep->offset, sizeof(sfep->offset)); in xfs_dir2_sf_toino4()
1208 memcpy(sfep->name, oldsfep->name, sfep->namelen); in xfs_dir2_sf_toino4()
1209 xfs_dir2_sf_put_ino(mp, sfp, sfep, in xfs_dir2_sf_toino4()
1211 xfs_dir2_sf_put_ftype(mp, sfep, in xfs_dir2_sf_toino4()
1239 xfs_dir2_sf_entry_t *sfep; /* new sf entry */ in xfs_dir2_sf_toino8() local
1274 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp), in xfs_dir2_sf_toino8()
1277 i++, sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep), in xfs_dir2_sf_toino8()
1279 sfep->namelen = oldsfep->namelen; in xfs_dir2_sf_toino8()
1280 memcpy(sfep->offset, oldsfep->offset, sizeof(sfep->offset)); in xfs_dir2_sf_toino8()
1281 memcpy(sfep->name, oldsfep->name, sfep->namelen); in xfs_dir2_sf_toino8()
1282 xfs_dir2_sf_put_ino(mp, sfp, sfep, in xfs_dir2_sf_toino8()
1284 xfs_dir2_sf_put_ftype(mp, sfep, in xfs_dir2_sf_toino8()