1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2022 Oracle. All Rights Reserved.
4 * Author: Allison Henderson <allison.henderson@oracle.com>
9 #include "xfs_format.h"
10 #include "xfs_trans_resv.h"
11 #include "xfs_shared.h"
12 #include "xfs_mount.h"
13 #include "xfs_defer.h"
14 #include "xfs_log_format.h"
15 #include "xfs_trans.h"
16 #include "xfs_bmap_btree.h"
17 #include "xfs_trans_priv.h"
19 #include "xfs_inode.h"
20 #include "xfs_da_format.h"
21 #include "xfs_da_btree.h"
23 #include "xfs_attr_item.h"
24 #include "xfs_trace.h"
25 #include "xfs_inode.h"
26 #include "xfs_trans_space.h"
27 #include "xfs_errortag.h"
28 #include "xfs_error.h"
29 #include "xfs_log_priv.h"
30 #include "xfs_log_recover.h"
32 static const struct xfs_item_ops xfs_attri_item_ops;
33 static const struct xfs_item_ops xfs_attrd_item_ops;
34 static struct xfs_attrd_log_item *xfs_trans_get_attrd(struct xfs_trans *tp,
35 struct xfs_attri_log_item *attrip);
37 static inline struct xfs_attri_log_item *ATTRI_ITEM(struct xfs_log_item *lip)
39 return container_of(lip, struct xfs_attri_log_item, attri_item);
44 struct xfs_attri_log_item *attrip)
46 kmem_free(attrip->attri_item.li_lv_shadow);
51 * Freeing the attrip requires that we remove it from the AIL if it has already
52 * been placed there. However, the ATTRI may not yet have been placed in the
53 * AIL when called by xfs_attri_release() from ATTRD processing due to the
54 * ordering of committed vs unpin operations in bulk insert operations. Hence
55 * the reference count to ensure only the last caller frees the ATTRI.
59 struct xfs_attri_log_item *attrip)
61 ASSERT(atomic_read(&attrip->attri_refcount) > 0);
62 if (!atomic_dec_and_test(&attrip->attri_refcount))
65 xfs_trans_ail_delete(&attrip->attri_item, 0);
66 xfs_attri_item_free(attrip);
71 struct xfs_log_item *lip,
75 struct xfs_attri_log_item *attrip = ATTRI_ITEM(lip);
78 *nbytes += sizeof(struct xfs_attri_log_format) +
79 xlog_calc_iovec_len(attrip->attri_name_len);
81 if (!attrip->attri_value_len)
85 *nbytes += xlog_calc_iovec_len(attrip->attri_value_len);
89 * This is called to fill in the log iovecs for the given attri log
90 * item. We use 1 iovec for the attri_format_item, 1 for the name, and
91 * another for the value if it is present
94 xfs_attri_item_format(
95 struct xfs_log_item *lip,
96 struct xfs_log_vec *lv)
98 struct xfs_attri_log_item *attrip = ATTRI_ITEM(lip);
99 struct xfs_log_iovec *vecp = NULL;
101 attrip->attri_format.alfi_type = XFS_LI_ATTRI;
102 attrip->attri_format.alfi_size = 1;
105 * This size accounting must be done before copying the attrip into the
106 * iovec. If we do it after, the wrong size will be recorded to the log
107 * and we trip across assertion checks for bad region sizes later during
111 ASSERT(attrip->attri_name_len > 0);
112 attrip->attri_format.alfi_size++;
114 if (attrip->attri_value_len > 0)
115 attrip->attri_format.alfi_size++;
117 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_ATTRI_FORMAT,
118 &attrip->attri_format,
119 sizeof(struct xfs_attri_log_format));
120 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_ATTR_NAME,
122 attrip->attri_name_len);
123 if (attrip->attri_value_len > 0)
124 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_ATTR_VALUE,
126 attrip->attri_value_len);
130 * The unpin operation is the last place an ATTRI is manipulated in the log. It
131 * is either inserted in the AIL or aborted in the event of a log I/O error. In
132 * either case, the ATTRI transaction has been successfully committed to make
133 * it this far. Therefore, we expect whoever committed the ATTRI to either
134 * construct and commit the ATTRD or drop the ATTRD's reference in the event of
135 * error. Simply drop the log's ATTRI reference now that the log is done with
139 xfs_attri_item_unpin(
140 struct xfs_log_item *lip,
143 xfs_attri_release(ATTRI_ITEM(lip));
148 xfs_attri_item_release(
149 struct xfs_log_item *lip)
151 xfs_attri_release(ATTRI_ITEM(lip));
155 * Allocate and initialize an attri item. Caller may allocate an additional
156 * trailing buffer for name and value
158 STATIC struct xfs_attri_log_item *
160 struct xfs_mount *mp,
165 struct xfs_attri_log_item *attrip;
166 uint32_t buffer_size = name_len + value_len;
170 * This could be over 64kB in length, so we have to use
171 * kvmalloc() for this. But kvmalloc() utterly sucks, so we
174 attrip = xlog_kvmalloc(sizeof(struct xfs_attri_log_item) +
177 attrip = kmem_cache_alloc(xfs_attri_cache,
178 GFP_NOFS | __GFP_NOFAIL);
180 memset(attrip, 0, sizeof(struct xfs_attri_log_item));
182 attrip->attri_name_len = name_len;
184 attrip->attri_name = ((char *)attrip) +
185 sizeof(struct xfs_attri_log_item);
187 attrip->attri_name = NULL;
189 attrip->attri_value_len = value_len;
191 attrip->attri_value = ((char *)attrip) +
192 sizeof(struct xfs_attri_log_item) +
195 attrip->attri_value = NULL;
197 xfs_log_item_init(mp, &attrip->attri_item, XFS_LI_ATTRI,
198 &xfs_attri_item_ops);
199 attrip->attri_format.alfi_id = (uintptr_t)(void *)attrip;
200 atomic_set(&attrip->attri_refcount, 2);
206 * Copy an attr format buffer from the given buf, and into the destination attr
210 xfs_attri_copy_format(
211 struct xfs_log_iovec *buf,
212 struct xfs_attri_log_format *dst_attr_fmt)
214 struct xfs_attri_log_format *src_attr_fmt = buf->i_addr;
217 len = sizeof(struct xfs_attri_log_format);
218 if (buf->i_len != len) {
219 XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, NULL);
220 return -EFSCORRUPTED;
223 memcpy((char *)dst_attr_fmt, (char *)src_attr_fmt, len);
227 static inline struct xfs_attrd_log_item *ATTRD_ITEM(struct xfs_log_item *lip)
229 return container_of(lip, struct xfs_attrd_log_item, attrd_item);
233 xfs_attrd_item_free(struct xfs_attrd_log_item *attrdp)
235 kmem_free(attrdp->attrd_item.li_lv_shadow);
241 struct xfs_log_item *lip,
246 *nbytes += sizeof(struct xfs_attrd_log_format);
250 * This is called to fill in the log iovecs for the given attrd log item. We use
251 * only 1 iovec for the attrd_format, and we point that at the attr_log_format
252 * structure embedded in the attrd item.
255 xfs_attrd_item_format(
256 struct xfs_log_item *lip,
257 struct xfs_log_vec *lv)
259 struct xfs_attrd_log_item *attrdp = ATTRD_ITEM(lip);
260 struct xfs_log_iovec *vecp = NULL;
262 attrdp->attrd_format.alfd_type = XFS_LI_ATTRD;
263 attrdp->attrd_format.alfd_size = 1;
265 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_ATTRD_FORMAT,
266 &attrdp->attrd_format,
267 sizeof(struct xfs_attrd_log_format));
271 * The ATTRD is either committed or aborted if the transaction is canceled. If
272 * the transaction is canceled, drop our reference to the ATTRI and free the
276 xfs_attrd_item_release(
277 struct xfs_log_item *lip)
279 struct xfs_attrd_log_item *attrdp = ATTRD_ITEM(lip);
281 xfs_attri_release(attrdp->attrd_attrip);
282 xfs_attrd_item_free(attrdp);
285 static struct xfs_log_item *
286 xfs_attrd_item_intent(
287 struct xfs_log_item *lip)
289 return &ATTRD_ITEM(lip)->attrd_attrip->attri_item;
293 * Performs one step of an attribute update intent and marks the attrd item
294 * dirty.. An attr operation may be a set or a remove. Note that the
295 * transaction is marked dirty regardless of whether the operation succeeds or
296 * fails to support the ATTRI/ATTRD lifecycle rules.
299 xfs_xattri_finish_update(
300 struct xfs_attr_item *attr,
301 struct xfs_attrd_log_item *attrdp)
303 struct xfs_da_args *args = attr->xattri_da_args;
306 if (XFS_TEST_ERROR(false, args->dp->i_mount, XFS_ERRTAG_LARP)) {
311 error = xfs_attr_set_iter(attr);
312 if (!error && attr->xattri_dela_state != XFS_DAS_DONE)
316 * Mark the transaction dirty, even on error. This ensures the
317 * transaction is aborted, which:
319 * 1.) releases the ATTRI and frees the ATTRD
320 * 2.) shuts down the filesystem
322 args->trans->t_flags |= XFS_TRANS_DIRTY | XFS_TRANS_HAS_INTENT_DONE;
325 * attr intent/done items are null when logged attributes are disabled
328 set_bit(XFS_LI_DIRTY, &attrdp->attrd_item.li_flags);
333 /* Log an attr to the intent item. */
336 struct xfs_trans *tp,
337 struct xfs_attri_log_item *attrip,
338 struct xfs_attr_item *attr)
340 struct xfs_attri_log_format *attrp;
342 tp->t_flags |= XFS_TRANS_DIRTY;
343 set_bit(XFS_LI_DIRTY, &attrip->attri_item.li_flags);
346 * At this point the xfs_attr_item has been constructed, and we've
347 * created the log intent. Fill in the attri log item and log format
348 * structure with fields from this xfs_attr_item
350 attrp = &attrip->attri_format;
351 attrp->alfi_ino = attr->xattri_da_args->dp->i_ino;
352 attrp->alfi_op_flags = attr->xattri_op_flags;
353 attrp->alfi_value_len = attr->xattri_da_args->valuelen;
354 attrp->alfi_name_len = attr->xattri_da_args->namelen;
355 attrp->alfi_attr_flags = attr->xattri_da_args->attr_filter;
357 memcpy(attrip->attri_name, attr->xattri_da_args->name,
358 attr->xattri_da_args->namelen);
359 memcpy(attrip->attri_value, attr->xattri_da_args->value,
360 attr->xattri_da_args->valuelen);
361 attrip->attri_name_len = attr->xattri_da_args->namelen;
362 attrip->attri_value_len = attr->xattri_da_args->valuelen;
366 static struct xfs_log_item *
367 xfs_attr_create_intent(
368 struct xfs_trans *tp,
369 struct list_head *items,
373 struct xfs_mount *mp = tp->t_mountp;
374 struct xfs_attri_log_item *attrip;
375 struct xfs_attr_item *attr;
379 if (!xfs_sb_version_haslogxattrs(&mp->m_sb))
383 * Each attr item only performs one attribute operation at a time, so
384 * this is a list of one
386 list_for_each_entry(attr, items, xattri_list) {
387 attrip = xfs_attri_init(mp, attr->xattri_da_args->namelen,
388 attr->xattri_da_args->valuelen);
392 xfs_trans_add_item(tp, &attrip->attri_item);
393 xfs_attr_log_item(tp, attrip, attr);
396 return &attrip->attri_item;
399 /* Process an attr. */
401 xfs_attr_finish_item(
402 struct xfs_trans *tp,
403 struct xfs_log_item *done,
404 struct list_head *item,
405 struct xfs_btree_cur **state)
407 struct xfs_attr_item *attr;
408 struct xfs_attrd_log_item *done_item = NULL;
411 attr = container_of(item, struct xfs_attr_item, xattri_list);
413 done_item = ATTRD_ITEM(done);
416 * Always reset trans after EAGAIN cycle
417 * since the transaction is new
419 attr->xattri_da_args->trans = tp;
421 error = xfs_xattri_finish_update(attr, done_item);
422 if (error != -EAGAIN)
428 /* Abort all pending ATTRs. */
430 xfs_attr_abort_intent(
431 struct xfs_log_item *intent)
433 xfs_attri_release(ATTRI_ITEM(intent));
438 xfs_attr_cancel_item(
439 struct list_head *item)
441 struct xfs_attr_item *attr;
443 attr = container_of(item, struct xfs_attr_item, xattri_list);
448 xfs_attri_item_committed(
449 struct xfs_log_item *lip,
452 struct xfs_attri_log_item *attrip = ATTRI_ITEM(lip);
455 * The attrip refers to xfs_attr_item memory to log the name and value
456 * with the intent item. This already occurred when the intent was
457 * committed so these fields are no longer accessed. Clear them out of
458 * caution since we're about to free the xfs_attr_item.
460 attrip->attri_name = NULL;
461 attrip->attri_value = NULL;
464 * The ATTRI is logged only once and cannot be moved in the log, so
465 * simply return the lsn at which it's been logged.
471 xfs_attri_item_match(
472 struct xfs_log_item *lip,
475 return ATTRI_ITEM(lip)->attri_format.alfi_id == intent_id;
478 /* Is this recovered ATTRI format ok? */
481 struct xfs_mount *mp,
482 struct xfs_attri_log_format *attrp)
484 unsigned int op = attrp->alfi_op_flags &
485 XFS_ATTR_OP_FLAGS_TYPE_MASK;
487 if (attrp->__pad != 0)
490 /* alfi_op_flags should be either a set or remove */
492 case XFS_ATTR_OP_FLAGS_SET:
493 case XFS_ATTR_OP_FLAGS_REPLACE:
494 case XFS_ATTR_OP_FLAGS_REMOVE:
500 if (attrp->alfi_value_len > XATTR_SIZE_MAX)
503 if ((attrp->alfi_name_len > XATTR_NAME_MAX) ||
504 (attrp->alfi_name_len == 0))
507 return xfs_verify_ino(mp, attrp->alfi_ino);
511 * Process an attr intent item that was recovered from the log. We need to
512 * delete the attr that it describes.
515 xfs_attri_item_recover(
516 struct xfs_log_item *lip,
517 struct list_head *capture_list)
519 struct xfs_attri_log_item *attrip = ATTRI_ITEM(lip);
520 struct xfs_attr_item *attr;
521 struct xfs_mount *mp = lip->li_log->l_mp;
522 struct xfs_inode *ip;
523 struct xfs_da_args *args;
524 struct xfs_trans *tp;
525 struct xfs_trans_res tres;
526 struct xfs_attri_log_format *attrp;
530 struct xfs_attrd_log_item *done_item = NULL;
533 * First check the validity of the attr described by the ATTRI. If any
534 * are bad, then assume that all are bad and just toss the ATTRI.
536 attrp = &attrip->attri_format;
537 if (!xfs_attri_validate(mp, attrp) ||
538 !xfs_attr_namecheck(attrip->attri_name, attrip->attri_name_len))
539 return -EFSCORRUPTED;
541 error = xlog_recover_iget(mp, attrp->alfi_ino, &ip);
545 attr = kmem_zalloc(sizeof(struct xfs_attr_item) +
546 sizeof(struct xfs_da_args), KM_NOFS);
547 args = (struct xfs_da_args *)(attr + 1);
549 attr->xattri_da_args = args;
550 attr->xattri_op_flags = attrp->alfi_op_flags;
553 args->geo = mp->m_attr_geo;
554 args->whichfork = XFS_ATTR_FORK;
555 args->name = attrip->attri_name;
556 args->namelen = attrp->alfi_name_len;
557 args->hashval = xfs_da_hashname(args->name, args->namelen);
558 args->attr_filter = attrp->alfi_attr_flags;
559 args->op_flags = XFS_DA_OP_RECOVERY | XFS_DA_OP_OKNOENT;
561 switch (attrp->alfi_op_flags & XFS_ATTR_OP_FLAGS_TYPE_MASK) {
562 case XFS_ATTR_OP_FLAGS_SET:
563 case XFS_ATTR_OP_FLAGS_REPLACE:
564 args->value = attrip->attri_value;
565 args->valuelen = attrp->alfi_value_len;
566 args->total = xfs_attr_calc_size(args, &local);
567 if (xfs_inode_hasattr(args->dp))
568 attr->xattri_dela_state = xfs_attr_init_replace_state(args);
570 attr->xattri_dela_state = xfs_attr_init_add_state(args);
572 case XFS_ATTR_OP_FLAGS_REMOVE:
573 if (!xfs_inode_hasattr(args->dp))
575 attr->xattri_dela_state = xfs_attr_init_remove_state(args);
579 error = -EFSCORRUPTED;
583 xfs_init_attr_trans(args, &tres, &total);
584 error = xfs_trans_alloc(mp, &tres, total, 0, XFS_TRANS_RESERVE, &tp);
589 done_item = xfs_trans_get_attrd(tp, attrip);
591 xfs_ilock(ip, XFS_ILOCK_EXCL);
592 xfs_trans_ijoin(tp, ip, 0);
594 ret = xfs_xattri_finish_update(attr, done_item);
595 if (ret == -EAGAIN) {
596 /* There's more work to do, so add it to this transaction */
597 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_ATTR, &attr->xattri_list);
602 xfs_trans_cancel(tp);
606 error = xfs_defer_ops_capture_and_commit(tp, capture_list);
609 if (attr->xattri_leaf_bp)
610 xfs_buf_relse(attr->xattri_leaf_bp);
612 xfs_iunlock(ip, XFS_ILOCK_EXCL);
620 /* Re-log an intent item to push the log tail forward. */
621 static struct xfs_log_item *
622 xfs_attri_item_relog(
623 struct xfs_log_item *intent,
624 struct xfs_trans *tp)
626 struct xfs_attrd_log_item *attrdp;
627 struct xfs_attri_log_item *old_attrip;
628 struct xfs_attri_log_item *new_attrip;
629 struct xfs_attri_log_format *new_attrp;
630 struct xfs_attri_log_format *old_attrp;
632 old_attrip = ATTRI_ITEM(intent);
633 old_attrp = &old_attrip->attri_format;
635 tp->t_flags |= XFS_TRANS_DIRTY;
636 attrdp = xfs_trans_get_attrd(tp, old_attrip);
637 set_bit(XFS_LI_DIRTY, &attrdp->attrd_item.li_flags);
639 new_attrip = xfs_attri_init(tp->t_mountp, old_attrp->alfi_name_len,
640 old_attrp->alfi_value_len);
641 new_attrp = &new_attrip->attri_format;
643 new_attrp->alfi_ino = old_attrp->alfi_ino;
644 new_attrp->alfi_op_flags = old_attrp->alfi_op_flags;
645 new_attrp->alfi_value_len = old_attrp->alfi_value_len;
646 new_attrp->alfi_name_len = old_attrp->alfi_name_len;
647 new_attrp->alfi_attr_flags = old_attrp->alfi_attr_flags;
649 memcpy(new_attrip->attri_name, old_attrip->attri_name,
650 new_attrip->attri_name_len);
652 if (new_attrip->attri_value_len > 0)
653 memcpy(new_attrip->attri_value, old_attrip->attri_value,
654 new_attrip->attri_value_len);
656 xfs_trans_add_item(tp, &new_attrip->attri_item);
657 set_bit(XFS_LI_DIRTY, &new_attrip->attri_item.li_flags);
659 return &new_attrip->attri_item;
663 xlog_recover_attri_commit_pass2(
665 struct list_head *buffer_list,
666 struct xlog_recover_item *item,
670 struct xfs_mount *mp = log->l_mp;
671 struct xfs_attri_log_item *attrip;
672 struct xfs_attri_log_format *attri_formatp;
675 attri_formatp = item->ri_buf[region].i_addr;
677 /* Validate xfs_attri_log_format */
678 if (!xfs_attri_validate(mp, attri_formatp)) {
679 XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, mp);
680 return -EFSCORRUPTED;
683 /* memory alloc failure will cause replay to abort */
684 attrip = xfs_attri_init(mp, attri_formatp->alfi_name_len,
685 attri_formatp->alfi_value_len);
689 error = xfs_attri_copy_format(&item->ri_buf[region],
690 &attrip->attri_format);
695 memcpy(attrip->attri_name, item->ri_buf[region].i_addr,
696 attrip->attri_name_len);
698 if (!xfs_attr_namecheck(attrip->attri_name, attrip->attri_name_len)) {
699 XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, mp);
700 error = -EFSCORRUPTED;
704 if (attrip->attri_value_len > 0) {
706 memcpy(attrip->attri_value, item->ri_buf[region].i_addr,
707 attrip->attri_value_len);
711 * The ATTRI has two references. One for the ATTRD and one for ATTRI to
712 * ensure it makes it into the AIL. Insert the ATTRI into the AIL
713 * directly and drop the ATTRI reference. Note that
714 * xfs_trans_ail_update() drops the AIL lock.
716 xfs_trans_ail_insert(log->l_ailp, &attrip->attri_item, lsn);
717 xfs_attri_release(attrip);
720 xfs_attri_item_free(attrip);
725 * This routine is called to allocate an "attr free done" log item.
727 static struct xfs_attrd_log_item *
728 xfs_trans_get_attrd(struct xfs_trans *tp,
729 struct xfs_attri_log_item *attrip)
731 struct xfs_attrd_log_item *attrdp;
735 attrdp = kmem_cache_zalloc(xfs_attrd_cache, GFP_NOFS | __GFP_NOFAIL);
737 xfs_log_item_init(tp->t_mountp, &attrdp->attrd_item, XFS_LI_ATTRD,
738 &xfs_attrd_item_ops);
739 attrdp->attrd_attrip = attrip;
740 attrdp->attrd_format.alfd_alf_id = attrip->attri_format.alfi_id;
742 xfs_trans_add_item(tp, &attrdp->attrd_item);
746 /* Get an ATTRD so we can process all the attrs. */
747 static struct xfs_log_item *
748 xfs_attr_create_done(
749 struct xfs_trans *tp,
750 struct xfs_log_item *intent,
756 return &xfs_trans_get_attrd(tp, ATTRI_ITEM(intent))->attrd_item;
759 const struct xfs_defer_op_type xfs_attr_defer_type = {
761 .create_intent = xfs_attr_create_intent,
762 .abort_intent = xfs_attr_abort_intent,
763 .create_done = xfs_attr_create_done,
764 .finish_item = xfs_attr_finish_item,
765 .cancel_item = xfs_attr_cancel_item,
769 * This routine is called when an ATTRD format structure is found in a committed
770 * transaction in the log. Its purpose is to cancel the corresponding ATTRI if
771 * it was still in the log. To do this it searches the AIL for the ATTRI with
772 * an id equal to that in the ATTRD format structure. If we find it we drop
773 * the ATTRD reference, which removes the ATTRI from the AIL and frees it.
776 xlog_recover_attrd_commit_pass2(
778 struct list_head *buffer_list,
779 struct xlog_recover_item *item,
782 struct xfs_attrd_log_format *attrd_formatp;
784 attrd_formatp = item->ri_buf[0].i_addr;
785 if (item->ri_buf[0].i_len != sizeof(struct xfs_attrd_log_format)) {
786 XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, NULL);
787 return -EFSCORRUPTED;
790 xlog_recover_release_intent(log, XFS_LI_ATTRI,
791 attrd_formatp->alfd_alf_id);
795 static const struct xfs_item_ops xfs_attri_item_ops = {
796 .flags = XFS_ITEM_INTENT,
797 .iop_size = xfs_attri_item_size,
798 .iop_format = xfs_attri_item_format,
799 .iop_unpin = xfs_attri_item_unpin,
800 .iop_committed = xfs_attri_item_committed,
801 .iop_release = xfs_attri_item_release,
802 .iop_recover = xfs_attri_item_recover,
803 .iop_match = xfs_attri_item_match,
804 .iop_relog = xfs_attri_item_relog,
807 const struct xlog_recover_item_ops xlog_attri_item_ops = {
808 .item_type = XFS_LI_ATTRI,
809 .commit_pass2 = xlog_recover_attri_commit_pass2,
812 static const struct xfs_item_ops xfs_attrd_item_ops = {
813 .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
814 XFS_ITEM_INTENT_DONE,
815 .iop_size = xfs_attrd_item_size,
816 .iop_format = xfs_attrd_item_format,
817 .iop_release = xfs_attrd_item_release,
818 .iop_intent = xfs_attrd_item_intent,
821 const struct xlog_recover_item_ops xlog_attrd_item_ops = {
822 .item_type = XFS_LI_ATTRD,
823 .commit_pass2 = xlog_recover_attrd_commit_pass2,