Lines Matching refs:fd
87 nsc_alloc_handle(nsc_fd_t *fd, void (*d_cb)(), void (*r_cb)(), void (*w_cb)())
89 nsc_buf_t *h = (*fd->sf_aio->alloc_h)(d_cb, r_cb, w_cb, fd->sf_cd);
92 h->sb_fd = fd;
150 nsc_alloc_buf(nsc_fd_t *fd, nsc_off_t pos, nsc_size_t len,
155 if ((fd->sf_avail & NSC_WRITE) == 0)
177 fn = fd->sf_aio->alloc_buf;
178 (*ptr)->sb_fd = fd;
181 return (*fn)(fd->sf_cd, pos, len, flag, ptr, fd);
189 int flag, nsc_buf_t **ptr, nsc_fd_t *fd)
194 if (!(h = nsc_alloc_handle(fd, NULL, NULL, NULL)))
197 if ((rc = nsc_alloc_buf(fd, pos, len, flag, &h)) <= 0) {
442 nsc_set_trksize(nsc_fd_t *fd, nsc_size_t trsize)
444 return (*fd->sf_aio->trksize)(fd->sf_cd, trsize);
449 nsc_get_pinned(nsc_fd_t *fd)
451 return (*fd->sf_aio->getpin)(fd->sf_cd);
456 nsc_discard_pinned(nsc_fd_t *fd, nsc_off_t pos, nsc_size_t len)
458 return (*fd->sf_aio->discard)(fd->sf_cd, pos, len);
465 nsc_fd_t *fd;
474 for (fd = iodev->si_open; fd; fd = fd->sf_next)
475 if (fd->sf_avail & _NSC_ATTACH)
476 (*fd->sf_pinned)(fd->sf_arg, pos, len);
485 nsc_fd_t *fd;
494 for (fd = iodev->si_open; fd; fd = fd->sf_next)
495 if (fd->sf_avail & _NSC_ATTACH)
496 (*fd->sf_unpinned)(fd->sf_arg, pos, len);