Lines Matching refs: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;
765 static struct pnfs_layout_hdr *__pnfs_destroy_layout(struct nfs_inode *nfsi)
770 spin_lock(&nfsi->vfs_inode.i_lock);
771 lo = nfsi->layout;
777 spin_unlock(&nfsi->vfs_inode.i_lock);
779 nfs_commit_inode(&nfsi->vfs_inode, 0);
782 spin_unlock(&nfsi->vfs_inode.i_lock);
786 void pnfs_destroy_layout(struct nfs_inode *nfsi)
788 __pnfs_destroy_layout(nfsi);
792 static bool pnfs_layout_removed(struct nfs_inode *nfsi,
797 spin_lock(&nfsi->vfs_inode.i_lock);
798 ret = nfsi->layout != lo;
799 spin_unlock(&nfsi->vfs_inode.i_lock);
803 void pnfs_destroy_layout_final(struct nfs_inode *nfsi)
805 struct pnfs_layout_hdr *lo = __pnfs_destroy_layout(nfsi);
808 wait_var_event(lo, pnfs_layout_removed(nfsi, lo));
1156 struct nfs_inode *nfsi = NFS_I(inode);
1159 if (!test_and_clear_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags))
1161 list_for_each_entry_safe(lseg, tmp, &nfsi->layout->plh_segs, pls_list) {
1335 struct nfs_inode *nfsi = NFS_I(ino);
1350 lo = nfsi->layout;
1427 struct nfs_inode *nfsi = NFS_I(ino);
1443 lo = nfsi->layout;
1466 list_for_each_entry_rcu(ctx, &nfsi->open_files, list) {
1609 struct nfs_inode *nfsi = NFS_I(ino);
1616 lo = nfsi->layout;
1753 struct nfs_inode *nfsi = NFS_I(ino);
1756 dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout);
1758 if (nfsi->layout != NULL)
1764 if (likely(nfsi->layout == NULL)) { /* Won the race? */
1765 nfsi->layout = new;
1770 pnfs_get_layout_hdr(nfsi->layout);
1771 return nfsi->layout;
1856 struct nfs_inode *nfsi = NFS_I(ino);
1875 dprintk("%s nfsi->read_io %llu\n", __func__,
1876 nfsi->read_io);
1878 if (nfsi->read_io < t->rd_io_sz)
1890 dprintk("%s nfsi->write_io %llu\n", __func__,
1891 nfsi->write_io);
1893 if (nfsi->write_io < t->wr_io_sz)
3152 struct nfs_inode *nfsi = NFS_I(inode);
3156 if (!test_and_set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)) {
3157 nfsi->layout->plh_lwb = end_pos;
3161 } else if (end_pos > nfsi->layout->plh_lwb)
3162 nfsi->layout->plh_lwb = end_pos;
3169 __func__, lseg, nfsi->layout->plh_lwb);
3200 struct nfs_inode *nfsi = NFS_I(inode);
3210 if (test_and_set_bit(NFS_INO_LAYOUTCOMMITTING, &nfsi->flags)) {
3213 status = wait_on_bit_lock_action(&nfsi->flags,
3229 if (!test_and_clear_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags))
3235 end_pos = nfsi->layout->plh_lwb;
3237 nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid);
3238 data->cred = get_cred(nfsi->layout->plh_lc_cred);
3256 set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags);
3257 if (end_pos > nfsi->layout->plh_lwb)
3258 nfsi->layout->plh_lwb = end_pos;
3304 struct nfs_inode *nfsi = NFS_I(inode);
3315 if (test_and_set_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags))
3351 clear_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags);