All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <allison.henderson@oracle.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH v26 00/12] xfs: Log Attribute Replay
Date: Sun, 23 Jan 2022 22:26:56 -0700	[thread overview]
Message-ID: <20220124052708.580016-1-allison.henderson@oracle.com> (raw)

Hi all,

This set is a subset of a larger series parent pointers. Delayed attributes allow
attribute operations (set and remove) to be logged and committed in the same
way that other delayed operations do. This allows more complex operations (like
parent pointers) to be broken up into multiple smaller transactions. To do
this, the existing attr operations must be modified to operate as a delayed
operation.  This means that they cannot roll, commit, or finish transactions.
Instead, they return -EAGAIN to allow the calling function to handle the
transaction.  In this series, we focus on only the delayed attribute portion.
We will introduce parent pointers in a later set.

The set as a whole is a bit much to digest at once, so I usually send out the
smaller sub series to reduce reviewer burn out.  But the entire extended series
is visible through the included github links.

Updates since v26:

xfs: Set up infrastructure for log attribute replay
	Removed xfs_da_format.h include
	Investigated adding xfs_attr_namecheck to xfs_attri_validate
		Skipped since the name/value lengths need validation before copy
		from user space gets a name to check
		xfs_attr_namecheck added to calling functions when name is available
	Added attri/attrd slab caches
	Fixed size_t variable in xfs_attri_copy_format	
	Indentation in xlog_recover_attri_commit_pass2
	Indentation fix xfs_attri_item_size
	Comment fix in fs/xfs/xfs_attr_item.h
	Re-ordered members in xfs_attrd_log_item

xfs: Implement attr logging and replay
	Renamed xfs_trans_attr_finish_update to xfs_xattri_finish_update.
	Updated comments
	Investigated hoisting xfs_trans_get_attrd into xfs_attr_create_done
		Skipped since xfs_trans_get_attrd has more than one caller

This series can be viewed on github here:
https://github.com/allisonhenderson/xfs_work/tree/delayed_attrs_v26

As well as the extended delayed attribute and parent pointer series:
https://github.com/allisonhenderson/xfs_work/tree/delayed_attrs_v26_extended

And the test cases:
https://github.com/allisonhenderson/xfs_work/tree/pptr_xfstestsv5

In order to run the test cases, you will need have the corresponding xfsprogs
changes as well.  Which can be found here:
https://github.com/allisonhenderson/xfs_work/tree/delayed_attrs_xfsprogs_v26
https://github.com/allisonhenderson/xfs_work/tree/delayed_attrs_xfsprogs_v26_extended

To run the xfs attributes tests run:
check -g attr

To run as delayed attributes run:
echo 1 > /sys/fs/xfs/debug/larp;
check -g attr

To run parent pointer tests:
check -g parent

I've also made the corresponding updates to the user space side as well, and ported anything
they need to seat correctly.

Questions, comment and feedback appreciated! 

Allison
Allison Henderson (12):
  xfs: Fix double unlock in defer capture code
  xfs: don't commit the first deferred transaction without intents
  xfs: Return from xfs_attr_set_iter if there are no more rmtblks to
    process
  xfs: Set up infrastructure for log attribute replay
  xfs: Implement attr logging and replay
  xfs: Skip flip flags for delayed attrs
  xfs: Add xfs_attr_set_deferred and xfs_attr_remove_deferred
  xfs: Remove unused xfs_attr_*_args
  xfs: Add log attribute error tag
  xfs: Add larp debug option
  xfs: Merge xfs_delattr_context into xfs_attr_item
  xfs: Add helper function xfs_attr_leaf_addname

 fs/xfs/Makefile                 |   1 +
 fs/xfs/libxfs/xfs_attr.c        | 491 ++++++++++---------
 fs/xfs/libxfs/xfs_attr.h        |  68 ++-
 fs/xfs/libxfs/xfs_attr_leaf.c   |   3 +-
 fs/xfs/libxfs/xfs_attr_remote.c |  37 +-
 fs/xfs/libxfs/xfs_attr_remote.h |   6 +-
 fs/xfs/libxfs/xfs_defer.c       |  51 +-
 fs/xfs/libxfs/xfs_defer.h       |   3 +
 fs/xfs/libxfs/xfs_errortag.h    |   4 +-
 fs/xfs/libxfs/xfs_format.h      |   9 +-
 fs/xfs/libxfs/xfs_log_format.h  |  44 +-
 fs/xfs/libxfs/xfs_log_recover.h |   2 +
 fs/xfs/scrub/common.c           |   2 +
 fs/xfs/xfs_attr_item.c          | 803 ++++++++++++++++++++++++++++++++
 fs/xfs/xfs_attr_item.h          |  46 ++
 fs/xfs/xfs_attr_list.c          |   1 +
 fs/xfs/xfs_error.c              |   3 +
 fs/xfs/xfs_globals.c            |   1 +
 fs/xfs/xfs_ioctl32.c            |   2 +
 fs/xfs/xfs_iops.c               |   2 +
 fs/xfs/xfs_log.c                |  45 ++
 fs/xfs/xfs_log.h                |  12 +
 fs/xfs/xfs_log_recover.c        |   2 +
 fs/xfs/xfs_ondisk.h             |   2 +
 fs/xfs/xfs_sysctl.h             |   1 +
 fs/xfs/xfs_sysfs.c              |  24 +
 fs/xfs/xfs_trace.h              |   1 +
 27 files changed, 1388 insertions(+), 278 deletions(-)
 create mode 100644 fs/xfs/xfs_attr_item.c
 create mode 100644 fs/xfs/xfs_attr_item.h

-- 
2.25.1


             reply	other threads:[~2022-01-24  5:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  5:26 Allison Henderson [this message]
2022-01-24  5:26 ` [PATCH v26 01/12] xfs: Fix double unlock in defer capture code Allison Henderson
2022-01-27  5:38   ` Chandan Babu R
2022-01-27 22:54     ` Allison Henderson
2022-01-24  5:26 ` [PATCH v26 02/12] xfs: don't commit the first deferred transaction without intents Allison Henderson
2022-01-25  0:52   ` Darrick J. Wong
2022-01-27  6:45     ` Allison Henderson
2022-01-24  5:26 ` [PATCH v26 03/12] xfs: Return from xfs_attr_set_iter if there are no more rmtblks to process Allison Henderson
2022-01-24  5:27 ` [PATCH v26 04/12] xfs: Set up infrastructure for log attribute replay Allison Henderson
2022-01-25  1:10   ` Darrick J. Wong
2022-01-27  6:45     ` Allison Henderson
2022-01-24  5:27 ` [PATCH v26 05/12] xfs: Implement attr logging and replay Allison Henderson
2022-01-25  1:19   ` Darrick J. Wong
2022-01-27  6:45     ` Allison Henderson
2022-01-24  5:27 ` [PATCH v26 06/12] xfs: Skip flip flags for delayed attrs Allison Henderson
2022-01-24  5:27 ` [PATCH v26 07/12] xfs: Add xfs_attr_set_deferred and xfs_attr_remove_deferred Allison Henderson
2022-01-24  5:27 ` [PATCH v26 08/12] xfs: Remove unused xfs_attr_*_args Allison Henderson
2022-01-24  5:27 ` [PATCH v26 09/12] xfs: Add log attribute error tag Allison Henderson
2022-01-24  5:27 ` [PATCH v26 10/12] xfs: Add larp debug option Allison Henderson
2022-01-24  5:27 ` [PATCH v26 11/12] xfs: Merge xfs_delattr_context into xfs_attr_item Allison Henderson
2022-01-24  5:27 ` [PATCH v26 12/12] xfs: Add helper function xfs_attr_leaf_addname Allison Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220124052708.580016-1-allison.henderson@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.