All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/19] xfs: Delayed Ready Attrs
@ 2020-02-23  2:05 Allison Collins
  2020-02-23  2:05 ` [PATCH v7 01/19] xfs: Replace attribute parameters with struct xfs_name Allison Collins
                   ` (19 more replies)
  0 siblings, 20 replies; 135+ messages in thread
From: Allison Collins @ 2020-02-23  2:05 UTC (permalink / raw)
  To: linux-xfs

Hi all,

This set is a subset of a larger series for delayed attributes. Which is
a subset of an even 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 either a delayed operation or a inline operation
since older filesystems will not be able to use the new log entries.
This means that they cannot roll, commit, or finish transactions.
Instead, they return  EAGAIN an allow the calling function to handle
the transaction. In this series, we focus on only the clean up and
refactoring needed to accomplish this. We will introduce delayed attrs
and parent pointers in a later set.

At the moment, I would like people to focus their review efforts on just
this "delay ready" subseries, as I think that is a more conservative use
of peoples review time.  I also think the set is a bit much to manage
all at once, and we need to get the infrastructure ironed out before we
focus too much anything that depends on it. But I do have the extended
series for folks that want to see the bigger picture of where this is
going.

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

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

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

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

To run as delayed attributes run:
export MKFS_OPTIONS="-n delattr"
check -g attr

To run parent pointer tests:
check -g parent

Changes since v6:
Mostly review just updates.  In the last review folks asked for a
diagram to make the code flow more visual.  They have been added in
patches 13 and 14.  At the moment, they're in the commit message.  I
figure people can decide where or if they want them somewhere in the
code later, since they are a bit lengthy.  Patch 15 is a helper function
that used to be part of 14 but I separated it to better organize things.
Patches 18 and 19 are new, and are just cleanups that I thought would
be helpful.

I've also gone through the set and rearranged the order of some of the
patches to make sort of mini sets.  I thought it would help reviewers
break down the reviewing some. For reviewing purposes, the set could be
broken up into 5 different phases:

Clean ups (patches 1-2):
These two patches were actually review suggestions made quiet some time
ago in regaurds to commit d29f781 (Remove all strlen ...), which has
since been merged.  The idea of the cleanups was to collapse down the
number of parameters getting passed around the xfs_attr_* routines.  It
has since drawn both commentary and critisim, so it's a little unclear
to me if people want it or not.  It could easily be taken as a stand
alone clean up.  But it's also not a neccassary must have in so far as
the delayed operations are concerned.  It does however pepper around a
lot of change activity up through the set.  So it would be helpfull to
get a verdict one way or another, depending on how people feel about it.
   xfs: Replace attribute parameters with struct xfs_name
   xfs: Embed struct xfs_name in xfs_da_args

Error code filtering (patches 3-4):
These two patches are all about finding and catching error codes that
need to be sent back up to user space before starting delayed
operations.  Errors that happen during a delayed operation are treated
like interal errors that cause a shutdown.  But we wouldnt want that
for example: when the user tries to rename a non existent attr.  So the
idea is that we need to find all such conditions, and take care of them
before starting a delayed operation.
   xfs: Add xfs_has_attr and subroutines
   xfs: Check for -ENOATTR or -EEXIST

Move transactions upwards (patches 5-12):
The goal of this subset is to try and move all the transaction specific
code up the call stack much as possible.  The idea being that once we
get them to the top, we can introduce the statemachine to handle the
-EAGAIN logic where ever the transactions used to be.
   xfs: Factor out new helper functions xfs_attr_rmtval_set
   xfs: Factor out trans handling in xfs_attr3_leaf_flipflags
   xfs: Factor out xfs_attr_leaf_addname helper
   xfs: Refactor xfs_attr_try_sf_addname
   xfs: Factor out trans roll from xfs_attr3_leaf_setflag
   xfs: Factor out xfs_attr_rmtval_invalidate
   xfs: Factor out trans roll in xfs_attr3_leaf_clearflag
   xfs: Add helper function xfs_attr_rmtval_unmap

Introduce statemachine (patches 13-14):
Now that we have re-arranged the code such that we can remove the
transaction handleing, we proceed to do so.  The behavior of the attr
set/remove routines are now also compatible as a .finish_item callback
   xfs: Add delay ready attr remove routines
   xfs: Add delay ready attr set routines

Modularizing and cleanups (patches 15-19):
Now that we have pulled the transactions up to where we need them, it's
time to start breaking down the top level functions into new
subfunctions. The goal being to work towards a top level function that
deals mostly with the statemachine, and helpers for those states
   xfs: Add helper function xfs_attr_node_shrink
   xfs: Simplify xfs_attr_set_iter
   xfs: Add helper function xfs_attr_leaf_mark_incomplete
   xfs: Add remote block helper functions
   xfs: Remove xfs_attr_rmtval_remove


I've also made the corresponding updates to the user space side as well.

Questions, comment and feedback appreciated! 

Thanks all!
Allison

Allison Collins (18):
  xfs: Replace attribute parameters with struct xfs_name
  xfs: Embed struct xfs_name in xfs_da_args
  xfs: Check for -ENOATTR or -EEXIST
  xfs: Factor out new helper functions xfs_attr_rmtval_set
  xfs: Factor out trans handling in xfs_attr3_leaf_flipflags
  xfs: Factor out xfs_attr_leaf_addname helper
  xfs: Refactor xfs_attr_try_sf_addname
  xfs: Factor out trans roll from xfs_attr3_leaf_setflag
  xfs: Factor out xfs_attr_rmtval_invalidate
  xfs: Factor out trans roll in xfs_attr3_leaf_clearflag
  xfs: Add helper function xfs_attr_rmtval_unmap
  xfs: Add delay ready attr remove routines
  xfs: Add delay ready attr set routines
  xfs: Add helper function xfs_attr_node_shrink
  xfs: Simplify xfs_attr_set_iter
  xfs: Add helper function xfs_attr_leaf_mark_incomplete
  xfs: Add remote block helper functions
  xfs: Remove xfs_attr_rmtval_remove

Allison Henderson (1):
  xfs: Add xfs_has_attr and subroutines

 fs/xfs/libxfs/xfs_attr.c        | 947 ++++++++++++++++++++++++++++------------
 fs/xfs/libxfs/xfs_attr.h        |  15 +-
 fs/xfs/libxfs/xfs_attr_leaf.c   | 220 +++++-----
 fs/xfs/libxfs/xfs_attr_leaf.h   |   3 +
 fs/xfs/libxfs/xfs_attr_remote.c | 260 +++++++----
 fs/xfs/libxfs/xfs_attr_remote.h |   7 +-
 fs/xfs/libxfs/xfs_da_btree.c    |   6 +-
 fs/xfs/libxfs/xfs_da_btree.h    |  47 +-
 fs/xfs/libxfs/xfs_dir2.c        |  18 +-
 fs/xfs/libxfs/xfs_dir2_block.c  |   6 +-
 fs/xfs/libxfs/xfs_dir2_leaf.c   |   6 +-
 fs/xfs/libxfs/xfs_dir2_node.c   |   8 +-
 fs/xfs/libxfs/xfs_dir2_sf.c     |  30 +-
 fs/xfs/libxfs/xfs_types.c       |  11 +
 fs/xfs/libxfs/xfs_types.h       |   1 +
 fs/xfs/scrub/attr.c             |  12 +-
 fs/xfs/scrub/common.c           |   2 +
 fs/xfs/xfs_acl.c                |  27 +-
 fs/xfs/xfs_attr_list.c          |   1 +
 fs/xfs/xfs_ioctl.c              |  25 +-
 fs/xfs/xfs_ioctl32.c            |   2 +
 fs/xfs/xfs_iops.c               |   8 +-
 fs/xfs/xfs_trace.h              |  21 +-
 fs/xfs/xfs_xattr.c              |  29 +-
 24 files changed, 1140 insertions(+), 572 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 135+ messages in thread

end of thread, other threads:[~2020-03-05  3:36 UTC | newest]

Thread overview: 135+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23  2:05 [PATCH v7 00/19] xfs: Delayed Ready Attrs Allison Collins
2020-02-23  2:05 ` [PATCH v7 01/19] xfs: Replace attribute parameters with struct xfs_name Allison Collins
2020-02-23  9:34   ` Amir Goldstein
2020-02-23 16:03     ` Allison Collins
2020-02-25  0:49       ` Dave Chinner
2020-02-24 12:08   ` Chandan Rajendra
2020-02-24 16:25     ` Allison Collins
2020-02-24 13:06   ` Brian Foster
2020-02-24 16:25     ` Allison Collins
2020-02-23  2:05 ` [PATCH v7 02/19] xfs: Embed struct xfs_name in xfs_da_args Allison Collins
2020-02-23 11:54   ` Amir Goldstein
2020-02-23 16:51     ` Allison Collins
2020-02-24  6:50       ` Amir Goldstein
2020-02-24  7:36         ` Allison Collins
2020-02-24  7:43           ` Amir Goldstein
2020-02-25  0:57   ` Dave Chinner
2020-02-25  2:00     ` Allison Collins
2020-02-25  4:06       ` Dave Chinner
2020-02-25  4:19         ` Allison Collins
2020-02-25  4:27           ` Darrick J. Wong
2020-02-25  6:07             ` Allison Collins
2020-02-25  6:30               ` Dave Chinner
2020-02-25 17:21             ` Christoph Hellwig
2020-02-25  6:56   ` Chandan Rajendra
2020-02-25 23:26     ` Allison Collins
2020-02-23  2:05 ` [PATCH v7 03/19] xfs: Add xfs_has_attr and subroutines Allison Collins
2020-02-23 12:20   ` Amir Goldstein
2020-02-23 17:28     ` Allison Collins
2020-02-24  6:58       ` Amir Goldstein
2020-02-25  6:26     ` Dave Chinner
2020-02-25  6:43       ` Amir Goldstein
2020-02-25 22:27         ` Dave Chinner
2020-02-24 13:08   ` Brian Foster
2020-02-24 21:18     ` Allison Collins
2020-02-25 13:25       ` Brian Foster
2020-02-26  2:31         ` Allison Collins
2020-02-25  9:49   ` Chandan Rajendra
2020-02-25 10:15     ` Chandan Rajendra
2020-02-26  2:19       ` Allison Collins
2020-02-26  2:18     ` Allison Collins
2020-02-23  2:05 ` [PATCH v7 04/19] xfs: Check for -ENOATTR or -EEXIST Allison Collins
2020-02-23 12:25   ` Amir Goldstein
2020-02-23 17:33     ` Allison Collins
2020-02-24 13:08   ` Brian Foster
2020-02-24 21:18     ` Allison Collins
2020-02-23  2:05 ` [PATCH v7 05/19] xfs: Factor out new helper functions xfs_attr_rmtval_set Allison Collins
2020-02-25 12:53   ` Chandan Rajendra
2020-02-26  2:20     ` Allison Collins
2020-02-23  2:05 ` [PATCH v7 06/19] xfs: Factor out trans handling in xfs_attr3_leaf_flipflags Allison Collins
2020-02-23 12:30   ` Amir Goldstein
2020-02-23 17:36     ` Allison Collins
2020-02-28  4:56   ` Chandan Rajendra
2020-02-23  2:05 ` [PATCH v7 07/19] xfs: Factor out xfs_attr_leaf_addname helper Allison Collins
2020-02-23 12:42   ` Amir Goldstein
2020-02-23 18:38     ` Allison Collins
2020-02-24  6:38       ` Amir Goldstein
2020-02-24  7:09         ` Allison Collins
2020-02-24  7:27           ` Amir Goldstein
2020-02-25  6:42   ` Dave Chinner
2020-02-25 13:26     ` Brian Foster
2020-02-25 23:26     ` Allison Collins
2020-02-28  6:51   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 08/19] xfs: Refactor xfs_attr_try_sf_addname Allison Collins
2020-02-23 13:04   ` Amir Goldstein
2020-02-23 17:51     ` Allison Collins
2020-02-24 13:08   ` Brian Foster
2020-02-24 21:19     ` Allison Collins
2020-02-28  7:42   ` Chandan Rajendra
2020-02-28 18:14     ` Allison Collins
2020-02-23  2:06 ` [PATCH v7 09/19] xfs: Factor out trans roll from xfs_attr3_leaf_setflag Allison Collins
2020-02-28  7:59   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 10/19] xfs: Factor out xfs_attr_rmtval_invalidate Allison Collins
2020-02-28 10:42   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 11/19] xfs: Factor out trans roll in xfs_attr3_leaf_clearflag Allison Collins
2020-02-28 10:56   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 12/19] xfs: Add helper function xfs_attr_rmtval_unmap Allison Collins
2020-02-24 13:40   ` Brian Foster
2020-02-24 21:44     ` Allison Collins
2020-02-25 13:27       ` Brian Foster
2020-02-26  3:29         ` Allison Collins
2020-02-26 13:47           ` Brian Foster
2020-02-25  7:21   ` Dave Chinner
2020-02-25 23:27     ` Allison Collins
2020-02-28 14:22   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 13/19] xfs: Add delay ready attr remove routines Allison Collins
2020-02-24 15:25   ` Brian Foster
2020-02-24 17:03     ` Brian Foster
2020-02-24 23:14     ` Allison Collins
2020-02-24 23:56       ` Darrick J. Wong
2020-02-25 13:34       ` Brian Foster
2020-02-26  5:36         ` Allison Collins
2020-02-26 13:48           ` Brian Foster
2020-02-26 19:23             ` Allison Collins
2020-02-25  8:57   ` Dave Chinner
2020-02-26  0:57     ` Allison Collins
2020-02-26 22:34       ` Dave Chinner
2020-02-27  4:18         ` Allison Collins
2020-03-03  5:03   ` Chandan Rajendra
2020-03-03  5:40     ` Allison Collins
2020-02-23  2:06 ` [PATCH v7 14/19] xfs: Add delay ready attr set routines Allison Collins
2020-03-03 13:41   ` Chandan Rajendra
2020-03-03 17:07     ` Allison Collins
2020-02-23  2:06 ` [PATCH v7 15/19] xfs: Add helper function xfs_attr_node_shrink Allison Collins
2020-02-23 13:22   ` Amir Goldstein
2020-02-23 18:41     ` Allison Collins
2020-02-25  9:05   ` Dave Chinner
2020-02-26  1:48     ` Allison Collins
2020-02-23  2:06 ` [PATCH v7 16/19] xfs: Simplify xfs_attr_set_iter Allison Collins
2020-02-23 13:26   ` Amir Goldstein
2020-02-23 18:42     ` Allison Collins
2020-02-25  9:21   ` Dave Chinner
2020-02-26  2:13     ` Allison Collins
2020-02-26 22:39       ` Dave Chinner
2020-03-04  4:30   ` Chandan Rajendra
2020-03-04 17:04     ` Allison Collins
2020-03-05  3:39       ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 17/19] xfs: Add helper function xfs_attr_leaf_mark_incomplete Allison Collins
2020-02-23 13:47   ` Amir Goldstein
2020-02-23 18:43     ` Allison Collins
2020-02-25  9:31   ` Dave Chinner
2020-02-26  2:17     ` Allison Collins
2020-03-04  4:37   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 18/19] xfs: Add remote block helper functions Allison Collins
2020-02-23 13:45   ` Amir Goldstein
2020-03-04  4:59   ` Chandan Rajendra
2020-02-23  2:06 ` [PATCH v7 19/19] xfs: Remove xfs_attr_rmtval_remove Allison Collins
2020-02-23 13:54   ` Amir Goldstein
2020-02-23 18:50     ` Allison Collins
2020-02-23  7:55 ` [PATCH v7 00/19] xfs: Delayed Ready Attrs Amir Goldstein
2020-02-23 16:02   ` Allison Collins
2020-02-24  6:30     ` Amir Goldstein
2020-02-24 16:23       ` Allison Collins
2020-02-25  5:53         ` Amir Goldstein
2020-02-24  8:31   ` Chandan Rajendra
2020-02-25  9:52   ` Dave Chinner

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.