Lines Matching refs:hdr
36 struct nfs_pgio_header *hdr; member
276 nfs_local_iocb_alloc(struct nfs_pgio_header *hdr, in nfs_local_iocb_alloc() argument
284 iocb->bvec = nfs_bvec_alloc_and_import_pagevec(hdr->page_array.pagevec, in nfs_local_iocb_alloc()
285 hdr->page_array.npages, flags); in nfs_local_iocb_alloc()
291 iocb->kiocb.ki_pos = hdr->args.offset; in nfs_local_iocb_alloc()
293 iocb->hdr = hdr; in nfs_local_iocb_alloc()
301 struct nfs_pgio_header *hdr = iocb->hdr; in nfs_local_iter_init() local
303 iov_iter_bvec(i, dir, iocb->bvec, hdr->page_array.npages, in nfs_local_iter_init()
304 hdr->args.count + hdr->args.pgbase); in nfs_local_iter_init()
305 if (hdr->args.pgbase != 0) in nfs_local_iter_init()
306 iov_iter_advance(i, hdr->args.pgbase); in nfs_local_iter_init()
310 nfs_local_hdr_release(struct nfs_pgio_header *hdr, in nfs_local_hdr_release() argument
313 call_ops->rpc_call_done(&hdr->task, hdr); in nfs_local_hdr_release()
314 call_ops->rpc_release(hdr); in nfs_local_hdr_release()
318 nfs_local_pgio_init(struct nfs_pgio_header *hdr, in nfs_local_pgio_init() argument
321 hdr->task.tk_ops = call_ops; in nfs_local_pgio_init()
322 if (!hdr->task.tk_start) in nfs_local_pgio_init()
323 hdr->task.tk_start = ktime_get(); in nfs_local_pgio_init()
327 nfs_local_pgio_done(struct nfs_pgio_header *hdr, long status) in nfs_local_pgio_done() argument
330 hdr->res.count = status; in nfs_local_pgio_done()
331 hdr->res.op_status = NFS4_OK; in nfs_local_pgio_done()
332 hdr->task.tk_status = 0; in nfs_local_pgio_done()
334 hdr->res.op_status = nfs4_stat_to_errno(status); in nfs_local_pgio_done()
335 hdr->task.tk_status = status; in nfs_local_pgio_done()
342 struct nfs_pgio_header *hdr = iocb->hdr; in nfs_local_pgio_release() local
346 nfs_local_hdr_release(hdr, hdr->task.tk_ops); in nfs_local_pgio_release()
352 struct nfs_pgio_header *hdr = iocb->hdr; in nfs_local_read_done() local
355 nfs_local_pgio_done(hdr, status); in nfs_local_read_done()
357 if (hdr->res.count != hdr->args.count || in nfs_local_read_done()
358 hdr->args.offset + hdr->res.count >= i_size_read(file_inode(filp))) in nfs_local_read_done()
359 hdr->res.eof = true; in nfs_local_read_done()
362 status > 0 ? status : 0, hdr->res.eof); in nfs_local_read_done()
388 nfs_do_local_read(struct nfs_pgio_header *hdr, in nfs_do_local_read() argument
395 __func__, hdr->args.count, hdr->args.offset); in nfs_do_local_read()
397 iocb = nfs_local_iocb_alloc(hdr, localio, GFP_KERNEL); in nfs_do_local_read()
401 nfs_local_pgio_init(hdr, call_ops); in nfs_do_local_read()
402 hdr->res.eof = false; in nfs_do_local_read()
477 struct nfs_pgio_header *hdr = iocb->hdr; in nfs_local_vfs_getattr() local
478 struct nfs_fattr *fattr = hdr->res.fattr; in nfs_local_vfs_getattr()
479 int version = NFS_PROTO(hdr->inode)->version; in nfs_local_vfs_getattr()
508 struct nfs_pgio_header *hdr = iocb->hdr; in nfs_local_write_done() local
509 struct inode *inode = hdr->inode; in nfs_local_write_done()
514 if (status > 0 && status < hdr->args.count) { in nfs_local_write_done()
515 hdr->mds_offset += status; in nfs_local_write_done()
516 hdr->args.offset += status; in nfs_local_write_done()
517 hdr->args.pgbase += status; in nfs_local_write_done()
518 hdr->args.count -= status; in nfs_local_write_done()
519 nfs_set_pgio_error(hdr, -ENOSPC, hdr->args.offset); in nfs_local_write_done()
530 nfs_local_pgio_done(hdr, status); in nfs_local_write_done()
562 nfs_do_local_write(struct nfs_pgio_header *hdr, in nfs_do_local_write() argument
569 __func__, hdr->args.count, hdr->args.offset, in nfs_do_local_write()
570 (hdr->args.stable == NFS_UNSTABLE) ? "unstable" : "stable"); in nfs_do_local_write()
572 iocb = nfs_local_iocb_alloc(hdr, localio, GFP_NOIO); in nfs_do_local_write()
576 switch (hdr->args.stable) { in nfs_do_local_write()
585 nfs_local_pgio_init(hdr, call_ops); in nfs_do_local_write()
587 nfs_set_local_verifier(hdr->inode, hdr->res.verf, hdr->args.stable); in nfs_do_local_write()
596 struct nfs_pgio_header *hdr, in nfs_local_doio() argument
602 if (!hdr->args.count) in nfs_local_doio()
611 switch (hdr->rw_mode) { in nfs_local_doio()
613 status = nfs_do_local_read(hdr, localio, call_ops); in nfs_local_doio()
616 status = nfs_do_local_write(hdr, localio, call_ops); in nfs_local_doio()
620 hdr->rw_mode); in nfs_local_doio()
626 hdr->task.tk_status = status; in nfs_local_doio()
627 nfs_local_hdr_release(hdr, call_ops); in nfs_local_doio()