All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v24 00/11] Log Attribute Replay
@ 2021-08-24 22:44 Allison Henderson
  2021-08-24 22:44 ` [PATCH v24 01/11] xfs: Return from xfs_attr_set_iter if there are no more rmtblks to process Allison Henderson
                   ` (12 more replies)
  0 siblings, 13 replies; 47+ messages in thread
From: Allison Henderson @ 2021-08-24 22:44 UTC (permalink / raw)
  To: linux-xfs

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 v23:

xfs: Return from xfs_attr_set_iter if there are no more rmtblks to process
   Fixed xfs/125 fail

xfs: Capture buffers for delayed ops
   NEW

xfs: Set up infrastructure for deferred attribute operations
   Commit message updated with new name
   Removed hasdelattr() from xfs_attri_validate

xfs: Implement attr logging and replay
   Fixed xfs_sb_version_hasdelattr to use sb_features_log_incompat
   Removed redundant flag set in xfs_trans_attr_finish_update
   Renamed XFS_SB_FEAT_INCOMPAT_LOG_DELATTR to XFS_SB_FEAT_INCOMPAT_LOG_XATTRS
   Renamed xfs_sb_version_hasdelattr sb_version_haslogxattrs
   Removed unneeded xfs_qm_dqattach_locked in xfs_trans_attr_finish_update
   Changed xfs_hasdelattr to sb_version_haslogxattrs in xfs_attr_create_intent
   Simplified args pointer in xfs_attri_item_recover
   Removed uneeded buffer rejoin logic

RFC xfs: Skip flip flags for delayed attrs
   Fixed xfs/125 fail

 xfs: Add xfs_attr_set_deferred and xfs_attr_remove_deferred
   added delayed sample to avoid potential race when enabling feature 
   moved warn_once to after error check

xfs: Remove unused xfs_attr_*_args
   Removed local variable leaf_bp

xfs: Add log attribute error tag
   Renamed error tag to ERRTAG_LARP

xfs: Add larp debug option
   NEW

xfs: Merge xfs_delattr_context into xfs_attr_item
   Rebase adjustments

xfs: Add helper function xfs_attr_leaf_addname
    Rebase adjustments

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

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

And the test cases:
https://github.com/allisonhenderson/xfs_work/tree/pptr_xfstestsv4
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_v24
https://github.com/allisonhenderson/xfs_work/tree/delayed_attrs_xfsprogs_v24_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 Collins (1):
  xfs: Add xfs_attr_set_deferred and xfs_attr_remove_deferred

Allison Henderson (10):
  xfs: Return from xfs_attr_set_iter if there are no more rmtblks to
    process
  xfs: Capture buffers for delayed ops
  xfs: Set up infrastructure for log atrribute replay
  xfs: Implement attr logging and replay
  RFC xfs: Skip flip flags for delayed attrs
  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        | 454 +++++++++---------
 fs/xfs/libxfs/xfs_attr.h        |  57 ++-
 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       |   8 +-
 fs/xfs/libxfs/xfs_defer.h       |   7 +-
 fs/xfs/libxfs/xfs_errortag.h    |   4 +-
 fs/xfs/libxfs/xfs_format.h      |  10 +-
 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          | 814 ++++++++++++++++++++++++++++++++
 fs/xfs/xfs_attr_item.h          |  52 ++
 fs/xfs/xfs_attr_list.c          |   1 +
 fs/xfs/xfs_bmap_item.c          |   2 +-
 fs/xfs/xfs_buf.c                |   1 +
 fs/xfs/xfs_buf.h                |   1 +
 fs/xfs/xfs_error.c              |   3 +
 fs/xfs/xfs_extfree_item.c       |   2 +-
 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                |   1 +
 fs/xfs/xfs_log_recover.c        |   9 +
 fs/xfs/xfs_ondisk.h             |   2 +
 fs/xfs/xfs_refcount_item.c      |   2 +-
 fs/xfs/xfs_rmap_item.c          |   2 +-
 fs/xfs/xfs_sysctl.h             |   1 +
 fs/xfs/xfs_sysfs.c              |  24 +
 fs/xfs/xfs_trace.h              |   1 +
 33 files changed, 1333 insertions(+), 270 deletions(-)
 create mode 100644 fs/xfs/xfs_attr_item.c
 create mode 100644 fs/xfs/xfs_attr_item.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 47+ messages in thread
* Re: [PATCH v24 03/11] xfs: Set up infrastructure for log atrribute replay
  2021-08-24 22:44 ` [PATCH v24 03/11] xfs: Set up infrastructure for log atrribute replay Allison Henderson
@ 2021-08-25  8:31 ` Dan Carpenter
  2021-08-31  0:48   ` Dave Chinner
  2021-08-31 21:52   ` Dave Chinner
  2 siblings, 0 replies; 47+ messages in thread
From: kernel test robot @ 2021-08-25  7:53 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3382 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210824224434.968720-4-allison.henderson@oracle.com>
References: <20210824224434.968720-4-allison.henderson@oracle.com>
TO: Allison Henderson <allison.henderson@oracle.com>

Hi Allison,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on next-20210824]
[cannot apply to v5.14-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Allison-Henderson/Log-Attribute-Replay/20210825-064623
base:   https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: i386-randconfig-m021-20210824 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
fs/xfs/xfs_attr_item.c:186 xfs_attri_init() error: kvmalloc() only makes sense with GFP_KERNEL

vim +186 fs/xfs/xfs_attr_item.c

e8da86f8949ae3 Allison Henderson 2021-08-24  171  
e8da86f8949ae3 Allison Henderson 2021-08-24  172  /*
e8da86f8949ae3 Allison Henderson 2021-08-24  173   * Allocate and initialize an attri item.  Caller may allocate an additional
e8da86f8949ae3 Allison Henderson 2021-08-24  174   * trailing buffer of the specified size
e8da86f8949ae3 Allison Henderson 2021-08-24  175   */
e8da86f8949ae3 Allison Henderson 2021-08-24  176  STATIC struct xfs_attri_log_item *
e8da86f8949ae3 Allison Henderson 2021-08-24  177  xfs_attri_init(
e8da86f8949ae3 Allison Henderson 2021-08-24  178  	struct xfs_mount		*mp,
e8da86f8949ae3 Allison Henderson 2021-08-24  179  	int				buffer_size)
e8da86f8949ae3 Allison Henderson 2021-08-24  180  
e8da86f8949ae3 Allison Henderson 2021-08-24  181  {
e8da86f8949ae3 Allison Henderson 2021-08-24  182  	struct xfs_attri_log_item	*attrip;
e8da86f8949ae3 Allison Henderson 2021-08-24  183  	uint				size;
e8da86f8949ae3 Allison Henderson 2021-08-24  184  
e8da86f8949ae3 Allison Henderson 2021-08-24  185  	size = sizeof(struct xfs_attri_log_item) + buffer_size;
e8da86f8949ae3 Allison Henderson 2021-08-24 @186  	attrip = kvmalloc(size, KM_ZERO);
e8da86f8949ae3 Allison Henderson 2021-08-24  187  	if (attrip == NULL)
e8da86f8949ae3 Allison Henderson 2021-08-24  188  		return NULL;
e8da86f8949ae3 Allison Henderson 2021-08-24  189  
e8da86f8949ae3 Allison Henderson 2021-08-24  190  	xfs_log_item_init(mp, &attrip->attri_item, XFS_LI_ATTRI,
e8da86f8949ae3 Allison Henderson 2021-08-24  191  			  &xfs_attri_item_ops);
e8da86f8949ae3 Allison Henderson 2021-08-24  192  	attrip->attri_format.alfi_id = (uintptr_t)(void *)attrip;
e8da86f8949ae3 Allison Henderson 2021-08-24  193  	atomic_set(&attrip->attri_refcount, 2);
e8da86f8949ae3 Allison Henderson 2021-08-24  194  
e8da86f8949ae3 Allison Henderson 2021-08-24  195  	return attrip;
e8da86f8949ae3 Allison Henderson 2021-08-24  196  }
e8da86f8949ae3 Allison Henderson 2021-08-24  197  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40512 bytes --]

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

end of thread, other threads:[~2021-09-18  0:02 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 22:44 [PATCH v24 00/11] Log Attribute Replay Allison Henderson
2021-08-24 22:44 ` [PATCH v24 01/11] xfs: Return from xfs_attr_set_iter if there are no more rmtblks to process Allison Henderson
2021-08-24 22:44 ` [PATCH v24 02/11] xfs: Capture buffers for delayed ops Allison Henderson
2021-08-27 11:33   ` Chandan Babu R
2021-08-31 18:03     ` Allison Henderson
2021-08-30 17:44   ` Darrick J. Wong
2021-08-31 17:50     ` Allison Henderson
2021-09-18  0:02       ` Darrick J. Wong
2021-08-24 22:44 ` [PATCH v24 03/11] xfs: Set up infrastructure for log atrribute replay Allison Henderson
2021-08-27 14:17   ` Chandan Babu R
2021-08-31 18:03     ` Allison Henderson
2021-08-31  0:48   ` Dave Chinner
2021-08-31 19:03     ` Allison Henderson
2021-08-31 21:52   ` Dave Chinner
2021-09-01  5:34     ` Allison Henderson
2021-08-24 22:44 ` [PATCH v24 04/11] xfs: Implement attr logging and replay Allison Henderson
2021-08-30  7:47   ` Chandan Babu R
2021-08-31 18:11     ` Allison Henderson
2021-08-24 22:44 ` [PATCH v24 05/11] RFC xfs: Skip flip flags for delayed attrs Allison Henderson
2021-08-30 10:15   ` Chandan Babu R
2021-08-31 18:11     ` Allison Henderson
2021-08-24 22:44 ` [PATCH v24 06/11] xfs: Add xfs_attr_set_deferred and xfs_attr_remove_deferred Allison Henderson
2021-08-30 10:27   ` Chandan Babu R
2021-08-31 18:12     ` Allison Henderson
2021-09-01  3:47   ` Dave Chinner
2021-09-01  5:34     ` Allison Henderson
2021-08-24 22:44 ` [PATCH v24 07/11] xfs: Remove unused xfs_attr_*_args Allison Henderson
2021-08-24 22:44 ` [PATCH v24 08/11] xfs: Add log attribute error tag Allison Henderson
2021-08-24 22:44 ` [PATCH v24 09/11] xfs: Add larp debug option Allison Henderson
2021-08-30 12:03   ` Chandan Babu R
2021-08-31 18:12     ` Allison Henderson
2021-08-24 22:44 ` [PATCH v24 10/11] xfs: Merge xfs_delattr_context into xfs_attr_item Allison Henderson
2021-08-24 22:44 ` [PATCH v24 11/11] xfs: Add helper function xfs_attr_leaf_addname Allison Henderson
2021-08-30 14:17   ` Chandan Babu R
2021-08-31 18:13     ` Allison Henderson
2021-08-31  0:20 ` [PATCH v24 00/11] Log Attribute Replay Dave Chinner
2021-08-31 18:27   ` Allison Henderson
2021-09-01  6:29     ` Dave Chinner
2021-09-01  7:30 ` [PATCH 0/5] xfs: various logged attribute fixes Dave Chinner
2021-09-01  7:30   ` [PATCH 1/5] xfs: fix fallthrough annotations in xfs_attr_set_iter() Dave Chinner
2021-09-01  7:30   ` [PATCH 2/5] xfs: fix flags passed to kvmalloc() by xfs_attri_init() Dave Chinner
2021-09-01  7:30   ` [PATCH 3/5] xfs: hide log iovec alignment constraints Dave Chinner
2021-09-01  7:30   ` [PATCH 4/5] xfs: fix attribute log iovec sizing Dave Chinner
2021-09-01  7:30   ` [PATCH 5/5] [RFC] xfs: don't commit the first deferred transaction without intents Dave Chinner
2021-09-01 21:43   ` [PATCH 0/5] xfs: various logged attribute fixes Allison Henderson
2021-08-25  7:53 [PATCH v24 03/11] xfs: Set up infrastructure for log atrribute replay kernel test robot
2021-08-25  8:31 ` [kbuild] " Dan Carpenter

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.