1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2006 Silicon Graphics, Inc.
7 #include "libxfs_priv.h"
9 #include "xfs_shared.h"
10 #include "xfs_format.h"
11 #include "xfs_log_format.h"
12 #include "xfs_trans_resv.h"
13 #include "xfs_mount.h"
14 #include "xfs_inode.h"
15 #include "xfs_trans.h"
16 #include "xfs_btree.h"
17 #include "xfs_bmap_btree.h"
19 #include "xfs_trace.h"
20 #include "xfs_da_format.h"
21 #include "xfs_da_btree.h"
22 #include "xfs_dir2_priv.h"
23 #include "xfs_attr_leaf.h"
24 #include "xfs_types.h"
25 #include "xfs_errortag.h"
27 struct kmem_cache
*xfs_ifork_cache
;
36 struct xfs_ifork
*ifp
= XFS_IFORK_PTR(ip
, whichfork
);
37 int mem_size
= size
, real_size
= 0;
41 * If we are using the local fork to store a symlink body we need to
42 * zero-terminate it so that we can pass it back to the VFS directly.
43 * Overallocate the in-memory fork by one for that and add a zero
44 * to terminate it below.
46 zero_terminate
= S_ISLNK(VFS_I(ip
)->i_mode
);
52 * As we round up the allocation here, we need to ensure the
53 * bytes we don't copy data into are zeroed because the log
54 * vectors still copy them into the journal.
56 real_size
= roundup(mem_size
, 4);
57 ifp
->if_u1
.if_data
= kmem_zalloc(real_size
, KM_NOFS
);
58 memcpy(ifp
->if_u1
.if_data
, data
, size
);
60 ifp
->if_u1
.if_data
[size
] = '\0';
62 ifp
->if_u1
.if_data
= NULL
;
69 * The file is in-lined in the on-disk inode.
74 struct xfs_dinode
*dip
,
79 * If the size is unreasonable, then something
80 * is wrong and we just bail out rather than crash in
81 * kmem_alloc() or memcpy() below.
83 if (unlikely(size
> XFS_DFORK_SIZE(dip
, ip
->i_mount
, whichfork
))) {
85 "corrupt inode %Lu (bad size %d for local fork, size = %zd).",
86 (unsigned long long) ip
->i_ino
, size
,
87 XFS_DFORK_SIZE(dip
, ip
->i_mount
, whichfork
));
88 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
,
89 "xfs_iformat_local", dip
, sizeof(*dip
),
94 xfs_init_local_fork(ip
, whichfork
, XFS_DFORK_PTR(dip
, whichfork
), size
);
99 * The file consists of a set of extents all of which fit into the on-disk
104 struct xfs_inode
*ip
,
105 struct xfs_dinode
*dip
,
108 struct xfs_mount
*mp
= ip
->i_mount
;
109 struct xfs_ifork
*ifp
= XFS_IFORK_PTR(ip
, whichfork
);
110 int state
= xfs_bmap_fork_to_state(whichfork
);
111 xfs_extnum_t nex
= xfs_dfork_nextents(dip
, whichfork
);
112 int size
= nex
* sizeof(xfs_bmbt_rec_t
);
113 struct xfs_iext_cursor icur
;
114 struct xfs_bmbt_rec
*dp
;
115 struct xfs_bmbt_irec
new;
119 * If the number of extents is unreasonable, then something is wrong and
120 * we just bail out rather than crash in kmem_alloc() or memcpy() below.
122 if (unlikely(size
< 0 || size
> XFS_DFORK_SIZE(dip
, mp
, whichfork
))) {
123 xfs_warn(ip
->i_mount
, "corrupt inode %llu ((a)extents = %llu).",
125 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
,
126 "xfs_iformat_extents(1)", dip
, sizeof(*dip
),
128 return -EFSCORRUPTED
;
132 ifp
->if_u1
.if_root
= NULL
;
135 dp
= (xfs_bmbt_rec_t
*) XFS_DFORK_PTR(dip
, whichfork
);
137 xfs_iext_first(ifp
, &icur
);
138 for (i
= 0; i
< nex
; i
++, dp
++) {
141 xfs_bmbt_disk_get_all(dp
, &new);
142 fa
= xfs_bmap_validate_extent(ip
, whichfork
, &new);
144 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
,
145 "xfs_iformat_extents(2)",
146 dp
, sizeof(*dp
), fa
);
147 return -EFSCORRUPTED
;
150 xfs_iext_insert(ip
, &icur
, &new, state
);
151 trace_xfs_read_extent(ip
, &icur
, state
, _THIS_IP_
);
152 xfs_iext_next(ifp
, &icur
);
159 * The file has too many extents to fit into
160 * the inode, so they are in B-tree format.
161 * Allocate a buffer for the root of the B-tree
162 * and copy the root into it. The i_extents
163 * field will remain NULL until all of the
164 * extents are read in (when they are needed).
168 struct xfs_inode
*ip
,
169 struct xfs_dinode
*dip
,
172 struct xfs_mount
*mp
= ip
->i_mount
;
173 xfs_bmdr_block_t
*dfp
;
174 struct xfs_ifork
*ifp
;
180 ifp
= XFS_IFORK_PTR(ip
, whichfork
);
181 dfp
= (xfs_bmdr_block_t
*)XFS_DFORK_PTR(dip
, whichfork
);
182 size
= XFS_BMAP_BROOT_SPACE(mp
, dfp
);
183 nrecs
= be16_to_cpu(dfp
->bb_numrecs
);
184 level
= be16_to_cpu(dfp
->bb_level
);
187 * blow out if -- fork has less extents than can fit in
188 * fork (fork shouldn't be a btree format), root btree
189 * block has more records than can fit into the fork,
190 * or the number of extents is greater than the number of
193 if (unlikely(ifp
->if_nextents
<= XFS_IFORK_MAXEXT(ip
, whichfork
) ||
195 XFS_BMDR_SPACE_CALC(nrecs
) >
196 XFS_DFORK_SIZE(dip
, mp
, whichfork
) ||
197 ifp
->if_nextents
> ip
->i_nblocks
) ||
198 level
== 0 || level
> XFS_BM_MAXLEVELS(mp
, whichfork
)) {
199 xfs_warn(mp
, "corrupt inode %Lu (btree).",
200 (unsigned long long) ip
->i_ino
);
201 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
,
202 "xfs_iformat_btree", dfp
, size
,
204 return -EFSCORRUPTED
;
207 ifp
->if_broot_bytes
= size
;
208 ifp
->if_broot
= kmem_alloc(size
, KM_NOFS
);
209 ASSERT(ifp
->if_broot
!= NULL
);
211 * Copy and convert from the on-disk structure
212 * to the in-memory structure.
214 xfs_bmdr_to_bmbt(ip
, dfp
, XFS_DFORK_SIZE(dip
, ip
->i_mount
, whichfork
),
215 ifp
->if_broot
, size
);
218 ifp
->if_u1
.if_root
= NULL
;
224 xfs_iformat_data_fork(
225 struct xfs_inode
*ip
,
226 struct xfs_dinode
*dip
)
228 struct inode
*inode
= VFS_I(ip
);
232 * Initialize the extent count early, as the per-format routines may
235 ip
->i_df
.if_format
= dip
->di_format
;
236 ip
->i_df
.if_nextents
= xfs_dfork_data_extents(dip
);
238 switch (inode
->i_mode
& S_IFMT
) {
244 inode
->i_rdev
= xfs_to_linux_dev_t(xfs_dinode_get_rdev(dip
));
249 switch (ip
->i_df
.if_format
) {
250 case XFS_DINODE_FMT_LOCAL
:
251 error
= xfs_iformat_local(ip
, dip
, XFS_DATA_FORK
,
252 be64_to_cpu(dip
->di_size
));
254 error
= xfs_ifork_verify_local_data(ip
);
256 case XFS_DINODE_FMT_EXTENTS
:
257 return xfs_iformat_extents(ip
, dip
, XFS_DATA_FORK
);
258 case XFS_DINODE_FMT_BTREE
:
259 return xfs_iformat_btree(ip
, dip
, XFS_DATA_FORK
);
261 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
, __func__
,
262 dip
, sizeof(*dip
), __this_address
);
263 return -EFSCORRUPTED
;
267 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
, __func__
, dip
,
268 sizeof(*dip
), __this_address
);
269 return -EFSCORRUPTED
;
274 xfs_dfork_attr_shortform_size(
275 struct xfs_dinode
*dip
)
277 struct xfs_attr_shortform
*atp
=
278 (struct xfs_attr_shortform
*)XFS_DFORK_APTR(dip
);
280 return be16_to_cpu(atp
->hdr
.totsize
);
285 enum xfs_dinode_fmt format
,
286 xfs_extnum_t nextents
)
288 struct xfs_ifork
*ifp
;
290 ifp
= kmem_cache_zalloc(xfs_ifork_cache
, GFP_NOFS
| __GFP_NOFAIL
);
291 ifp
->if_format
= format
;
292 ifp
->if_nextents
= nextents
;
297 xfs_iformat_attr_fork(
298 struct xfs_inode
*ip
,
299 struct xfs_dinode
*dip
)
301 xfs_extnum_t naextents
= xfs_dfork_attr_extents(dip
);
305 * Initialize the extent count early, as the per-format routines may
308 ip
->i_afp
= xfs_ifork_alloc(dip
->di_aformat
, naextents
);
310 switch (ip
->i_afp
->if_format
) {
311 case XFS_DINODE_FMT_LOCAL
:
312 error
= xfs_iformat_local(ip
, dip
, XFS_ATTR_FORK
,
313 xfs_dfork_attr_shortform_size(dip
));
315 error
= xfs_ifork_verify_local_attr(ip
);
317 case XFS_DINODE_FMT_EXTENTS
:
318 error
= xfs_iformat_extents(ip
, dip
, XFS_ATTR_FORK
);
320 case XFS_DINODE_FMT_BTREE
:
321 error
= xfs_iformat_btree(ip
, dip
, XFS_ATTR_FORK
);
324 xfs_inode_verifier_error(ip
, error
, __func__
, dip
,
325 sizeof(*dip
), __this_address
);
326 error
= -EFSCORRUPTED
;
331 kmem_cache_free(xfs_ifork_cache
, ip
->i_afp
);
338 * Reallocate the space for if_broot based on the number of records
339 * being added or deleted as indicated in rec_diff. Move the records
340 * and pointers in if_broot to fit the new size. When shrinking this
341 * will eliminate holes between the records and pointers created by
342 * the caller. When growing this will create holes to be filled in
345 * The caller must not request to add more records than would fit in
346 * the on-disk inode root. If the if_broot is currently NULL, then
347 * if we are adding records, one will be allocated. The caller must also
348 * not request that the number of records go below zero, although
351 * ip -- the inode whose if_broot area is changing
352 * ext_diff -- the change in the number of records, positive or negative,
353 * requested for the if_broot array.
361 struct xfs_mount
*mp
= ip
->i_mount
;
363 struct xfs_ifork
*ifp
;
364 struct xfs_btree_block
*new_broot
;
371 * Handle the degenerate case quietly.
377 ifp
= XFS_IFORK_PTR(ip
, whichfork
);
380 * If there wasn't any memory allocated before, just
381 * allocate it now and get out.
383 if (ifp
->if_broot_bytes
== 0) {
384 new_size
= XFS_BMAP_BROOT_SPACE_CALC(mp
, rec_diff
);
385 ifp
->if_broot
= kmem_alloc(new_size
, KM_NOFS
);
386 ifp
->if_broot_bytes
= (int)new_size
;
391 * If there is already an existing if_broot, then we need
392 * to realloc() it and shift the pointers to their new
393 * location. The records don't change location because
394 * they are kept butted up against the btree block header.
396 cur_max
= xfs_bmbt_maxrecs(mp
, ifp
->if_broot_bytes
, 0);
397 new_max
= cur_max
+ rec_diff
;
398 new_size
= XFS_BMAP_BROOT_SPACE_CALC(mp
, new_max
);
399 ifp
->if_broot
= krealloc(ifp
->if_broot
, new_size
,
400 GFP_NOFS
| __GFP_NOFAIL
);
401 op
= (char *)XFS_BMAP_BROOT_PTR_ADDR(mp
, ifp
->if_broot
, 1,
402 ifp
->if_broot_bytes
);
403 np
= (char *)XFS_BMAP_BROOT_PTR_ADDR(mp
, ifp
->if_broot
, 1,
405 ifp
->if_broot_bytes
= (int)new_size
;
406 ASSERT(XFS_BMAP_BMDR_SPACE(ifp
->if_broot
) <=
407 XFS_IFORK_SIZE(ip
, whichfork
));
408 memmove(np
, op
, cur_max
* (uint
)sizeof(xfs_fsblock_t
));
413 * rec_diff is less than 0. In this case, we are shrinking the
414 * if_broot buffer. It must already exist. If we go to zero
415 * records, just get rid of the root and clear the status bit.
417 ASSERT((ifp
->if_broot
!= NULL
) && (ifp
->if_broot_bytes
> 0));
418 cur_max
= xfs_bmbt_maxrecs(mp
, ifp
->if_broot_bytes
, 0);
419 new_max
= cur_max
+ rec_diff
;
420 ASSERT(new_max
>= 0);
422 new_size
= XFS_BMAP_BROOT_SPACE_CALC(mp
, new_max
);
426 new_broot
= kmem_alloc(new_size
, KM_NOFS
);
428 * First copy over the btree block header.
430 memcpy(new_broot
, ifp
->if_broot
,
431 XFS_BMBT_BLOCK_LEN(ip
->i_mount
));
437 * Only copy the records and pointers if there are any.
441 * First copy the records.
443 op
= (char *)XFS_BMBT_REC_ADDR(mp
, ifp
->if_broot
, 1);
444 np
= (char *)XFS_BMBT_REC_ADDR(mp
, new_broot
, 1);
445 memcpy(np
, op
, new_max
* (uint
)sizeof(xfs_bmbt_rec_t
));
448 * Then copy the pointers.
450 op
= (char *)XFS_BMAP_BROOT_PTR_ADDR(mp
, ifp
->if_broot
, 1,
451 ifp
->if_broot_bytes
);
452 np
= (char *)XFS_BMAP_BROOT_PTR_ADDR(mp
, new_broot
, 1,
454 memcpy(np
, op
, new_max
* (uint
)sizeof(xfs_fsblock_t
));
456 kmem_free(ifp
->if_broot
);
457 ifp
->if_broot
= new_broot
;
458 ifp
->if_broot_bytes
= (int)new_size
;
460 ASSERT(XFS_BMAP_BMDR_SPACE(ifp
->if_broot
) <=
461 XFS_IFORK_SIZE(ip
, whichfork
));
467 * This is called when the amount of space needed for if_data
468 * is increased or decreased. The change in size is indicated by
469 * the number of bytes that need to be added or deleted in the
470 * byte_diff parameter.
472 * If the amount of space needed has decreased below the size of the
473 * inline buffer, then switch to using the inline buffer. Otherwise,
474 * use kmem_realloc() or kmem_alloc() to adjust the size of the buffer
477 * ip -- the inode whose if_data area is changing
478 * byte_diff -- the change in the number of bytes, positive or negative,
479 * requested for the if_data array.
483 struct xfs_inode
*ip
,
487 struct xfs_ifork
*ifp
= XFS_IFORK_PTR(ip
, whichfork
);
488 int64_t new_size
= ifp
->if_bytes
+ byte_diff
;
490 ASSERT(new_size
>= 0);
491 ASSERT(new_size
<= XFS_IFORK_SIZE(ip
, whichfork
));
497 kmem_free(ifp
->if_u1
.if_data
);
498 ifp
->if_u1
.if_data
= NULL
;
504 * For inline data, the underlying buffer must be a multiple of 4 bytes
505 * in size so that it can be logged and stay on word boundaries.
506 * We enforce that here, and use __GFP_ZERO to ensure that size
507 * extensions always zero the unused roundup area.
509 ifp
->if_u1
.if_data
= krealloc(ifp
->if_u1
.if_data
, roundup(new_size
, 4),
510 GFP_NOFS
| __GFP_NOFAIL
| __GFP_ZERO
);
511 ifp
->if_bytes
= new_size
;
516 struct xfs_ifork
*ifp
)
518 if (ifp
->if_broot
!= NULL
) {
519 kmem_free(ifp
->if_broot
);
520 ifp
->if_broot
= NULL
;
523 switch (ifp
->if_format
) {
524 case XFS_DINODE_FMT_LOCAL
:
525 kmem_free(ifp
->if_u1
.if_data
);
526 ifp
->if_u1
.if_data
= NULL
;
528 case XFS_DINODE_FMT_EXTENTS
:
529 case XFS_DINODE_FMT_BTREE
:
531 xfs_iext_destroy(ifp
);
537 * Convert in-core extents to on-disk form
539 * In the case of the data fork, the in-core and on-disk fork sizes can be
540 * different due to delayed allocation extents. We only copy on-disk extents
541 * here, so callers must always use the physical fork size to determine the
542 * size of the buffer passed to this routine. We will return the size actually
547 struct xfs_inode
*ip
,
548 struct xfs_bmbt_rec
*dp
,
551 int state
= xfs_bmap_fork_to_state(whichfork
);
552 struct xfs_ifork
*ifp
= XFS_IFORK_PTR(ip
, whichfork
);
553 struct xfs_iext_cursor icur
;
554 struct xfs_bmbt_irec rec
;
557 ASSERT(xfs_isilocked(ip
, XFS_ILOCK_EXCL
| XFS_ILOCK_SHARED
));
558 ASSERT(ifp
->if_bytes
> 0);
560 for_each_xfs_iext(ifp
, &icur
, &rec
) {
561 if (isnullstartblock(rec
.br_startblock
))
563 ASSERT(xfs_bmap_validate_extent(ip
, whichfork
, &rec
) == NULL
);
564 xfs_bmbt_disk_set_all(dp
, &rec
);
565 trace_xfs_write_extent(ip
, &icur
, state
, _RET_IP_
);
566 copied
+= sizeof(struct xfs_bmbt_rec
);
571 ASSERT(copied
<= ifp
->if_bytes
);
576 * Each of the following cases stores data into the same region
577 * of the on-disk inode, so only one of them can be valid at
578 * any given time. While it is possible to have conflicting formats
579 * and log flags, e.g. having XFS_ILOG_?DATA set when the fork is
580 * in EXTENTS format, this can only happen when the fork has
581 * changed formats after being modified but before being flushed.
582 * In these cases, the format always takes precedence, because the
583 * format indicates the current state of the fork.
587 struct xfs_inode
*ip
,
588 struct xfs_dinode
*dip
,
589 struct xfs_inode_log_item
*iip
,
593 struct xfs_ifork
*ifp
;
595 static const short brootflag
[2] =
596 { XFS_ILOG_DBROOT
, XFS_ILOG_ABROOT
};
597 static const short dataflag
[2] =
598 { XFS_ILOG_DDATA
, XFS_ILOG_ADATA
};
599 static const short extflag
[2] =
600 { XFS_ILOG_DEXT
, XFS_ILOG_AEXT
};
604 ifp
= XFS_IFORK_PTR(ip
, whichfork
);
606 * This can happen if we gave up in iformat in an error path,
607 * for the attribute fork.
610 ASSERT(whichfork
== XFS_ATTR_FORK
);
613 cp
= XFS_DFORK_PTR(dip
, whichfork
);
615 switch (ifp
->if_format
) {
616 case XFS_DINODE_FMT_LOCAL
:
617 if ((iip
->ili_fields
& dataflag
[whichfork
]) &&
618 (ifp
->if_bytes
> 0)) {
619 ASSERT(ifp
->if_u1
.if_data
!= NULL
);
620 ASSERT(ifp
->if_bytes
<= XFS_IFORK_SIZE(ip
, whichfork
));
621 memcpy(cp
, ifp
->if_u1
.if_data
, ifp
->if_bytes
);
625 case XFS_DINODE_FMT_EXTENTS
:
626 if ((iip
->ili_fields
& extflag
[whichfork
]) &&
627 (ifp
->if_bytes
> 0)) {
628 ASSERT(ifp
->if_nextents
> 0);
629 (void)xfs_iextents_copy(ip
, (xfs_bmbt_rec_t
*)cp
,
634 case XFS_DINODE_FMT_BTREE
:
635 if ((iip
->ili_fields
& brootflag
[whichfork
]) &&
636 (ifp
->if_broot_bytes
> 0)) {
637 ASSERT(ifp
->if_broot
!= NULL
);
638 ASSERT(XFS_BMAP_BMDR_SPACE(ifp
->if_broot
) <=
639 XFS_IFORK_SIZE(ip
, whichfork
));
640 xfs_bmbt_to_bmdr(mp
, ifp
->if_broot
, ifp
->if_broot_bytes
,
641 (xfs_bmdr_block_t
*)cp
,
642 XFS_DFORK_SIZE(dip
, mp
, whichfork
));
646 case XFS_DINODE_FMT_DEV
:
647 if (iip
->ili_fields
& XFS_ILOG_DEV
) {
648 ASSERT(whichfork
== XFS_DATA_FORK
);
649 xfs_dinode_put_rdev(dip
,
650 linux_to_xfs_dev_t(VFS_I(ip
)->i_rdev
));
660 /* Convert bmap state flags to an inode fork. */
662 xfs_iext_state_to_fork(
663 struct xfs_inode
*ip
,
666 if (state
& BMAP_COWFORK
)
668 else if (state
& BMAP_ATTRFORK
)
674 * Initialize an inode's copy-on-write fork.
678 struct xfs_inode
*ip
)
683 ip
->i_cowfp
= kmem_cache_zalloc(xfs_ifork_cache
,
684 GFP_NOFS
| __GFP_NOFAIL
);
685 ip
->i_cowfp
->if_format
= XFS_DINODE_FMT_EXTENTS
;
688 /* Verify the inline contents of the data fork of an inode. */
690 xfs_ifork_verify_local_data(
691 struct xfs_inode
*ip
)
693 xfs_failaddr_t fa
= NULL
;
695 switch (VFS_I(ip
)->i_mode
& S_IFMT
) {
697 fa
= xfs_dir2_sf_verify(ip
);
700 fa
= xfs_symlink_shortform_verify(ip
);
707 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
, "data fork",
708 ip
->i_df
.if_u1
.if_data
, ip
->i_df
.if_bytes
, fa
);
709 return -EFSCORRUPTED
;
715 /* Verify the inline contents of the attr fork of an inode. */
717 xfs_ifork_verify_local_attr(
718 struct xfs_inode
*ip
)
720 struct xfs_ifork
*ifp
= ip
->i_afp
;
726 fa
= xfs_attr_shortform_verify(ip
);
729 xfs_inode_verifier_error(ip
, -EFSCORRUPTED
, "attr fork",
730 ifp
? ifp
->if_u1
.if_data
: NULL
,
731 ifp
? ifp
->if_bytes
: 0, fa
);
732 return -EFSCORRUPTED
;
739 xfs_iext_count_may_overflow(
740 struct xfs_inode
*ip
,
744 struct xfs_ifork
*ifp
= XFS_IFORK_PTR(ip
, whichfork
);
748 if (whichfork
== XFS_COW_FORK
)
751 max_exts
= xfs_iext_max_nextents(xfs_inode_has_large_extent_counts(ip
),
754 if (XFS_TEST_ERROR(false, ip
->i_mount
, XFS_ERRTAG_REDUCE_MAX_IEXTENTS
))
757 nr_exts
= ifp
->if_nextents
+ nr_to_add
;
758 if (nr_exts
< ifp
->if_nextents
|| nr_exts
> max_exts
)
765 * Upgrade this inode's extent counter fields to be able to handle a potential
766 * increase in the extent count by nr_to_add. Normally this is the same
767 * quantity that caused xfs_iext_count_may_overflow() to return -EFBIG.
770 xfs_iext_count_upgrade(
771 struct xfs_trans
*tp
,
772 struct xfs_inode
*ip
,
775 ASSERT(nr_to_add
<= XFS_MAX_EXTCNT_UPGRADE_NR
);
777 if (!xfs_has_large_extent_counts(ip
->i_mount
) ||
778 xfs_inode_has_large_extent_counts(ip
) ||
779 XFS_TEST_ERROR(false, ip
->i_mount
, XFS_ERRTAG_REDUCE_MAX_IEXTENTS
))
782 ip
->i_diflags2
|= XFS_DIFLAG2_NREXT64
;
783 xfs_trans_log_inode(tp
, ip
, XFS_ILOG_CORE
);