• Home
  • Raw
  • Download

Lines Matching refs:hdr

111 static void nfs_writehdr_free(struct nfs_pgio_header *hdr)  in nfs_writehdr_free()  argument
113 mempool_free(hdr, nfs_wdata_mempool); in nfs_writehdr_free()
967 int nfs_write_need_commit(struct nfs_pgio_header *hdr) in nfs_write_need_commit() argument
969 if (hdr->verf.committed == NFS_DATA_SYNC) in nfs_write_need_commit()
970 return hdr->lseg == NULL; in nfs_write_need_commit()
971 return hdr->verf.committed != NFS_FILE_SYNC; in nfs_write_need_commit()
974 static void nfs_async_write_init(struct nfs_pgio_header *hdr) in nfs_async_write_init() argument
976 nfs_io_completion_get(hdr->io_completion); in nfs_async_write_init()
979 static void nfs_write_completion(struct nfs_pgio_header *hdr) in nfs_write_completion() argument
984 if (test_bit(NFS_IOHDR_REDO, &hdr->flags)) in nfs_write_completion()
986 nfs_init_cinfo_from_inode(&cinfo, hdr->inode); in nfs_write_completion()
987 while (!list_empty(&hdr->pages)) { in nfs_write_completion()
988 struct nfs_page *req = nfs_list_entry(hdr->pages.next); in nfs_write_completion()
992 if (test_bit(NFS_IOHDR_ERROR, &hdr->flags) && in nfs_write_completion()
993 (hdr->good_bytes < bytes)) { in nfs_write_completion()
994 trace_nfs_comp_error(req, hdr->error); in nfs_write_completion()
995 nfs_mapping_set_error(req->wb_page, hdr->error); in nfs_write_completion()
998 if (nfs_write_need_commit(hdr)) { in nfs_write_completion()
1001 memcpy(&req->wb_verf, &hdr->verf.verifier, sizeof(req->wb_verf)); in nfs_write_completion()
1002 nfs_mark_request_commit(req, hdr->lseg, &cinfo, in nfs_write_completion()
1003 hdr->pgio_mirror_idx); in nfs_write_completion()
1013 nfs_io_completion_put(hdr->io_completion); in nfs_write_completion()
1014 hdr->release(hdr); in nfs_write_completion()
1380 static void nfs_initiate_write(struct nfs_pgio_header *hdr, in nfs_initiate_write() argument
1388 rpc_ops->write_setup(hdr, msg, &task_setup_data->rpc_client); in nfs_initiate_write()
1389 trace_nfs_initiate_write(hdr); in nfs_initiate_write()
1422 static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr) in nfs_async_write_reschedule_io() argument
1424 nfs_async_write_error(&hdr->pages, 0); in nfs_async_write_reschedule_io()
1425 filemap_fdatawrite_range(hdr->inode->i_mapping, hdr->args.offset, in nfs_async_write_reschedule_io()
1426 hdr->args.offset + hdr->args.count - 1); in nfs_async_write_reschedule_io()
1501 static void nfs_writeback_check_extend(struct nfs_pgio_header *hdr, in nfs_writeback_check_extend() argument
1504 struct nfs_pgio_args *argp = &hdr->args; in nfs_writeback_check_extend()
1505 struct nfs_pgio_res *resp = &hdr->res; in nfs_writeback_check_extend()
1510 if (nfs_size_to_loff_t(fattr->size) < i_size_read(hdr->inode)) { in nfs_writeback_check_extend()
1522 void nfs_writeback_update_inode(struct nfs_pgio_header *hdr) in nfs_writeback_update_inode() argument
1524 struct nfs_fattr *fattr = &hdr->fattr; in nfs_writeback_update_inode()
1525 struct inode *inode = hdr->inode; in nfs_writeback_update_inode()
1528 nfs_writeback_check_extend(hdr, fattr); in nfs_writeback_update_inode()
1538 struct nfs_pgio_header *hdr, in nfs_writeback_done() argument
1550 status = NFS_PROTO(inode)->write_done(task, hdr); in nfs_writeback_done()
1554 nfs_add_stats(inode, NFSIOS_SERVERWRITTENBYTES, hdr->res.count); in nfs_writeback_done()
1555 trace_nfs_writeback_done(task, hdr); in nfs_writeback_done()
1557 if (hdr->res.verf->committed < hdr->args.stable && in nfs_writeback_done()
1574 hdr->res.verf->committed, hdr->args.stable); in nfs_writeback_done()
1592 struct nfs_pgio_header *hdr) in nfs_writeback_result() argument
1594 struct nfs_pgio_args *argp = &hdr->args; in nfs_writeback_result()
1595 struct nfs_pgio_res *resp = &hdr->res; in nfs_writeback_result()
1601 nfs_inc_stats(hdr->inode, NFSIOS_SHORTWRITE); in nfs_writeback_result()
1611 nfs_set_pgio_error(hdr, -EIO, argp->offset); in nfs_writeback_result()
1618 hdr->pnfs_error = -EAGAIN; in nfs_writeback_result()
1625 hdr->mds_offset += resp->count; in nfs_writeback_result()