• Home
  • Raw
  • Download

Lines Matching refs:hdr

88 static void nfs_writehdr_free(struct nfs_pgio_header *hdr)  in nfs_writehdr_free()  argument
90 mempool_free(hdr, nfs_wdata_mempool); in nfs_writehdr_free()
895 int nfs_write_need_commit(struct nfs_pgio_header *hdr) in nfs_write_need_commit() argument
897 if (hdr->verf.committed == NFS_DATA_SYNC) in nfs_write_need_commit()
898 return hdr->lseg == NULL; in nfs_write_need_commit()
899 return hdr->verf.committed != NFS_FILE_SYNC; in nfs_write_need_commit()
902 static void nfs_write_completion(struct nfs_pgio_header *hdr) in nfs_write_completion() argument
907 if (test_bit(NFS_IOHDR_REDO, &hdr->flags)) in nfs_write_completion()
909 nfs_init_cinfo_from_inode(&cinfo, hdr->inode); in nfs_write_completion()
910 while (!list_empty(&hdr->pages)) { in nfs_write_completion()
911 struct nfs_page *req = nfs_list_entry(hdr->pages.next); in nfs_write_completion()
915 if (test_bit(NFS_IOHDR_ERROR, &hdr->flags) && in nfs_write_completion()
916 (hdr->good_bytes < bytes)) { in nfs_write_completion()
918 nfs_context_set_write_error(req->wb_context, hdr->error); in nfs_write_completion()
921 if (nfs_write_need_commit(hdr)) { in nfs_write_completion()
922 memcpy(&req->wb_verf, &hdr->verf.verifier, sizeof(req->wb_verf)); in nfs_write_completion()
923 nfs_mark_request_commit(req, hdr->lseg, &cinfo, in nfs_write_completion()
924 hdr->pgio_mirror_idx); in nfs_write_completion()
935 hdr->release(hdr); in nfs_write_completion()
1294 static void nfs_initiate_write(struct nfs_pgio_header *hdr, in nfs_initiate_write() argument
1302 rpc_ops->write_setup(hdr, msg); in nfs_initiate_write()
1304 nfs4_state_protect_write(NFS_SERVER(hdr->inode)->nfs_client, in nfs_initiate_write()
1305 &task_setup_data->rpc_client, msg, hdr); in nfs_initiate_write()
1402 static void nfs_writeback_check_extend(struct nfs_pgio_header *hdr, in nfs_writeback_check_extend() argument
1405 struct nfs_pgio_args *argp = &hdr->args; in nfs_writeback_check_extend()
1406 struct nfs_pgio_res *resp = &hdr->res; in nfs_writeback_check_extend()
1411 if (nfs_size_to_loff_t(fattr->size) < i_size_read(hdr->inode)) { in nfs_writeback_check_extend()
1423 void nfs_writeback_update_inode(struct nfs_pgio_header *hdr) in nfs_writeback_update_inode() argument
1425 struct nfs_fattr *fattr = &hdr->fattr; in nfs_writeback_update_inode()
1426 struct inode *inode = hdr->inode; in nfs_writeback_update_inode()
1429 nfs_writeback_check_extend(hdr, fattr); in nfs_writeback_update_inode()
1439 struct nfs_pgio_header *hdr, in nfs_writeback_done() argument
1451 status = NFS_PROTO(inode)->write_done(task, hdr); in nfs_writeback_done()
1454 nfs_add_stats(inode, NFSIOS_SERVERWRITTENBYTES, hdr->res.count); in nfs_writeback_done()
1456 if (hdr->res.verf->committed < hdr->args.stable && in nfs_writeback_done()
1473 hdr->res.verf->committed, hdr->args.stable); in nfs_writeback_done()
1488 struct nfs_pgio_header *hdr) in nfs_writeback_result() argument
1490 struct nfs_pgio_args *argp = &hdr->args; in nfs_writeback_result()
1491 struct nfs_pgio_res *resp = &hdr->res; in nfs_writeback_result()
1497 nfs_inc_stats(hdr->inode, NFSIOS_SHORTWRITE); in nfs_writeback_result()
1507 nfs_set_pgio_error(hdr, -EIO, argp->offset); in nfs_writeback_result()
1514 hdr->pnfs_error = -EAGAIN; in nfs_writeback_result()
1521 hdr->mds_offset += resp->count; in nfs_writeback_result()