Lines Matching full:layout
2 * pNFS functions to call and manage layout drivers.
65 /* Return the registered pnfs layout driver module matching given id */
121 * When the server sends a list of layout types, we choose one in the order
154 * Try to set the server's pnfs module to the pnfs layout type specified by id.
155 * Currently only one pNFS layout driver per filesystem is supported.
157 * @ids array of layout types supported by MDS.
199 printk(KERN_ERR "NFS: %s: Error initializing pNFS layout " in set_pnfs_layoutdriver()
226 printk(KERN_ERR "NFS: %s Layout driver must provide " in pnfs_register_layoutdriver()
259 * pNFS client layout cache
297 dprintk("%s: freeing layout cache %p\n", __func__, lo); in pnfs_detach_layout_hdr()
298 nfsi->layout = NULL; in pnfs_detach_layout_hdr()
317 WARN_ONCE(1, "NFS: BUG unfreed layout segments.\n"); in pnfs_put_layout_hdr()
339 * Compare 2 layout stateid sequence ids, to see which is newer,
408 * Update the seqid of a layout stateid after receiving
426 lo = NFS_I(inode)->layout; in nfs4_layout_refresh_old_stateid()
450 * Mark a pnfs_layout_hdr and all associated layout segments as invalid
517 dprintk("%s Setting layout IOMODE_%s fail bit\n", __func__, in pnfs_layout_io_set_failed()
697 * @lo: layout header containing the lsegs
702 * Walk the list of lsegs in the layout header, and tear down any that should
771 lo = nfsi->layout; in __pnfs_destroy_layout()
798 ret = nfsi->layout != lo; in pnfs_layout_removed()
819 lo = NFS_I(inode)->layout; in pnfs_layout_add_bulk_destroy_list()
882 dprintk("%s freeing layout for inode %lu\n", __func__, in pnfs_layout_free_bulk_destroy_list()
1107 lgp->args.layout.pages = nfs4_alloc_pages(max_pages, gfp_flags); in pnfs_alloc_init_layoutget_args()
1108 if (!lgp->args.layout.pages) { in pnfs_alloc_init_layoutget_args()
1112 lgp->args.layout.pglen = max_pages * PAGE_SIZE; in pnfs_alloc_init_layoutget_args()
1113 lgp->res.layoutp = &lgp->args.layout; in pnfs_alloc_init_layoutget_args()
1144 size_t max_pages = lgp->args.layout.pglen / PAGE_SIZE; in pnfs_layoutget_free()
1146 nfs4_free_pages(lgp->args.layout.pages, max_pages); in pnfs_layoutget_free()
1148 pnfs_put_layout_hdr(NFS_I(lgp->args.inode)->layout); in pnfs_layoutget_free()
1161 list_for_each_entry_safe(lseg, tmp, &nfsi->layout->plh_segs, pls_list) { in pnfs_clear_layoutcommit()
1235 args->layout = lo; in pnfs_init_layoutreturn_args()
1325 * when the layout segment list is empty.
1327 * Note that a pnfs_layout_hdr can exist with an empty layout segment
1350 lo = nfsi->layout; in _pnfs_return_layout()
1353 dprintk("NFS: %s no layout to return\n", __func__); in _pnfs_return_layout()
1377 dprintk("NFS: %s no layout segments to return\n", __func__); in _pnfs_return_layout()
1402 lo = NFS_I(inode)->layout; in pnfs_commit_and_return_layout()
1443 lo = nfsi->layout; in pnfs_roc()
1470 /* Don't return layout if there is open file state */ in pnfs_roc()
1486 * doesn't invalidate the layout for us. in pnfs_roc()
1552 * that we need to release the layout in pnfs_roc_done()
1578 struct pnfs_layout_hdr *lo = args->layout; in pnfs_roc_release()
1616 lo = nfsi->layout; in pnfs_wait_on_layoutreturn()
1626 * Compare two layout segments for sorting into layout cache.
1756 dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout); in pnfs_find_alloc_layout()
1758 if (nfsi->layout != NULL) in pnfs_find_alloc_layout()
1764 if (likely(nfsi->layout == NULL)) { /* Won the race? */ in pnfs_find_alloc_layout()
1765 nfsi->layout = new; in pnfs_find_alloc_layout()
1770 pnfs_get_layout_hdr(nfsi->layout); in pnfs_find_alloc_layout()
1771 return nfsi->layout; in pnfs_find_alloc_layout()
1808 * lookup range in layout
1838 * when there are no layout segments. Note that in pnfs_update_layout iomode
1962 * Layout segment is retreived from the server if not cached.
1963 * The appropriate layout segment is referenced and returned to the caller.
2033 * If the layout segment list is empty, but there are outstanding in pnfs_update_layout()
2076 * Choose a stateid for the LAYOUTGET. If we don't have a layout in pnfs_update_layout()
2192 dprintk("%s: inode %s/%llu pNFS layout segment %s for " in pnfs_update_layout()
2343 * the "current stateid" value, the layout type, or the in pnfs_parse_lgopen()
2365 lo = NFS_I(lgp->args.inode)->layout; in pnfs_parse_lgopen()
2380 struct pnfs_layout_hdr *lo = NFS_I(inode)->layout; in nfs4_lgopen_release()
2391 struct pnfs_layout_hdr *lo = NFS_I(lgp->args.inode)->layout; in pnfs_layout_process()
2400 /* Inject layout blob into I/O device driver */ in pnfs_layout_process()
2406 dprintk("%s: Could not allocate layout: error %ld\n", in pnfs_layout_process()
2446 /* We have a completely new layout */ in pnfs_layout_process()
2470 * pnfs_mark_matching_lsegs_return - Free or return matching layout segments
2471 * @lo: pointer to layout header
2473 * @return_range: describe layout segment ranges to be returned
2477 * to free the layout segment immediately, or else to mark it for return
2482 * - EBUSY: there are layout segment that are still in use.
2483 * - ENOENT: there are no layout segments that need to be returned.
2537 lo = NFS_I(inode)->layout; in pnfs_mark_layout_for_return()
2795 * Calculate how many bytes are left in the layout segment in pnfs_generic_pg_test()
2847 * Called by non rpc-based layout drivers
2973 * Called by non rpc-based layout drivers
3109 list_for_each_entry(lseg, &NFS_I(inode)->layout->plh_segs, pls_list) { in pnfs_list_write_lseg()
3144 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3148 } else if (end_pos > nfsi->layout->plh_lwb) in pnfs_set_layoutcommit()
3149 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3156 __func__, lseg, nfsi->layout->plh_lwb); in pnfs_set_layoutcommit()
3175 * For the LAYOUT4_NFSV4_1_FILES layout type, NFS_DATA_SYNC WRITEs and
3222 end_pos = nfsi->layout->plh_lwb; in pnfs_layoutcommit_inode()
3224 nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid); in pnfs_layoutcommit_inode()
3225 data->cred = get_cred(nfsi->layout->plh_lc_cred); in pnfs_layoutcommit_inode()
3244 if (end_pos > nfsi->layout->plh_lwb) in pnfs_layoutcommit_inode()
3245 nfsi->layout->plh_lwb = end_pos; in pnfs_layoutcommit_inode()
3306 if (!NFS_I(inode)->layout) { in pnfs_report_layoutstat()
3310 hdr = NFS_I(inode)->layout; in pnfs_report_layoutstat()