Lines Matching defs:nfsi

296 	struct nfs_inode *nfsi = NFS_I(lo->plh_inode);
298 nfsi->layout = NULL;
300 nfsi->write_io = 0;
301 nfsi->read_io = 0;
764 static struct pnfs_layout_hdr *__pnfs_destroy_layout(struct nfs_inode *nfsi)
769 spin_lock(&nfsi->vfs_inode.i_lock);
770 lo = nfsi->layout;
776 spin_unlock(&nfsi->vfs_inode.i_lock);
778 nfs_commit_inode(&nfsi->vfs_inode, 0);
781 spin_unlock(&nfsi->vfs_inode.i_lock);
785 void pnfs_destroy_layout(struct nfs_inode *nfsi)
787 __pnfs_destroy_layout(nfsi);
791 static bool pnfs_layout_removed(struct nfs_inode *nfsi,
796 spin_lock(&nfsi->vfs_inode.i_lock);
797 ret = nfsi->layout != lo;
798 spin_unlock(&nfsi->vfs_inode.i_lock);
802 void pnfs_destroy_layout_final(struct nfs_inode *nfsi)
804 struct pnfs_layout_hdr *lo = __pnfs_destroy_layout(nfsi);
807 wait_var_event(lo, pnfs_layout_removed(nfsi, lo));
1154 struct nfs_inode *nfsi = NFS_I(inode);
1157 if (!test_and_clear_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags))
1159 list_for_each_entry_safe(lseg, tmp, &nfsi->layout->plh_segs, pls_list) {
1333 struct nfs_inode *nfsi = NFS_I(ino);
1348 lo = nfsi->layout;
1425 struct nfs_inode *nfsi = NFS_I(ino);
1441 lo = nfsi->layout;
1464 list_for_each_entry_rcu(ctx, &nfsi->open_files, list) {
1606 struct nfs_inode *nfsi = NFS_I(ino);
1613 lo = nfsi->layout;
1750 struct nfs_inode *nfsi = NFS_I(ino);
1753 dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout);
1755 if (nfsi->layout != NULL)
1761 if (likely(nfsi->layout == NULL)) { /* Won the race? */
1762 nfsi->layout = new;
1767 pnfs_get_layout_hdr(nfsi->layout);
1768 return nfsi->layout;
1853 struct nfs_inode *nfsi = NFS_I(ino);
1872 dprintk("%s nfsi->read_io %llu\n", __func__,
1873 nfsi->read_io);
1875 if (nfsi->read_io < t->rd_io_sz)
1887 dprintk("%s nfsi->write_io %llu\n", __func__,
1888 nfsi->write_io);
1890 if (nfsi->write_io < t->wr_io_sz)
3162 struct nfs_inode *nfsi = NFS_I(inode);
3166 if (!test_and_set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)) {
3167 nfsi->layout->plh_lwb = end_pos;
3171 } else if (end_pos > nfsi->layout->plh_lwb)
3172 nfsi->layout->plh_lwb = end_pos;
3179 __func__, lseg, nfsi->layout->plh_lwb);
3210 struct nfs_inode *nfsi = NFS_I(inode);
3220 if (test_and_set_bit(NFS_INO_LAYOUTCOMMITTING, &nfsi->flags)) {
3223 status = wait_on_bit_lock_action(&nfsi->flags,
3239 if (!test_and_clear_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags))
3245 end_pos = nfsi->layout->plh_lwb;
3247 nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid);
3248 data->cred = get_cred(nfsi->layout->plh_lc_cred);
3266 set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags);
3267 if (end_pos > nfsi->layout->plh_lwb)
3268 nfsi->layout->plh_lwb = end_pos;
3314 struct nfs_inode *nfsi = NFS_I(inode);
3325 if (test_and_set_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags))
3361 clear_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags);