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()
693 * @lo: layout header containing the lsegs
698 * Walk the list of lsegs in the layout header, and tear down any that should
770 lo = nfsi->layout; in __pnfs_destroy_layout()
797 ret = nfsi->layout != lo; in pnfs_layout_removed()
818 lo = NFS_I(inode)->layout; in pnfs_layout_add_bulk_destroy_list()
881 dprintk("%s freeing layout for inode %lu\n", __func__, in pnfs_layout_free_bulk_destroy_list()
1106 lgp->args.layout.pages = nfs4_alloc_pages(max_pages, gfp_flags); in pnfs_alloc_init_layoutget_args()
1107 if (!lgp->args.layout.pages) { in pnfs_alloc_init_layoutget_args()
1111 lgp->args.layout.pglen = max_pages * PAGE_SIZE; in pnfs_alloc_init_layoutget_args()
1112 lgp->res.layoutp = &lgp->args.layout; in pnfs_alloc_init_layoutget_args()
1143 size_t max_pages = lgp->args.layout.pglen / PAGE_SIZE; in pnfs_layoutget_free()
1145 nfs4_free_pages(lgp->args.layout.pages, max_pages); in pnfs_layoutget_free()
1159 list_for_each_entry_safe(lseg, tmp, &nfsi->layout->plh_segs, pls_list) { in pnfs_clear_layoutcommit()
1233 args->layout = lo; in pnfs_init_layoutreturn_args()
1323 * when the layout segment list is empty.
1325 * Note that a pnfs_layout_hdr can exist with an empty layout segment
1348 lo = nfsi->layout; in _pnfs_return_layout()
1351 dprintk("NFS: %s no layout to return\n", __func__); in _pnfs_return_layout()
1375 dprintk("NFS: %s no layout segments to return\n", __func__); in _pnfs_return_layout()
1400 lo = NFS_I(inode)->layout; in pnfs_commit_and_return_layout()
1441 lo = nfsi->layout; in pnfs_roc()
1468 /* Don't return layout if there is open file state */ in pnfs_roc()
1484 * doesn't invalidate the layout for us. in pnfs_roc()
1550 * that we need to release the layout in pnfs_roc_done()
1576 struct pnfs_layout_hdr *lo = args->layout; in pnfs_roc_release()
1613 lo = nfsi->layout; in pnfs_wait_on_layoutreturn()
1623 * Compare two layout segments for sorting into layout cache.
1753 dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout); in pnfs_find_alloc_layout()
1755 if (nfsi->layout != NULL) in pnfs_find_alloc_layout()
1761 if (likely(nfsi->layout == NULL)) { /* Won the race? */ in pnfs_find_alloc_layout()
1762 nfsi->layout = new; in pnfs_find_alloc_layout()
1767 pnfs_get_layout_hdr(nfsi->layout); in pnfs_find_alloc_layout()
1768 return nfsi->layout; in pnfs_find_alloc_layout()
1805 * lookup range in layout
1835 * when there are no layout segments. Note that in pnfs_update_layout iomode
1959 * Layout segment is retreived from the server if not cached.
1960 * The appropriate layout segment is referenced and returned to the caller.
2030 * If the layout segment list is empty, but there are outstanding in pnfs_update_layout()
2073 * 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()
2347 * the "current stateid" value, the layout type, or the in pnfs_parse_lgopen()
2402 /* Inject layout blob into I/O device driver */ in pnfs_layout_process()
2408 dprintk("%s: Could not allocate layout: error %ld\n", in pnfs_layout_process()
2446 /* We have a completely new layout */ in pnfs_layout_process()
2469 * pnfs_mark_matching_lsegs_return - Free or return matching layout segments
2470 * @lo: pointer to layout header
2472 * @return_range: describe layout segment ranges to be returned
2476 * to free the layout segment immediately, or else to mark it for return
2481 * - EBUSY: there are layout segment that are still in use.
2482 * - ENOENT: there are no layout segments that need to be returned.
2538 lo = NFS_I(inode)->layout; in pnfs_mark_layout_for_return()
2791 * Calculate how many bytes are left in the layout segment in pnfs_generic_pg_test()
2842 * Called by non rpc-based layout drivers
2969 * Called by non rpc-based layout drivers
3106 list_for_each_entry(lseg, &NFS_I(inode)->layout->plh_segs, pls_list) { in pnfs_list_write_lseg()
3141 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3145 } else if (end_pos > nfsi->layout->plh_lwb) in pnfs_set_layoutcommit()
3146 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3153 __func__, lseg, nfsi->layout->plh_lwb); in pnfs_set_layoutcommit()
3172 * For the LAYOUT4_NFSV4_1_FILES layout type, NFS_DATA_SYNC WRITEs and
3219 end_pos = nfsi->layout->plh_lwb; in pnfs_layoutcommit_inode()
3221 nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid); in pnfs_layoutcommit_inode()
3222 data->cred = get_cred(nfsi->layout->plh_lc_cred); in pnfs_layoutcommit_inode()
3241 if (end_pos > nfsi->layout->plh_lwb) in pnfs_layoutcommit_inode()
3242 nfsi->layout->plh_lwb = end_pos; in pnfs_layoutcommit_inode()
3303 if (!NFS_I(inode)->layout) { in pnfs_report_layoutstat()
3307 hdr = NFS_I(inode)->layout; in pnfs_report_layoutstat()