• Darrick J. Wong's avatar
    xfs: elide ->create_done calls for unlogged deferred work · 9c07bca7
    Darrick J. Wong authored
    Extended attribute updates use the deferred work machinery to manage
    state across a chain of smaller transactions.  All previous deferred
    work users have employed log intent items and log done items to manage
    restarting of interrupted operations, which means that ->create_intent
    sets dfp_intent to a log intent item and ->create_done uses that item to
    create a log intent done item.
    
    However, xattrs have used the INCOMPLETE flag to deal with the lack of
    recovery support for an interrupted transaction chain.  Log items are
    optional if the xattr update caller didn't set XFS_DA_OP_LOGGED to
    require a restartable sequence.
    
    In other words, ->create_intent can return NULL to say that there's no
    log intent item.  If that's the case, no log intent done item should be
    created.  Clean up xfs_defer_create_done not to do this, so that the
    ->create_done functions don't have to check for non-null dfp_intent
    themselves.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    9c07bca7
xfs_attr_item.c 22 KB