Commit 9f334526 authored by Chandan Babu R's avatar Chandan Babu R

Merge tag 'defer-elide-create-done-6.8_2023-12-06' of...

Merge tag 'defer-elide-create-done-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA

xfs: elide defer work ->create_done if no intent

Christoph pointed out that the defer ops machinery doesn't need to call
->create_done if the deferred work item didn't generate a log intent
item in the first place.  Let's clean that up and save an indirect call
in the non-logged xattr update call path.

This has been lightly tested with fstests.  Enjoy!
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>

* tag 'defer-elide-create-done-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: elide ->create_done calls for unlogged deferred work
  xfs: document what LARP means
parents 47c460ef 9c07bca7
......@@ -201,6 +201,10 @@ xfs_defer_create_done(
const struct xfs_defer_op_type *ops = defer_op_types[dfp->dfp_type];
struct xfs_log_item *lip;
/* If there is no log intent item, there can be no log done item. */
if (!dfp->dfp_intent)
return;
/*
* Mark the transaction dirty, even on error. This ensures the
* transaction is aborted, which:
......
......@@ -740,9 +740,6 @@ xfs_attr_create_done(
struct xfs_attri_log_item *attrip;
struct xfs_attrd_log_item *attrdp;
if (!intent)
return NULL;
attrip = ATTRI_ITEM(intent);
attrdp = kmem_cache_zalloc(xfs_attrd_cache, GFP_NOFS | __GFP_NOFAIL);
......
......@@ -229,6 +229,15 @@ pwork_threads_show(
}
XFS_SYSFS_ATTR_RW(pwork_threads);
/*
* The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob
* sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on
* V5 filesystems. As a result, the intermediate progress of all setxattr and
* removexattr operations are tracked via the log and can be restarted during
* recovery. This is useful for testing xattr recovery prior to merging of the
* parent pointer feature which requires it to maintain consistency, and may be
* enabled for userspace xattrs in the future.
*/
static ssize_t
larp_store(
struct kobject *kobject,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment