Lines Matching refs:dp

164 	gfs_dir_t *dp = dvp->v_data;
167 *ino = dp->gfsd_file.gfs_ino;
168 parent = dp->gfsd_file.gfs_parent;
261 dirent64_t *dp;
268 dp = st->grd_dirent;
269 reclen = DIRENT64_RECLEN(strlen(dp->d_name));
285 dp->d_off = next;
286 dp->d_reclen = (ushort_t)reclen;
322 dirent64_t *dp = st->grd_dirent;
324 dp->d_ino = ino;
325 (void) strncpy(dp->d_name, name, st->grd_namlen);
520 gfs_dir_t *dp;
526 dp = vp->v_data;
527 dp->gfsd_file.gfs_type = GFS_DIR;
528 dp->gfsd_maxlen = maxlen;
532 dp->gfsd_nstatic++;
534 dp->gfsd_static = kmem_alloc(
535 dp->gfsd_nstatic * sizeof (gfs_dirent_t), KM_SLEEP);
536 bcopy(entries, dp->gfsd_static,
537 dp->gfsd_nstatic * sizeof (gfs_dirent_t));
540 dp->gfsd_readdir = readdir_cb;
541 dp->gfsd_lookup = lookup_cb;
542 dp->gfsd_inode = inode_cb;
544 mutex_init(&dp->gfsd_lock, NULL, MUTEX_DEFAULT, NULL);
609 gfs_dir_t *dp = NULL;
615 dp = fp->gfs_parent->v_data;
620 gfs_dir_lock(dp);
625 for (i = 0; i < dp->gfsd_nstatic; i++) {
626 ge = &dp->gfsd_static[i];
664 if (dp) {
665 gfs_dir_unlock(dp);
680 if (dp)
681 gfs_dir_unlock(dp);
695 gfs_dir_t *dp;
699 if ((dp = gfs_file_inactive(vp)) != NULL) {
700 mutex_destroy(&dp->gfsd_lock);
701 if (dp->gfsd_nstatic)
702 kmem_free(dp->gfsd_static,
703 dp->gfsd_nstatic * sizeof (gfs_dirent_t));
706 return (dp);
744 gfs_dir_lookup_dynamic(gfs_lookup_cb callback, gfs_dir_t *dp,
752 ASSERT(GFS_DIR_LOCKED(dp));
759 gfs_dir_unlock(dp);
761 gfs_dir_lock(dp);
798 gfs_dir_t *dp, const char *nm, vnode_t *dvp, int *idx,
805 ASSERT(GFS_DIR_LOCKED(dp));
810 for (i = 0; i < dp->gfsd_nstatic; i++) {
811 ge = &dp->gfsd_static[i];
833 gfs_dir_unlock(dp);
835 gfs_dir_lock(dp);
841 dp->gfsd_inode(dvp, i);
859 gfs_dir_unlock(dp);
861 gfs_dir_lock(dp);
892 gfs_dir_t *dp = dvp->v_data;
901 if (gfs_lookup_dot(vpp, dvp, dp->gfsd_file.gfs_parent, nm) == 0)
911 gfs_dir_lock(dp);
913 error = gfs_dir_lookup_static(compare, dp, nm, dvp, &idx, &vp, realpnp);
919 for (i = idx + 1; i < dp->gfsd_nstatic; i++) {
920 ge = &dp->gfsd_static[i];
929 if ((error || casecheck) && dp->gfsd_lookup)
930 error = gfs_dir_lookup_dynamic(dp->gfsd_lookup, dp, nm, dvp,
948 gfs_dir_unlock(dp);
980 * int gfs_readdir_cb(vnode_t *vp, void *dp, int *eofp,
984 * dp - directory entry, sized according to maxlen given to
1008 gfs_dir_t *dp = dvp->v_data;
1014 if ((error = gfs_readdir_init(&gstate, dp->gfsd_maxlen, 1, uiop,
1021 if (off >= 0 && off < dp->gfsd_nstatic) {
1022 ino = dp->gfsd_inode(dvp, off);
1025 off, ino, dp->gfsd_static[off].gfse_name, 0))
1029 } else if (dp->gfsd_readdir) {
1030 off -= dp->gfsd_nstatic;
1032 if ((error = dp->gfsd_readdir(dvp,
1037 off += dp->gfsd_nstatic + 2;
1038 next += dp->gfsd_nstatic + 2;