Lines Matching refs:sfep
26 xfs_dir2_sf_entry_t *sfep,
155 xfs_dir2_sf_entry_t *sfep; /* shortform entry */ in xfs_dir2_block_to_sf() local
184 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_block_to_sf()
215 sfep->namelen = dep->namelen; in xfs_dir2_block_to_sf()
216 xfs_dir2_sf_put_offset(sfep, in xfs_dir2_block_to_sf()
219 memcpy(sfep->name, dep->name, dep->namelen); in xfs_dir2_block_to_sf()
220 dp->d_ops->sf_put_ino(sfp, sfep, in xfs_dir2_block_to_sf()
222 dp->d_ops->sf_put_ftype(sfep, in xfs_dir2_block_to_sf()
225 sfep = dp->d_ops->sf_nextentry(sfp, sfep); in xfs_dir2_block_to_sf()
229 ASSERT((char *)sfep - (char *)sfp == size); in xfs_dir2_block_to_sf()
276 xfs_dir2_sf_entry_t *sfep = NULL; /* shortform entry */ in xfs_dir2_sf_addname() local
318 xfs_dir2_sf_addname_pick(args, objchange, &sfep, &offset)) == 0) { in xfs_dir2_sf_addname()
341 xfs_dir2_sf_addname_easy(args, sfep, offset, new_isize); in xfs_dir2_sf_addname()
366 xfs_dir2_sf_entry_t *sfep, /* pointer to new entry */ in xfs_dir2_sf_addname_easy() argument
377 byteoff = (int)((char *)sfep - (char *)sfp); in xfs_dir2_sf_addname_easy()
387 sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + byteoff); in xfs_dir2_sf_addname_easy()
391 sfep->namelen = args->namelen; in xfs_dir2_sf_addname_easy()
392 xfs_dir2_sf_put_offset(sfep, offset); in xfs_dir2_sf_addname_easy()
393 memcpy(sfep->name, args->name, sfep->namelen); in xfs_dir2_sf_addname_easy()
394 dp->d_ops->sf_put_ino(sfp, sfep, args->inumber); in xfs_dir2_sf_addname_easy()
395 dp->d_ops->sf_put_ftype(sfep, args->filetype); in xfs_dir2_sf_addname_easy()
432 xfs_dir2_sf_entry_t *sfep; /* entry in new dir */ in xfs_dir2_sf_addname_hard() local
478 sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + nbytes); in xfs_dir2_sf_addname_hard()
482 sfep->namelen = args->namelen; in xfs_dir2_sf_addname_hard()
483 xfs_dir2_sf_put_offset(sfep, offset); in xfs_dir2_sf_addname_hard()
484 memcpy(sfep->name, args->name, sfep->namelen); in xfs_dir2_sf_addname_hard()
485 dp->d_ops->sf_put_ino(sfp, sfep, args->inumber); in xfs_dir2_sf_addname_hard()
486 dp->d_ops->sf_put_ftype(sfep, args->filetype); in xfs_dir2_sf_addname_hard()
494 sfep = dp->d_ops->sf_nextentry(sfp, sfep); in xfs_dir2_sf_addname_hard()
495 memcpy(sfep, oldsfep, old_isize - nbytes); in xfs_dir2_sf_addname_hard()
520 xfs_dir2_sf_entry_t *sfep; /* shortform entry */ in xfs_dir2_sf_addname_pick() local
530 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_addname_pick()
539 holefit = offset + size <= xfs_dir2_sf_get_offset(sfep); in xfs_dir2_sf_addname_pick()
540 offset = xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_addname_pick()
541 dp->d_ops->data_entsize(sfep->namelen); in xfs_dir2_sf_addname_pick()
542 sfep = dp->d_ops->sf_nextentry(sfp, sfep); in xfs_dir2_sf_addname_pick()
571 *sfepp = sfep; in xfs_dir2_sf_addname_pick()
589 xfs_dir2_sf_entry_t *sfep; /* shortform dir entry */ in xfs_dir2_sf_check() local
599 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_check()
601 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) { in xfs_dir2_sf_check()
602 ASSERT(xfs_dir2_sf_get_offset(sfep) >= offset); in xfs_dir2_sf_check()
603 ino = dp->d_ops->sf_get_ino(sfp, sfep); in xfs_dir2_sf_check()
606 xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_check()
607 dp->d_ops->data_entsize(sfep->namelen); in xfs_dir2_sf_check()
608 ASSERT(dp->d_ops->sf_get_ftype(sfep) < XFS_DIR3_FT_MAX); in xfs_dir2_sf_check()
611 ASSERT((char *)sfep - (char *)sfp == dp->i_d.di_size); in xfs_dir2_sf_check()
625 struct xfs_dir2_sf_entry *sfep; in xfs_dir2_sf_verify() local
667 sfep = xfs_dir2_sf_firstentry(sfp); in xfs_dir2_sf_verify()
674 if (((char *)sfep + sizeof(*sfep)) >= endp) in xfs_dir2_sf_verify()
678 if (sfep->namelen == 0) in xfs_dir2_sf_verify()
686 next_sfep = dops->sf_nextentry(sfp, sfep); in xfs_dir2_sf_verify()
691 if (xfs_dir2_sf_get_offset(sfep) < offset) in xfs_dir2_sf_verify()
695 ino = dops->sf_get_ino(sfp, sfep); in xfs_dir2_sf_verify()
702 filetype = dops->sf_get_ftype(sfep); in xfs_dir2_sf_verify()
706 offset = xfs_dir2_sf_get_offset(sfep) + in xfs_dir2_sf_verify()
707 dops->data_entsize(sfep->namelen); in xfs_dir2_sf_verify()
709 sfep = next_sfep; in xfs_dir2_sf_verify()
713 if ((void *)sfep != (void *)endp) in xfs_dir2_sf_verify()
788 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_lookup() local
833 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_lookup()
834 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) { in xfs_dir2_sf_lookup()
840 cmp = dp->i_mount->m_dirnameops->compname(args, sfep->name, in xfs_dir2_sf_lookup()
841 sfep->namelen); in xfs_dir2_sf_lookup()
844 args->inumber = dp->d_ops->sf_get_ino(sfp, sfep); in xfs_dir2_sf_lookup()
845 args->filetype = dp->d_ops->sf_get_ftype(sfep); in xfs_dir2_sf_lookup()
848 ci_sfep = sfep; in xfs_dir2_sf_lookup()
876 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_removename() local
900 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_removename()
901 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) { in xfs_dir2_sf_removename()
902 if (xfs_da_compname(args, sfep->name, sfep->namelen) == in xfs_dir2_sf_removename()
904 ASSERT(dp->d_ops->sf_get_ino(sfp, sfep) == in xfs_dir2_sf_removename()
917 byteoff = (int)((char *)sfep - (char *)sfp); in xfs_dir2_sf_removename()
961 xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ in xfs_dir2_sf_replace() local
1022 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count; in xfs_dir2_sf_replace()
1023 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) { in xfs_dir2_sf_replace()
1024 if (xfs_da_compname(args, sfep->name, sfep->namelen) == in xfs_dir2_sf_replace()
1026 ino = dp->d_ops->sf_get_ino(sfp, sfep); in xfs_dir2_sf_replace()
1028 dp->d_ops->sf_put_ino(sfp, sfep, args->inumber); in xfs_dir2_sf_replace()
1029 dp->d_ops->sf_put_ftype(sfep, args->filetype); in xfs_dir2_sf_replace()
1089 xfs_dir2_sf_entry_t *sfep; /* new sf entry */ in xfs_dir2_sf_toino4() local
1126 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp), in xfs_dir2_sf_toino4()
1129 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep), in xfs_dir2_sf_toino4()
1131 sfep->namelen = oldsfep->namelen; in xfs_dir2_sf_toino4()
1132 memcpy(sfep->offset, oldsfep->offset, sizeof(sfep->offset)); in xfs_dir2_sf_toino4()
1133 memcpy(sfep->name, oldsfep->name, sfep->namelen); in xfs_dir2_sf_toino4()
1134 dp->d_ops->sf_put_ino(sfp, sfep, in xfs_dir2_sf_toino4()
1136 dp->d_ops->sf_put_ftype(sfep, dp->d_ops->sf_get_ftype(oldsfep)); in xfs_dir2_sf_toino4()
1162 xfs_dir2_sf_entry_t *sfep; /* new sf entry */ in xfs_dir2_sf_toino8() local
1199 for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp), in xfs_dir2_sf_toino8()
1202 i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep), in xfs_dir2_sf_toino8()
1204 sfep->namelen = oldsfep->namelen; in xfs_dir2_sf_toino8()
1205 memcpy(sfep->offset, oldsfep->offset, sizeof(sfep->offset)); in xfs_dir2_sf_toino8()
1206 memcpy(sfep->name, oldsfep->name, sfep->namelen); in xfs_dir2_sf_toino8()
1207 dp->d_ops->sf_put_ino(sfp, sfep, in xfs_dir2_sf_toino8()
1209 dp->d_ops->sf_put_ftype(sfep, dp->d_ops->sf_get_ftype(oldsfep)); in xfs_dir2_sf_toino8()