Lines Matching full:layout
2 * pNFS functions to call and manage layout drivers.
65 /* Return the registered pnfs layout driver module matching given id */
110 * When the server sends a list of layout types, we choose one in the order
143 * Try to set the server's pnfs module to the pnfs layout type specified by id.
144 * Currently only one pNFS layout driver per filesystem is supported.
146 * @ids array of layout types supported by MDS.
188 printk(KERN_ERR "NFS: %s: Error initializing pNFS layout " in set_pnfs_layoutdriver()
215 printk(KERN_ERR "NFS: %s Layout driver must provide " in pnfs_register_layoutdriver()
248 * pNFS client layout cache
286 dprintk("%s: freeing layout cache %p\n", __func__, lo); in pnfs_detach_layout_hdr()
287 nfsi->layout = NULL; in pnfs_detach_layout_hdr()
305 WARN_ONCE(1, "NFS: BUG unfreed layout segments.\n"); in pnfs_put_layout_hdr()
372 * Update the seqid of a layout stateid after receiving
390 lo = NFS_I(inode)->layout; in nfs4_layout_refresh_old_stateid()
414 * Mark a pnfs_layout_hdr and all associated layout segments as invalid
480 dprintk("%s Setting layout IOMODE_%s fail bit\n", __func__, in pnfs_layout_io_set_failed()
638 * Compare 2 layout stateid sequence ids, to see which is newer,
669 * @lo: layout header containing the lsegs
674 * Walk the list of lsegs in the layout header, and tear down any that should
744 lo = nfsi->layout; in pnfs_destroy_layout()
767 lo = NFS_I(inode)->layout; in pnfs_layout_add_bulk_destroy_list()
830 dprintk("%s freeing layout for inode %lu\n", __func__, in pnfs_layout_free_bulk_destroy_list()
1056 lgp->args.layout.pages = nfs4_alloc_pages(max_pages, gfp_flags); in pnfs_alloc_init_layoutget_args()
1057 if (!lgp->args.layout.pages) { in pnfs_alloc_init_layoutget_args()
1061 lgp->args.layout.pglen = max_pages * PAGE_SIZE; in pnfs_alloc_init_layoutget_args()
1062 lgp->res.layoutp = &lgp->args.layout; in pnfs_alloc_init_layoutget_args()
1093 size_t max_pages = lgp->args.layout.pglen / PAGE_SIZE; in pnfs_layoutget_free()
1095 nfs4_free_pages(lgp->args.layout.pages, max_pages); in pnfs_layoutget_free()
1097 pnfs_put_layout_hdr(NFS_I(lgp->args.inode)->layout); in pnfs_layoutget_free()
1110 list_for_each_entry_safe(lseg, tmp, &nfsi->layout->plh_segs, pls_list) { in pnfs_clear_layoutcommit()
1187 args->layout = lo; in pnfs_init_layoutreturn_args()
1277 * when the layout segment list is empty.
1279 * Note that a pnfs_layout_hdr can exist with an empty layout segment
1297 lo = nfsi->layout; in _pnfs_return_layout()
1300 dprintk("NFS: %s no layout to return\n", __func__); in _pnfs_return_layout()
1330 dprintk("NFS: %s no layout segments to return\n", __func__); in _pnfs_return_layout()
1355 lo = NFS_I(inode)->layout; in pnfs_commit_and_return_layout()
1396 lo = nfsi->layout; in pnfs_roc()
1423 /* Don't return layout if there is open file state */ in pnfs_roc()
1439 * doesn't invalidate the layout for us. in pnfs_roc()
1507 * that we need to release the layout in pnfs_roc_done()
1533 struct pnfs_layout_hdr *lo = args->layout; in pnfs_roc_release()
1565 lo = nfsi->layout; in pnfs_wait_on_layoutreturn()
1575 * Compare two layout segments for sorting into layout cache.
1705 dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout); in pnfs_find_alloc_layout()
1707 if (nfsi->layout != NULL) in pnfs_find_alloc_layout()
1713 if (likely(nfsi->layout == NULL)) { /* Won the race? */ in pnfs_find_alloc_layout()
1714 nfsi->layout = new; in pnfs_find_alloc_layout()
1719 pnfs_get_layout_hdr(nfsi->layout); in pnfs_find_alloc_layout()
1720 return nfsi->layout; in pnfs_find_alloc_layout()
1757 * lookup range in layout
1787 * when there are no layout segments. Note that in pnfs_update_layout iomode
1905 * Layout segment is retreived from the server if not cached.
1906 * The appropriate layout segment is referenced and returned to the caller.
1975 * If the layout segment list is empty, but there are outstanding in pnfs_update_layout()
1997 * Choose a stateid for the LAYOUTGET. If we don't have a layout in pnfs_update_layout()
2128 dprintk("%s: inode %s/%llu pNFS layout segment %s for " in pnfs_update_layout()
2278 * the "current stateid" value, the layout type, or the in pnfs_parse_lgopen()
2300 lo = NFS_I(lgp->args.inode)->layout; in pnfs_parse_lgopen()
2315 struct pnfs_layout_hdr *lo = NFS_I(inode)->layout; in nfs4_lgopen_release()
2326 struct pnfs_layout_hdr *lo = NFS_I(lgp->args.inode)->layout; in pnfs_layout_process()
2335 /* Inject layout blob into I/O device driver */ in pnfs_layout_process()
2341 dprintk("%s: Could not allocate layout: error %ld\n", in pnfs_layout_process()
2355 /* We have a completely new layout */ in pnfs_layout_process()
2392 * pnfs_mark_matching_lsegs_return - Free or return matching layout segments
2393 * @lo: pointer to layout header
2395 * @return_range: describe layout segment ranges to be returned
2399 * to free the layout segment immediately, or else to mark it for return
2404 * - EBUSY: there are layout segment that are still in use.
2405 * - ENOENT: there are no layout segments that need to be returned.
2454 lo = NFS_I(inode)->layout; in pnfs_mark_layout_for_return()
2712 * Calculate how many bytes are left in the layout segment in pnfs_generic_pg_test()
2764 * Called by non rpc-based layout drivers
2890 * Called by non rpc-based layout drivers
3026 list_for_each_entry(lseg, &NFS_I(inode)->layout->plh_segs, pls_list) { in pnfs_list_write_lseg()
3061 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3065 } else if (end_pos > nfsi->layout->plh_lwb) in pnfs_set_layoutcommit()
3066 nfsi->layout->plh_lwb = end_pos; in pnfs_set_layoutcommit()
3073 __func__, lseg, nfsi->layout->plh_lwb); in pnfs_set_layoutcommit()
3092 * For the LAYOUT4_NFSV4_1_FILES layout type, NFS_DATA_SYNC WRITEs and
3139 end_pos = nfsi->layout->plh_lwb; in pnfs_layoutcommit_inode()
3141 nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid); in pnfs_layoutcommit_inode()
3142 data->cred = get_cred(nfsi->layout->plh_lc_cred); in pnfs_layoutcommit_inode()
3161 if (end_pos > nfsi->layout->plh_lwb) in pnfs_layoutcommit_inode()
3162 nfsi->layout->plh_lwb = end_pos; in pnfs_layoutcommit_inode()
3223 if (!NFS_I(inode)->layout) { in pnfs_report_layoutstat()
3227 hdr = NFS_I(inode)->layout; in pnfs_report_layoutstat()