Lines Matching refs:dres

276 	struct xfs_defer_resources	*dres,  in xfs_defer_save_resources()  argument
283 BUILD_BUG_ON(NBBY * sizeof(dres->dr_ordered) < XFS_DEFER_OPS_NR_BUFS); in xfs_defer_save_resources()
291 if (dres->dr_bufs >= XFS_DEFER_OPS_NR_BUFS) { in xfs_defer_save_resources()
296 dres->dr_ordered |= in xfs_defer_save_resources()
297 (1U << dres->dr_bufs); in xfs_defer_save_resources()
300 dres->dr_bp[dres->dr_bufs++] = bli->bli_buf; in xfs_defer_save_resources()
307 if (dres->dr_inos >= XFS_DEFER_OPS_NR_INODES) { in xfs_defer_save_resources()
313 dres->dr_ip[dres->dr_inos++] = ili->ili_inode; in xfs_defer_save_resources()
328 struct xfs_defer_resources *dres) in xfs_defer_restore_resources() argument
333 for (i = 0; i < dres->dr_inos; i++) in xfs_defer_restore_resources()
334 xfs_trans_ijoin(tp, dres->dr_ip[i], 0); in xfs_defer_restore_resources()
337 for (i = 0; i < dres->dr_bufs; i++) { in xfs_defer_restore_resources()
338 xfs_trans_bjoin(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
339 if (dres->dr_ordered & (1U << i)) in xfs_defer_restore_resources()
340 xfs_trans_ordered_buf(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
341 xfs_trans_bhold(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
350 struct xfs_defer_resources dres = { }; in xfs_defer_trans_roll() local
353 error = xfs_defer_save_resources(&dres, *tpp); in xfs_defer_trans_roll()
368 xfs_defer_restore_resources(*tpp, &dres); in xfs_defer_trans_roll()
823 struct xfs_defer_resources *dres) in xfs_defer_ops_continue() argument
842 memcpy(dres, &dfc->dfc_held, sizeof(struct xfs_defer_resources)); in xfs_defer_ops_continue()
843 dres->dr_bufs = 0; in xfs_defer_ops_continue()
855 struct xfs_defer_resources *dres) in xfs_defer_resources_rele() argument
859 for (i = 0; i < dres->dr_inos; i++) { in xfs_defer_resources_rele()
860 xfs_iunlock(dres->dr_ip[i], XFS_ILOCK_EXCL); in xfs_defer_resources_rele()
861 xfs_irele(dres->dr_ip[i]); in xfs_defer_resources_rele()
862 dres->dr_ip[i] = NULL; in xfs_defer_resources_rele()
865 for (i = 0; i < dres->dr_bufs; i++) { in xfs_defer_resources_rele()
866 xfs_buf_relse(dres->dr_bp[i]); in xfs_defer_resources_rele()
867 dres->dr_bp[i] = NULL; in xfs_defer_resources_rele()
870 dres->dr_inos = 0; in xfs_defer_resources_rele()
871 dres->dr_bufs = 0; in xfs_defer_resources_rele()
872 dres->dr_ordered = 0; in xfs_defer_resources_rele()