Home
last modified time | relevance | path

Searched refs:tp (Results 1 – 25 of 61) sorted by relevance

123

/fs/xfs/
Dxfs_trans.c247 xfs_trans_t *tp; in _xfs_trans_alloc() local
251 tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); in _xfs_trans_alloc()
252 tp->t_magic = XFS_TRANS_MAGIC; in _xfs_trans_alloc()
253 tp->t_type = type; in _xfs_trans_alloc()
254 tp->t_mountp = mp; in _xfs_trans_alloc()
255 tp->t_items_free = XFS_LIC_NUM_SLOTS; in _xfs_trans_alloc()
256 tp->t_busy_free = XFS_LBC_NUM_SLOTS; in _xfs_trans_alloc()
257 xfs_lic_init(&(tp->t_items)); in _xfs_trans_alloc()
258 XFS_LBC_INIT(&(tp->t_busy)); in _xfs_trans_alloc()
259 return tp; in _xfs_trans_alloc()
[all …]
Dxfs_utils.c71 xfs_trans_t *tp; in xfs_dir_ialloc() local
82 tp = *tpp; in xfs_dir_ialloc()
83 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_dir_ialloc()
100 code = xfs_ialloc(tp, dp, mode, nlink, rdev, credp, prid, okalloc, in xfs_dir_ialloc()
132 xfs_trans_bhold(tp, ialloc_context); in xfs_dir_ialloc()
137 log_res = xfs_trans_get_log_res(tp); in xfs_dir_ialloc()
138 log_count = xfs_trans_get_log_count(tp); in xfs_dir_ialloc()
147 if (tp->t_dqinfo) { in xfs_dir_ialloc()
148 dqinfo = (void *)tp->t_dqinfo; in xfs_dir_ialloc()
149 tp->t_dqinfo = NULL; in xfs_dir_ialloc()
[all …]
Dxfs_trans_item.c46 xfs_trans_add_item(xfs_trans_t *tp, xfs_log_item_t *lip) in xfs_trans_add_item() argument
56 if (tp->t_items_free == 0) { in xfs_trans_add_item()
73 licp->lic_next = tp->t_items.lic_next; in xfs_trans_add_item()
74 tp->t_items.lic_next = licp; in xfs_trans_add_item()
75 tp->t_items_free = XFS_LIC_NUM_SLOTS - 1; in xfs_trans_add_item()
89 lip->li_mountp = tp->t_mountp; in xfs_trans_add_item()
90 lip->li_ailp = tp->t_mountp->m_ail; in xfs_trans_add_item()
98 licp = &tp->t_items; in xfs_trans_add_item()
126 tp->t_items_free--; in xfs_trans_add_item()
131 lip->li_mountp = tp->t_mountp; in xfs_trans_add_item()
[all …]
Dxfs_vnodeops.c65 xfs_trans_t *tp; in xfs_setattr() local
131 tp = NULL; in xfs_setattr()
138 tp = xfs_trans_alloc(mp, XFS_TRANS_SETATTR_NOT_SIZE); in xfs_setattr()
140 if ((code = xfs_trans_reserve(tp, 0, in xfs_setattr()
185 ASSERT(tp); in xfs_setattr()
186 code = XFS_QM_DQVOPCHOWNRESV(mp, tp, ip, udqp, gdqp, in xfs_setattr()
269 ASSERT(tp == NULL); in xfs_setattr()
274 tp = xfs_trans_alloc(mp, XFS_TRANS_SETATTR_SIZE); in xfs_setattr()
275 if ((code = xfs_trans_reserve(tp, 0, in xfs_setattr()
279 xfs_trans_cancel(tp, 0); in xfs_setattr()
[all …]
Dxfs_trans_buf.c67 xfs_trans_get_buf(xfs_trans_t *tp, in xfs_trans_get_buf() argument
82 if (tp == NULL) { in xfs_trans_get_buf()
94 if (tp->t_items.lic_next == NULL) { in xfs_trans_get_buf()
95 bp = xfs_trans_buf_item_match(tp, target_dev, blkno, len); in xfs_trans_get_buf()
97 bp = xfs_trans_buf_item_match_all(tp, target_dev, blkno, len); in xfs_trans_get_buf()
101 if (XFS_FORCED_SHUTDOWN(tp->t_mountp)) { in xfs_trans_get_buf()
114 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_get_buf()
144 xfs_buf_item_init(bp, tp->t_mountp); in xfs_trans_get_buf()
164 (void) xfs_trans_add_item(tp, (xfs_log_item_t*)bip); in xfs_trans_get_buf()
170 XFS_BUF_SET_FSPRIVATE2(bp, tp); in xfs_trans_get_buf()
[all …]
Dxfs_rtalloc.c104 xfs_trans_t *tp; in xfs_growfs_rt_alloc() local
106 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFSRT_ALLOC); in xfs_growfs_rt_alloc()
111 if ((error = xfs_trans_reserve(tp, resblks, in xfs_growfs_rt_alloc()
120 if ((error = xfs_trans_iget(mp, tp, ino, 0, in xfs_growfs_rt_alloc()
129 error = xfs_bmapi(tp, ip, oblocks, nblocks - oblocks, in xfs_growfs_rt_alloc()
139 error = xfs_bmap_finish(&tp, &flist, &committed); in xfs_growfs_rt_alloc()
142 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_growfs_rt_alloc()
153 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFSRT_ZERO); in xfs_growfs_rt_alloc()
157 if ((error = xfs_trans_reserve(tp, 0, in xfs_growfs_rt_alloc()
163 if ((error = xfs_trans_iget(mp, tp, ino, 0, in xfs_growfs_rt_alloc()
[all …]
Dxfs_rename.c105 xfs_trans_t *tp = NULL; in xfs_rename() local
151 tp = xfs_trans_alloc(mp, XFS_TRANS_RENAME); in xfs_rename()
154 error = xfs_trans_reserve(tp, spaceres, XFS_RENAME_LOG_RES(mp), 0, in xfs_rename()
158 error = xfs_trans_reserve(tp, 0, XFS_RENAME_LOG_RES(mp), 0, in xfs_rename()
162 xfs_trans_cancel(tp, 0); in xfs_rename()
170 xfs_trans_cancel(tp, cancel_flags); in xfs_rename()
191 xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL); in xfs_rename()
195 xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL); in xfs_rename()
199 xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL); in xfs_rename()
203 xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL); in xfs_rename()
[all …]
Dxfs_trans_extfree.c38 xfs_trans_get_efi(xfs_trans_t *tp, in xfs_trans_get_efi() argument
43 ASSERT(tp != NULL); in xfs_trans_get_efi()
46 efip = xfs_efi_init(tp->t_mountp, nextents); in xfs_trans_get_efi()
52 (void) xfs_trans_add_item(tp, (xfs_log_item_t*)efip); in xfs_trans_get_efi()
63 xfs_trans_log_efi_extent(xfs_trans_t *tp, in xfs_trans_log_efi_extent() argument
72 lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)efip); in xfs_trans_log_efi_extent()
75 tp->t_flags |= XFS_TRANS_DIRTY; in xfs_trans_log_efi_extent()
94 xfs_trans_get_efd(xfs_trans_t *tp, in xfs_trans_get_efd() argument
100 ASSERT(tp != NULL); in xfs_trans_get_efd()
103 efdp = xfs_efd_init(tp->t_mountp, efip, nextents); in xfs_trans_get_efd()
[all …]
Dxfs_dir2_leaf.c54 static void xfs_dir2_leaf_log_bests(struct xfs_trans *tp, struct xfs_dabuf *bp,
56 static void xfs_dir2_leaf_log_tail(struct xfs_trans *tp, struct xfs_dabuf *bp);
81 xfs_trans_t *tp; /* transaction pointer */ in xfs_dir2_block_to_leaf() local
86 tp = args->trans; in xfs_dir2_block_to_leaf()
119 xfs_dir2_leaf_log_ents(tp, lbp, 0, be16_to_cpu(leaf->hdr.count) - 1); in xfs_dir2_block_to_leaf()
126 xfs_dir2_data_make_free(tp, dbp, in xfs_dir2_block_to_leaf()
148 xfs_dir2_data_log_header(tp, dbp); in xfs_dir2_block_to_leaf()
151 xfs_dir2_leaf_log_bests(tp, lbp, 0, 0); in xfs_dir2_block_to_leaf()
188 xfs_trans_t *tp; /* transaction pointer */ in xfs_dir2_leaf_addname() local
193 tp = args->trans; in xfs_dir2_leaf_addname()
[all …]
Dxfs_rw.c58 xfs_trans_t *tp; in xfs_write_clear_setuid() local
62 tp = xfs_trans_alloc(mp, XFS_TRANS_WRITEID); in xfs_write_clear_setuid()
63 if ((error = xfs_trans_reserve(tp, 0, in xfs_write_clear_setuid()
66 xfs_trans_cancel(tp, 0); in xfs_write_clear_setuid()
70 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_write_clear_setuid()
71 xfs_trans_ihold(tp, ip); in xfs_write_clear_setuid()
84 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_write_clear_setuid()
85 xfs_trans_set_sync(tp); in xfs_write_clear_setuid()
86 error = xfs_trans_commit(tp, 0); in xfs_write_clear_setuid()
137 xfs_trans_t *tp; in xfs_write_sync_logforce() local
[all …]
Dxfs_trans_inode.c80 xfs_trans_t *tp, in xfs_trans_iget() argument
93 if (tp == NULL) in xfs_trans_iget()
105 if ((ip = xfs_inode_incore(tp->t_mountp, ino, tp)) != NULL) { in xfs_trans_iget()
134 error = xfs_iget(tp->t_mountp, tp, ino, flags, lock_flags, &ip, 0); in xfs_trans_iget()
140 xfs_trans_ijoin(tp, ip, lock_flags); in xfs_trans_iget()
153 xfs_trans_t *tp, in xfs_trans_ijoin() argument
172 (void) xfs_trans_add_item(tp, (xfs_log_item_t*)(iip)); in xfs_trans_ijoin()
189 ip->i_transp = tp; in xfs_trans_ijoin()
202 xfs_trans_t *tp, in xfs_trans_ihold() argument
205 ASSERT(ip->i_transp == tp); in xfs_trans_ihold()
[all …]
Dxfs_quota.h330 #define XFS_DQTRXOP(mp, tp, op, args...) \ argument
332 ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : 0)
334 #define XFS_DQTRXOP_VOID(mp, tp, op, args...) \ argument
336 ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : (void)0)
340 #define XFS_TRANS_FREE_DQINFO(mp, tp) \ argument
341 XFS_DQTRXOP_VOID(mp, tp, qo_free_dqinfo)
342 #define XFS_TRANS_MOD_DQUOT_BYINO(mp, tp, ip, field, delta) \ argument
343 XFS_DQTRXOP_VOID(mp, tp, qo_mod_dquot_byino, ip, field, delta)
344 #define XFS_TRANS_APPLY_DQUOT_DELTAS(mp, tp) \ argument
345 XFS_DQTRXOP_VOID(mp, tp, qo_apply_dquot_deltas)
[all …]
Dxfs_dir2.c179 xfs_trans_t *tp, in xfs_dir_init() argument
188 args.trans = tp; in xfs_dir_init()
190 if ((error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino))) in xfs_dir_init()
200 xfs_trans_t *tp, in xfs_dir_createname() argument
213 if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) in xfs_dir_createname()
227 args.trans = tp; in xfs_dir_createname()
232 else if ((rval = xfs_dir2_isblock(tp, dp, &v))) in xfs_dir_createname()
236 else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) in xfs_dir_createname()
278 xfs_trans_t *tp, in xfs_dir_lookup() argument
297 args.trans = tp; in xfs_dir_lookup()
[all …]
Dxfs_dir2_block.c45 static void xfs_dir2_block_log_leaf(xfs_trans_t *tp, xfs_dabuf_t *bp, int first,
47 static void xfs_dir2_block_log_tail(xfs_trans_t *tp, xfs_dabuf_t *bp);
95 xfs_trans_t *tp; /* transaction structure */ in xfs_dir2_block_addname() local
99 tp = args->trans; in xfs_dir2_block_addname()
105 xfs_da_read_buf(tp, dp, mp->m_dirdatablk, -1, &bp, XFS_DATA_FORK))) { in xfs_dir2_block_addname()
116 xfs_da_brelse(tp, bp); in xfs_dir2_block_addname()
219 xfs_da_brelse(tp, bp); in xfs_dir2_block_addname()
275 xfs_dir2_data_make_free(tp, bp, in xfs_dir2_block_addname()
320 xfs_dir2_data_use_free(tp, bp, enddup, in xfs_dir2_block_addname()
402 xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); in xfs_dir2_block_addname()
[all …]
Dxfs_alloc.c49 xfs_alloc_search_busy(xfs_trans_t *tp,
63 #define TRACE_BUSY(__func__,s,ag,agb,l,sl,tp) \ argument
64 xfs_alloc_trace_busy(__func__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSY, __LINE__)
65 #define TRACE_UNBUSY(__func__,s,ag,sl,tp) \ argument
66 xfs_alloc_trace_busy(__func__, s, mp, ag, -1, -1, sl, tp, XFS_ALLOC_KTRACE_UNBUSY, __LINE__)
67 #define TRACE_BUSYSEARCH(__func__,s,ag,agb,l,tp) \ argument
68 xfs_alloc_trace_busy(__func__, s, mp, ag, agb, l, 0, tp, XFS_ALLOC_KTRACE_BUSYSEARCH, __LINE__)
73 #define TRACE_BUSY(s,a,ag,agb,l,sl,tp) argument
74 #define TRACE_UNBUSY(fname,s,ag,sl,tp) argument
75 #define TRACE_BUSYSEARCH(fname,s,ag,agb,l,tp) argument
[all …]
Dxfs_alloc.h72 struct xfs_trans *tp; /* transaction pointer */ member
125 xfs_alloc_mark_busy(xfs_trans_t *tp,
131 xfs_alloc_clear_busy(xfs_trans_t *tp,
150 struct xfs_trans *tp, /* transaction pointer */
160 struct xfs_trans *tp, /* transaction pointer */
170 struct xfs_trans *tp, /* transaction pointer */
179 struct xfs_trans *tp, /* transaction pointer */
191 struct xfs_trans *tp, /* transaction pointer */
208 struct xfs_trans *tp, /* transaction pointer */
Dxfs_iomap.c409 xfs_trans_t *tp; in xfs_iomap_write_direct() local
465 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); in xfs_iomap_write_direct()
466 error = xfs_trans_reserve(tp, resblks, in xfs_iomap_write_direct()
474 xfs_trans_cancel(tp, 0); in xfs_iomap_write_direct()
479 error = XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, in xfs_iomap_write_direct()
484 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_iomap_write_direct()
485 xfs_trans_ihold(tp, ip); in xfs_iomap_write_direct()
496 error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, bmapi_flag, in xfs_iomap_write_direct()
504 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_iomap_write_direct()
507 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_iomap_write_direct()
[all …]
Dxfs_dir2.h70 extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp,
72 extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
76 extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
79 extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp,
83 extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
87 extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp,
96 extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp,
98 extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp,
Dxfs_ialloc.c161 xfs_trans_t *tp, /* transaction pointer */ in xfs_ialloc_ag_alloc() argument
186 args.tp = tp; in xfs_ialloc_ag_alloc()
187 args.mp = tp->t_mountp; in xfs_ialloc_ag_alloc()
342 fbuf = xfs_trans_get_buf(tp, args.mp->m_ddev_targp, d, in xfs_ialloc_ag_alloc()
365 xfs_trans_log_buf(tp, fbuf, ioffset, ioffset + isize - 1); in xfs_ialloc_ag_alloc()
367 xfs_trans_inode_alloc_buf(tp, fbuf); in xfs_ialloc_ag_alloc()
379 cur = xfs_inobt_init_cursor(args.mp, tp, agbp, agno); in xfs_ialloc_ag_alloc()
399 xfs_ialloc_log_agi(tp, agbp, in xfs_ialloc_ag_alloc()
404 xfs_trans_mod_sb(tp, XFS_TRANS_SB_ICOUNT, (long)newlen); in xfs_ialloc_ag_alloc()
405 xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, (long)newlen); in xfs_ialloc_ag_alloc()
[all …]
Dxfs_dfrag.c117 xfs_trans_t *tp; in xfs_swap_extents() local
238 tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); in xfs_swap_extents()
239 if ((error = xfs_trans_reserve(tp, 0, in xfs_swap_extents()
244 xfs_trans_cancel(tp, 0); in xfs_swap_extents()
255 error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &aforkblks); in xfs_swap_extents()
257 xfs_trans_cancel(tp, 0); in xfs_swap_extents()
263 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, in xfs_swap_extents()
266 xfs_trans_cancel(tp, 0); in xfs_swap_extents()
335 xfs_trans_ijoin(tp, ip, lock_flags); in xfs_swap_extents()
338 xfs_trans_ijoin(tp, tip, lock_flags); in xfs_swap_extents()
[all …]
Dxfs_bmap.h122 struct xfs_trans *tp; /* transaction pointer */ member
214 struct xfs_trans *tp, /* transaction pointer */
228 struct xfs_trans *tp, /* transaction pointer */
240 struct xfs_trans *tp, /* transaction pointer */
262 struct xfs_trans *tp, /* transaction pointer */
281 struct xfs_trans *tp, /* transaction pointer */
304 struct xfs_trans *tp, /* transaction pointer */
318 struct xfs_trans *tp, /* transaction pointer */
353 struct xfs_trans **tp, /* transaction pointer addr */
386 xfs_trans_t *tp,
Dxfs_dir2_node.c46 static void xfs_dir2_free_log_header(xfs_trans_t *tp, xfs_dabuf_t *bp);
70 xfs_trans_t *tp, /* transaction pointer */ in xfs_dir2_free_log_bests() argument
79 xfs_da_log_buf(tp, bp, in xfs_dir2_free_log_bests()
90 xfs_trans_t *tp, /* transaction pointer */ in xfs_dir2_free_log_header() argument
97 xfs_da_log_buf(tp, bp, (uint)((char *)&free->hdr - (char *)free), in xfs_dir2_free_log_header()
124 xfs_trans_t *tp; /* transaction pointer */ in xfs_dir2_leaf_to_node() local
129 tp = args->trans; in xfs_dir2_leaf_to_node()
140 if ((error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(mp, fdb), -1, &fbp, in xfs_dir2_leaf_to_node()
170 xfs_dir2_leaf_log_header(tp, lbp); in xfs_dir2_leaf_to_node()
171 xfs_dir2_free_log_header(tp, fbp); in xfs_dir2_leaf_to_node()
[all …]
Dxfs_fsops.c141 xfs_trans_t *tp; in xfs_growfs_data_private() local
182 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); in xfs_growfs_data_private()
183 tp->t_flags |= XFS_TRANS_RESERVE; in xfs_growfs_data_private()
184 if ((error = xfs_trans_reserve(tp, XFS_GROWFS_SPACE_RES(mp), in xfs_growfs_data_private()
186 xfs_trans_cancel(tp, 0); in xfs_growfs_data_private()
309 xfs_trans_agblocks_delta(tp, nfree); in xfs_growfs_data_private()
317 error = xfs_ialloc_read_agi(mp, tp, agno, &bp); in xfs_growfs_data_private()
326 xfs_ialloc_log_agi(tp, bp, XFS_AGI_LENGTH); in xfs_growfs_data_private()
330 error = xfs_alloc_read_agf(mp, tp, agno, 0, &bp); in xfs_growfs_data_private()
339 xfs_alloc_log_agf(tp, bp, XFS_AGF_LENGTH); in xfs_growfs_data_private()
[all …]
/fs/xfs/quota/
Dxfs_trans_dquot.c60 xfs_trans_t *tp, in xfs_trans_dqjoin() argument
65 ASSERT(! XFS_DQ_IS_ADDEDTO_TRX(tp, dqp)); in xfs_trans_dqjoin()
73 (void) xfs_trans_add_item(tp, (xfs_log_item_t*)(lp)); in xfs_trans_dqjoin()
79 dqp->q_transp = tp; in xfs_trans_dqjoin()
95 xfs_trans_t *tp, in xfs_trans_log_dquot() argument
100 ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp)); in xfs_trans_log_dquot()
103 lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)(&dqp->q_logitem)); in xfs_trans_log_dquot()
106 tp->t_flags |= XFS_TRANS_DIRTY; in xfs_trans_log_dquot()
172 xfs_trans_t *tp, in xfs_trans_mod_dquot_byino() argument
179 ASSERT(tp); in xfs_trans_mod_dquot_byino()
[all …]
/fs/jfs/
Djfs_dmap.c76 static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval);
77 static int dbBackSplit(dmtree_t * tp, int leafno);
78 static int dbJoin(dmtree_t * tp, int leafno, int newval);
79 static void dbAdjTree(dmtree_t * tp, int leafno, int newval);
100 static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx);
2074 dmtree_t *tp = (dmtree_t *) & dp->tree; in dbAllocBits() local
2124 dbSplit(tp, word, BUDMIN, in dbAllocBits()
2165 dbSplit(tp, word, size, NOFREE); in dbAllocBits()
2221 dmtree_t *tp = (dmtree_t *) & dp->tree; in dbFreeBits() local
2271 rc = dbJoin(tp, word, in dbFreeBits()
[all …]

123