Home
last modified time | relevance | path

Searched refs:lseg (Results 1 – 18 of 18) sorted by relevance

/fs/nfs/
Dpnfs.c62 static bool pnfs_lseg_dec_and_remove_zero(struct pnfs_layout_segment *lseg,
375 struct pnfs_layout_segment *lseg; in pnfs_clear_layoutreturn_info() local
379 list_for_each_entry(lseg, &lo->plh_segs, pls_list) { in pnfs_clear_layoutreturn_info()
380 if (!test_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags)) in pnfs_clear_layoutreturn_info()
382 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_clear_layoutreturn_info()
396 pnfs_clear_lseg_state(struct pnfs_layout_segment *lseg, in pnfs_clear_lseg_state() argument
399 clear_bit(NFS_LSEG_ROC, &lseg->pls_flags); in pnfs_clear_lseg_state()
400 clear_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags); in pnfs_clear_lseg_state()
401 if (test_and_clear_bit(NFS_LSEG_VALID, &lseg->pls_flags)) in pnfs_clear_lseg_state()
402 pnfs_lseg_dec_and_remove_zero(lseg, free_me); in pnfs_clear_lseg_state()
[all …]
Dpnfs.h139 void (*free_lseg) (struct pnfs_layout_segment *lseg);
141 struct pnfs_layout_segment *lseg,
173 void (*cancel_io)(struct pnfs_layout_segment *lseg);
186 struct pnfs_layout_segment *lseg,
253 void pnfs_put_lseg(struct pnfs_layout_segment *lseg);
267 void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg);
330 struct pnfs_layout_segment *lseg,
333 bool (*do_merge)(struct pnfs_layout_segment *lseg,
342 struct pnfs_layout_segment *lseg);
387 struct pnfs_layout_segment *lseg);
[all …]
Dpnfs_nfs.c56 pnfs_put_lseg(data->lseg); in pnfs_generic_commit_release()
66 struct pnfs_layout_segment *freeme = bucket->lseg; in pnfs_free_bucket_lseg()
67 bucket->lseg = NULL; in pnfs_free_bucket_lseg()
108 p->lseg = NULL; in pnfs_alloc_commit_array()
112 b->lseg = NULL; in pnfs_alloc_commit_array()
128 struct pnfs_layout_segment *lseg) in pnfs_find_commit_array_by_lseg() argument
133 if (array->lseg == lseg) in pnfs_find_commit_array_by_lseg()
142 struct pnfs_layout_segment *lseg) in pnfs_add_commit_array() argument
146 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_add_commit_array()
149 new->lseg = lseg; in pnfs_add_commit_array()
[all …]
Dnfs4trace.h1469 #define NFS4_LSEG_LAYOUT_STATEID_HASH(lseg) \ argument
1470 (lseg ? nfs_stateid_hash(&lseg->pls_layout->plh_stateid) : 0)
1472 #define NFS4_LSEG_LAYOUT_STATEID_HASH(lseg) (0) argument
1504 const struct pnfs_layout_segment *lseg = hdr->lseg;
1517 __entry->layoutstateid_seq = lseg ? lseg->pls_seq : 0;
1519 NFS4_LSEG_LAYOUT_STATEID_HASH(lseg);
1578 const struct pnfs_layout_segment *lseg = hdr->lseg;
1591 __entry->layoutstateid_seq = lseg ? lseg->pls_seq : 0;
1593 NFS4_LSEG_LAYOUT_STATEID_HASH(lseg);
1648 const struct pnfs_layout_segment *lseg = data->lseg;
[all …]
Dnfs42proc.c882 nfs42_alloc_layouterror_data(struct pnfs_layout_segment *lseg, gfp_t gfp_flags) in nfs42_alloc_layouterror_data() argument
885 struct inode *inode = lseg->pls_layout->plh_inode; in nfs42_alloc_layouterror_data()
891 data->lseg = pnfs_get_lseg(lseg); in nfs42_alloc_layouterror_data()
892 if (data->lseg) in nfs42_alloc_layouterror_data()
904 pnfs_put_lseg(data->lseg); in nfs42_free_layouterror_data()
915 struct pnfs_layout_hdr *lo = data->lseg->pls_layout; in nfs42_layouterror_prepare()
937 struct pnfs_layout_hdr *lo = data->lseg->pls_layout; in nfs42_layouterror_done()
1007 int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg, in nfs42_proc_layouterror() argument
1010 struct inode *inode = lseg->pls_layout->plh_inode; in nfs42_proc_layouterror()
1027 data = nfs42_alloc_layouterror_data(lseg, nfs_io_gfp_mask()); in nfs42_proc_layouterror()
Dwrite.c945 nfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, in nfs_mark_request_commit() argument
948 if (pnfs_mark_request_commit(req, lseg, cinfo, ds_commit_idx)) in nfs_mark_request_commit()
984 return hdr->lseg == NULL; in nfs_write_need_commit()
1017 nfs_mark_request_commit(req, hdr->lseg, &cinfo, in nfs_write_completion()
1744 struct pnfs_layout_segment *lseg, in nfs_init_commit() argument
1763 data->lseg = lseg; /* reference transferred */ in nfs_init_commit()
1765 if (lseg) in nfs_init_commit()
1784 struct pnfs_layout_segment *lseg, in nfs_retry_commit() argument
1793 nfs_mark_request_commit(req, lseg, cinfo, ds_commit_idx); in nfs_retry_commit()
Dnfs42.h28 int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
Dinternal.h527 struct pnfs_layout_segment *lseg,
535 struct pnfs_layout_segment *lseg,
543 struct pnfs_layout_segment *lseg,
Ddirect.c760 nfs_mark_request_commit(req, hdr->lseg, &cinfo, in nfs_direct_write_completion()
Dnfs4proc.c9769 struct pnfs_layout_segment *lseg = NULL; in nfs4_proc_layoutget() local
9793 lseg = pnfs_layout_process(lgp); in nfs4_proc_layoutget()
9805 return lseg; in nfs4_proc_layoutget()
/fs/nfs/filelayout/
Dfilelayout.c74 filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset) in filelayout_get_dserver_offset() argument
76 struct nfs4_filelayout_segment *flseg = FILELAYOUT_LSEG(lseg); in filelayout_get_dserver_offset()
126 struct pnfs_layout_segment *lseg) in filelayout_async_handle_error() argument
128 struct pnfs_layout_hdr *lo = lseg->pls_layout; in filelayout_async_handle_error()
130 struct nfs4_deviceid_node *devid = FILELAYOUT_DEVID_NODE(lseg); in filelayout_async_handle_error()
189 pnfs_error_mark_layout_for_return(inode, lseg); in filelayout_async_handle_error()
190 pnfs_set_lo_fail(lseg); in filelayout_async_handle_error()
212 hdr->ds_clp, hdr->lseg); in filelayout_read_done_cb()
236 if (FILELAYOUT_LSEG(hdr->lseg)->commit_through_mds || in filelayout_set_layoutcommit()
243 pnfs_set_layoutcommit(hdr->inode, hdr->lseg, end_offs); in filelayout_set_layoutcommit()
[all …]
Dfilelayout.h82 FILELAYOUT_LSEG(struct pnfs_layout_segment *lseg) in FILELAYOUT_LSEG() argument
84 return container_of(lseg, in FILELAYOUT_LSEG()
90 FILELAYOUT_DEVID_NODE(struct pnfs_layout_segment *lseg) in FILELAYOUT_DEVID_NODE() argument
92 return &FILELAYOUT_LSEG(lseg)->dsaddr->id_node; in FILELAYOUT_DEVID_NODE()
105 nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j);
107 u32 nfs4_fl_calc_j_index(struct pnfs_layout_segment *lseg, loff_t offset);
108 u32 nfs4_fl_calc_ds_index(struct pnfs_layout_segment *lseg, u32 j);
109 struct nfs4_pnfs_ds *nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg,
Dfilelayoutdev.c222 nfs4_fl_calc_j_index(struct pnfs_layout_segment *lseg, loff_t offset) in nfs4_fl_calc_j_index() argument
224 struct nfs4_filelayout_segment *flseg = FILELAYOUT_LSEG(lseg); in nfs4_fl_calc_j_index()
234 nfs4_fl_calc_ds_index(struct pnfs_layout_segment *lseg, u32 j) in nfs4_fl_calc_ds_index() argument
236 return FILELAYOUT_LSEG(lseg)->dsaddr->stripe_indices[j]; in nfs4_fl_calc_ds_index()
240 nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j) in nfs4_fl_select_ds_fh() argument
242 struct nfs4_filelayout_segment *flseg = FILELAYOUT_LSEG(lseg); in nfs4_fl_select_ds_fh()
252 i = nfs4_fl_calc_ds_index(lseg, j); in nfs4_fl_select_ds_fh()
260 nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx) in nfs4_fl_prepare_ds() argument
262 struct nfs4_file_layout_dsaddr *dsaddr = FILELAYOUT_LSEG(lseg)->dsaddr; in nfs4_fl_prepare_ds()
264 struct nfs4_deviceid_node *devid = FILELAYOUT_DEVID_NODE(lseg); in nfs4_fl_prepare_ds()
[all …]
/fs/nfs/flexfilelayout/
Dflexfilelayout.c343 struct pnfs_layout_segment *lseg, in ff_layout_add_lseg() argument
346 pnfs_generic_layout_insert_lseg(lo, lseg, in ff_layout_add_lseg()
560 ff_layout_free_lseg(struct pnfs_layout_segment *lseg) in ff_layout_free_lseg() argument
562 struct nfs4_ff_layout_segment *fls = FF_LAYOUT_LSEG(lseg); in ff_layout_free_lseg()
566 if (lseg->pls_range.iomode == IOMODE_RW) { in ff_layout_free_lseg()
570 ffl = FF_LAYOUT_FROM_HDR(lseg->pls_layout); in ff_layout_free_lseg()
573 pnfs_generic_ds_cinfo_release_lseg(&ffl->commit_info, lseg); in ff_layout_free_lseg()
724 ff_layout_mark_ds_unreachable(struct pnfs_layout_segment *lseg, u32 idx) in ff_layout_mark_ds_unreachable() argument
726 struct nfs4_deviceid_node *devid = FF_LAYOUT_DEVID_NODE(lseg, idx); in ff_layout_mark_ds_unreachable()
733 ff_layout_mark_ds_reachable(struct pnfs_layout_segment *lseg, u32 idx) in ff_layout_mark_ds_reachable() argument
[all …]
Dflexfilelayout.h128 FF_LAYOUT_LSEG(struct pnfs_layout_segment *lseg) in FF_LAYOUT_LSEG() argument
130 return container_of(lseg, in FF_LAYOUT_LSEG()
142 FF_LAYOUT_COMP(struct pnfs_layout_segment *lseg, u32 idx) in FF_LAYOUT_COMP() argument
144 struct nfs4_ff_layout_segment *fls = FF_LAYOUT_LSEG(lseg); in FF_LAYOUT_COMP()
152 FF_LAYOUT_DEVID_NODE(struct pnfs_layout_segment *lseg, u32 idx) in FF_LAYOUT_DEVID_NODE() argument
154 struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, idx); in FF_LAYOUT_DEVID_NODE()
166 FF_LAYOUT_MIRROR_COUNT(struct pnfs_layout_segment *lseg) in FF_LAYOUT_MIRROR_COUNT() argument
168 return FF_LAYOUT_LSEG(lseg)->mirror_array_cnt; in FF_LAYOUT_MIRROR_COUNT()
172 ff_layout_no_fallback_to_mds(struct pnfs_layout_segment *lseg) in ff_layout_no_fallback_to_mds() argument
174 return FF_LAYOUT_LSEG(lseg)->flags & FF_FLAGS_NO_IO_THRU_MDS; in ff_layout_no_fallback_to_mds()
[all …]
Dflexfilelayoutdev.c24 static bool ff_layout_has_available_ds(struct pnfs_layout_segment *lseg);
369 nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, in nfs4_ff_layout_prepare_ds() argument
374 struct inode *ino = lseg->pls_layout->plh_inode; in nfs4_ff_layout_prepare_ds()
379 if (!ff_layout_init_mirror_ds(lseg->pls_layout, mirror)) in nfs4_ff_layout_prepare_ds()
408 ff_layout_track_ds_error(FF_LAYOUT_FROM_HDR(lseg->pls_layout), in nfs4_ff_layout_prepare_ds()
409 mirror, lseg->pls_range.offset, in nfs4_ff_layout_prepare_ds()
410 lseg->pls_range.length, NFS4ERR_NXIO, in nfs4_ff_layout_prepare_ds()
412 ff_layout_send_layouterror(lseg); in nfs4_ff_layout_prepare_ds()
413 if (fail_return || !ff_layout_has_available_ds(lseg)) in nfs4_ff_layout_prepare_ds()
414 pnfs_error_mark_layout_for_return(ino, lseg); in nfs4_ff_layout_prepare_ds()
[all …]
/fs/nfs/blocklayout/
Dblocklayout.c171 struct pnfs_block_layout *bl = BLK_LSEG2EXT(header->lseg); in bl_mark_devices_unavailable()
201 pnfs_set_lo_fail(header->lseg); in bl_end_io_read()
232 struct pnfs_block_layout *bl = BLK_LSEG2EXT(header->lseg); in bl_read_pagelist()
331 pnfs_set_lo_fail(header->lseg); in bl_end_io_write()
350 struct pnfs_block_layout *bl = BLK_LSEG2EXT(hdr->lseg); in bl_write_cleanup()
377 struct pnfs_block_layout *bl = BLK_LSEG2EXT(header->lseg); in bl_write_pagelist()
488 static void bl_free_lseg(struct pnfs_layout_segment *lseg) in bl_free_lseg() argument
491 kfree(lseg); in bl_free_lseg()
656 struct pnfs_layout_segment *lseg; in bl_alloc_lseg() local
667 lseg = kzalloc(sizeof(*lseg), gfp_mask); in bl_alloc_lseg()
[all …]
Dblocklayout.h153 BLK_LSEG2EXT(struct pnfs_layout_segment *lseg) in BLK_LSEG2EXT() argument
155 return BLK_LO2EXT(lseg->pls_layout); in BLK_LSEG2EXT()