* Re: [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5
@ 2022-08-06 14:39 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-08-06 14:39 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]
BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220804194013.99237-3-allison.henderson@oracle.com>
References: <20220804194013.99237-3-allison.henderson@oracle.com>
TO: Allison Henderson <allison.henderson@oracle.com>
TO: linux-xfs(a)vger.kernel.org
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 linus/master v5.19 next-20220805]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Allison-Henderson/Parent-Pointers/20220805-034225
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-c021 (https://download.01.org/0day-ci/archive/20220806/202208062229.vnaY4noA-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> fs/xfs/libxfs/xfs_defer.c:846:24-25: WARNING opportunity for swap()
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH RESEND v2 00/18] Parent Pointers
@ 2022-08-04 19:39 Allison Henderson
2022-08-04 19:39 ` [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 Allison Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Allison Henderson @ 2022-08-04 19:39 UTC (permalink / raw)
To: linux-xfs
Hi all,
This is a rebase and resend of the latest parent pointer attributes for xfs.
The goal of this patch set is to add a parent pointer attribute to each inode.
The attribute name containing the parent inode, generation, and directory
offset, while the attribute value contains the file name. This feature will
enable future optimizations for online scrub, or any other feature that could
make use of quickly deriving an inodes path from the mount point.
This set can be viewed on github here
https://github.com/allisonhenderson/xfs/tree/xfs_new_pptrsv2_rebase
And the corresponding xfsprogs code is here
https://github.com/allisonhenderson/xfsprogs/tree/xfsprogs_new_pptrsv2
This set has been tested with the below parent pointers tests
https://www.spinics.net/lists/fstests/msg19963.html
Updates since v1:
xfs: Fix multi-transaction larp replay
Resend (from stand alone patch)
xfs: Increase XFS_DEFER_OPS_NR_INODES to 5
Increased XFS_DEFER_OPS_NR_INODES from 4 to 5
Moved to beginning of the set
Added code in xfs_defer_ops_continue to sort the inodes
Added commentary about which inodes are locked
xfs: Hold inode locks in xfs_trans_alloc_dir
New patch
xfs: add parent pointer support to attribute code
Typo fix
xfs: extend transaction reservations for parent attribute
Made xfs_calc_parent_ptr_reservations static
Whitespace fixes
xfs: parent pointer attribute creation
Fixed SPDX License Headers
Updated xfs_sb_version_hasparent to xfs_has_parent
Type def conversions
Whitespace
Added helper functions: xfs_parent_init, xfs_parent_defer_add,
xfs_parent_cancel
Investigated mount option that overrides larp option:
The larp global itself isnt used with in the delayed ops machinery due
to race conditions with the syscall being toggled. Pptrs dont toggle
so we can just set XFS_DA_OP_LOGGED to log the pptr with out requireing
all attrs be logged
xfs: add parent attributes to link
Rebase to use new helpers: xfs_parent_init, xfs_parent_defer_add,
xfs_parent_cancel, xfs_has_parent
xfs: add parent attributes to unlink
rebase to use new helpers
added helper function xfs_parent_defer_remove
xfs: Add parent pointers to rename
added extra parent remove for target_ip unlinks
rebase to use new helpers
xfs: Add the parent pointer support to the superblock version 5.
changed XFS_SB_FEAT_RO_COMPAT_PARENT to XFS_SB_FEAT_INCOMPAT_PARENT
xfs: Add parent pointer ioctl
Added pi_parents[] to struct xfs_parent_ptr
Changed pptr helper defines into inline functions
White space/indentation
Reordered flag check in xfs_ioc_get_parent_pointer to be before the alloc
Added gen number check in xfs_ioc_get_parent_pointer
Init args in loop body of xfs_attr_get_parent_pointer
Questions comments and feedback appreciated!
Thanks all!
Allison
Allison Henderson (18):
xfs: Fix multi-transaction larp replay
xfs: Increase XFS_DEFER_OPS_NR_INODES to 5
xfs: Hold inode locks in xfs_ialloc
xfs: Hold inode locks in xfs_trans_alloc_dir
xfs: get directory offset when adding directory name
xfs: get directory offset when removing directory name
xfs: get directory offset when replacing a directory name
xfs: add parent pointer support to attribute code
xfs: define parent pointer xattr format
xfs: Add xfs_verify_pptr
xfs: extend transaction reservations for parent attributes
xfs: parent pointer attribute creation
xfs: add parent attributes to link
xfs: remove parent pointers in unlink
xfs: Add parent pointers to rename
xfs: Add the parent pointer support to the superblock version 5.
xfs: Add helper function xfs_attr_list_context_init
xfs: Add parent pointer ioctl
fs/xfs/Makefile | 2 +
fs/xfs/libxfs/xfs_attr.c | 53 ++++++-
fs/xfs/libxfs/xfs_attr.h | 8 +-
fs/xfs/libxfs/xfs_da_btree.h | 1 +
fs/xfs/libxfs/xfs_da_format.h | 30 +++-
fs/xfs/libxfs/xfs_defer.c | 28 +++-
fs/xfs/libxfs/xfs_defer.h | 8 +-
fs/xfs/libxfs/xfs_dir2.c | 21 ++-
fs/xfs/libxfs/xfs_dir2.h | 7 +-
fs/xfs/libxfs/xfs_dir2_block.c | 9 +-
fs/xfs/libxfs/xfs_dir2_leaf.c | 8 +-
fs/xfs/libxfs/xfs_dir2_node.c | 8 +-
fs/xfs/libxfs/xfs_dir2_sf.c | 6 +
fs/xfs/libxfs/xfs_format.h | 4 +-
fs/xfs/libxfs/xfs_fs.h | 58 +++++++
fs/xfs/libxfs/xfs_log_format.h | 1 +
fs/xfs/libxfs/xfs_parent.c | 159 +++++++++++++++++++
fs/xfs/libxfs/xfs_parent.h | 39 +++++
fs/xfs/libxfs/xfs_sb.c | 4 +
fs/xfs/libxfs/xfs_trans_resv.c | 105 ++++++++++---
fs/xfs/scrub/attr.c | 2 +-
fs/xfs/xfs_attr_item.c | 41 ++---
fs/xfs/xfs_attr_list.c | 17 ++-
fs/xfs/xfs_file.c | 1 +
fs/xfs/xfs_inode.c | 271 +++++++++++++++++++++++++--------
fs/xfs/xfs_inode.h | 1 +
fs/xfs/xfs_ioctl.c | 149 +++++++++++++++---
fs/xfs/xfs_ioctl.h | 2 +
fs/xfs/xfs_ondisk.h | 4 +
fs/xfs/xfs_parent_utils.c | 134 ++++++++++++++++
fs/xfs/xfs_parent_utils.h | 22 +++
fs/xfs/xfs_qm.c | 4 +-
fs/xfs/xfs_super.c | 4 +
fs/xfs/xfs_symlink.c | 6 +-
fs/xfs/xfs_trans.c | 6 +-
fs/xfs/xfs_xattr.c | 2 +-
fs/xfs/xfs_xattr.h | 1 +
37 files changed, 1056 insertions(+), 170 deletions(-)
create mode 100644 fs/xfs/libxfs/xfs_parent.c
create mode 100644 fs/xfs/libxfs/xfs_parent.h
create mode 100644 fs/xfs/xfs_parent_utils.c
create mode 100644 fs/xfs/xfs_parent_utils.h
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 2022-08-04 19:39 [PATCH RESEND v2 00/18] Parent Pointers Allison Henderson @ 2022-08-04 19:39 ` Allison Henderson 2022-08-09 16:38 ` Darrick J. Wong 0 siblings, 1 reply; 4+ messages in thread From: Allison Henderson @ 2022-08-04 19:39 UTC (permalink / raw) To: linux-xfs Renames that generate parent pointer updates can join up to 5 inodes locked in sorted order. So we need to increase the number of defer ops inodes and relock them in the same way. Signed-off-by: Allison Henderson <allison.henderson@oracle.com> --- fs/xfs/libxfs/xfs_defer.c | 28 ++++++++++++++++++++++++++-- fs/xfs/libxfs/xfs_defer.h | 8 +++++++- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_inode.h | 1 + 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c index 5a321b783398..c0279b57e51d 100644 --- a/fs/xfs/libxfs/xfs_defer.c +++ b/fs/xfs/libxfs/xfs_defer.c @@ -820,13 +820,37 @@ xfs_defer_ops_continue( struct xfs_trans *tp, struct xfs_defer_resources *dres) { - unsigned int i; + unsigned int i, j; + struct xfs_inode *sips[XFS_DEFER_OPS_NR_INODES]; + struct xfs_inode *temp; ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); /* Lock the captured resources to the new transaction. */ - if (dfc->dfc_held.dr_inos == 2) + if (dfc->dfc_held.dr_inos > 2) { + /* + * Renames with parent pointer updates can lock up to 5 inodes, + * sorted by their inode number. So we need to make sure they + * are relocked in the same way. + */ + memset(sips, 0, sizeof(sips)); + for (i = 0; i < dfc->dfc_held.dr_inos; i++) + sips[i] = dfc->dfc_held.dr_ip[i]; + + /* Bubble sort of at most 5 inodes */ + for (i = 0; i < dfc->dfc_held.dr_inos; i++) { + for (j = 1; j < dfc->dfc_held.dr_inos; j++) { + if (sips[j]->i_ino < sips[j-1]->i_ino) { + temp = sips[j]; + sips[j] = sips[j-1]; + sips[j-1] = temp; + } + } + } + + xfs_lock_inodes(sips, dfc->dfc_held.dr_inos, XFS_ILOCK_EXCL); + } else if (dfc->dfc_held.dr_inos == 2) xfs_lock_two_inodes(dfc->dfc_held.dr_ip[0], XFS_ILOCK_EXCL, dfc->dfc_held.dr_ip[1], XFS_ILOCK_EXCL); else if (dfc->dfc_held.dr_inos == 1) diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h index 114a3a4930a3..3e4029d2ce41 100644 --- a/fs/xfs/libxfs/xfs_defer.h +++ b/fs/xfs/libxfs/xfs_defer.h @@ -70,7 +70,13 @@ extern const struct xfs_defer_op_type xfs_attr_defer_type; /* * Deferred operation item relogging limits. */ -#define XFS_DEFER_OPS_NR_INODES 2 /* join up to two inodes */ + +/* + * Rename w/ parent pointers can require up to 5 inodes with defered ops to + * be joined to the transaction: src_dp, target_dp, src_ip, target_ip, and wip. + * These inodes are locked in sorted order by their inode numbers + */ +#define XFS_DEFER_OPS_NR_INODES 5 #define XFS_DEFER_OPS_NR_BUFS 2 /* join up to two buffers */ /* Resources that must be held across a transaction roll. */ diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 3022918bf96a..cfdcca95594f 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -447,7 +447,7 @@ xfs_lock_inumorder( * lock more than one at a time, lockdep will report false positives saying we * have violated locking orders. */ -static void +void xfs_lock_inodes( struct xfs_inode **ips, int inodes, diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 4d626f4321bc..bc06d6e4164a 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -573,5 +573,6 @@ void xfs_end_io(struct work_struct *work); int xfs_ilock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode *ip2); void xfs_iunlock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode *ip2); +void xfs_lock_inodes(struct xfs_inode **ips, int inodes, uint lock_mode); #endif /* __XFS_INODE_H__ */ -- 2.25.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 2022-08-04 19:39 ` [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 Allison Henderson @ 2022-08-09 16:38 ` Darrick J. Wong 2022-08-10 3:07 ` Alli 0 siblings, 1 reply; 4+ messages in thread From: Darrick J. Wong @ 2022-08-09 16:38 UTC (permalink / raw) To: Allison Henderson; +Cc: linux-xfs On Thu, Aug 04, 2022 at 12:39:57PM -0700, Allison Henderson wrote: > Renames that generate parent pointer updates can join up to 5 > inodes locked in sorted order. So we need to increase the > number of defer ops inodes and relock them in the same way. > > Signed-off-by: Allison Henderson <allison.henderson@oracle.com> > --- > fs/xfs/libxfs/xfs_defer.c | 28 ++++++++++++++++++++++++++-- > fs/xfs/libxfs/xfs_defer.h | 8 +++++++- > fs/xfs/xfs_inode.c | 2 +- > fs/xfs/xfs_inode.h | 1 + > 4 files changed, 35 insertions(+), 4 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c > index 5a321b783398..c0279b57e51d 100644 > --- a/fs/xfs/libxfs/xfs_defer.c > +++ b/fs/xfs/libxfs/xfs_defer.c > @@ -820,13 +820,37 @@ xfs_defer_ops_continue( > struct xfs_trans *tp, > struct xfs_defer_resources *dres) > { > - unsigned int i; > + unsigned int i, j; > + struct xfs_inode *sips[XFS_DEFER_OPS_NR_INODES]; > + struct xfs_inode *temp; > > ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); > ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); > > /* Lock the captured resources to the new transaction. */ > - if (dfc->dfc_held.dr_inos == 2) > + if (dfc->dfc_held.dr_inos > 2) { > + /* > + * Renames with parent pointer updates can lock up to 5 inodes, > + * sorted by their inode number. So we need to make sure they > + * are relocked in the same way. > + */ > + memset(sips, 0, sizeof(sips)); > + for (i = 0; i < dfc->dfc_held.dr_inos; i++) > + sips[i] = dfc->dfc_held.dr_ip[i]; > + > + /* Bubble sort of at most 5 inodes */ > + for (i = 0; i < dfc->dfc_held.dr_inos; i++) { > + for (j = 1; j < dfc->dfc_held.dr_inos; j++) { > + if (sips[j]->i_ino < sips[j-1]->i_ino) { > + temp = sips[j]; > + sips[j] = sips[j-1]; > + sips[j-1] = temp; > + } > + } > + } Why not reuse xfs_sort_for_rename? I also wonder if it's worth the trouble to replace the open-coded bubblesort with a call to sort_r(), but TBH I suspect the cost of a retpoline for the compare function isn't worth the overhead. > + > + xfs_lock_inodes(sips, dfc->dfc_held.dr_inos, XFS_ILOCK_EXCL); > + } else if (dfc->dfc_held.dr_inos == 2) > xfs_lock_two_inodes(dfc->dfc_held.dr_ip[0], XFS_ILOCK_EXCL, > dfc->dfc_held.dr_ip[1], XFS_ILOCK_EXCL); > else if (dfc->dfc_held.dr_inos == 1) > diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h > index 114a3a4930a3..3e4029d2ce41 100644 > --- a/fs/xfs/libxfs/xfs_defer.h > +++ b/fs/xfs/libxfs/xfs_defer.h > @@ -70,7 +70,13 @@ extern const struct xfs_defer_op_type xfs_attr_defer_type; > /* > * Deferred operation item relogging limits. > */ > -#define XFS_DEFER_OPS_NR_INODES 2 /* join up to two inodes */ > + > +/* > + * Rename w/ parent pointers can require up to 5 inodes with defered ops to > + * be joined to the transaction: src_dp, target_dp, src_ip, target_ip, and wip. > + * These inodes are locked in sorted order by their inode numbers Much inode. Thanks for recording this. --D > + */ > +#define XFS_DEFER_OPS_NR_INODES 5 > #define XFS_DEFER_OPS_NR_BUFS 2 /* join up to two buffers */ > > /* Resources that must be held across a transaction roll. */ > diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c > index 3022918bf96a..cfdcca95594f 100644 > --- a/fs/xfs/xfs_inode.c > +++ b/fs/xfs/xfs_inode.c > @@ -447,7 +447,7 @@ xfs_lock_inumorder( > * lock more than one at a time, lockdep will report false positives saying we > * have violated locking orders. > */ > -static void > +void > xfs_lock_inodes( > struct xfs_inode **ips, > int inodes, > diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h > index 4d626f4321bc..bc06d6e4164a 100644 > --- a/fs/xfs/xfs_inode.h > +++ b/fs/xfs/xfs_inode.h > @@ -573,5 +573,6 @@ void xfs_end_io(struct work_struct *work); > > int xfs_ilock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode *ip2); > void xfs_iunlock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode *ip2); > +void xfs_lock_inodes(struct xfs_inode **ips, int inodes, uint lock_mode); > > #endif /* __XFS_INODE_H__ */ > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 2022-08-09 16:38 ` Darrick J. Wong @ 2022-08-10 3:07 ` Alli 0 siblings, 0 replies; 4+ messages in thread From: Alli @ 2022-08-10 3:07 UTC (permalink / raw) To: Darrick J. Wong; +Cc: linux-xfs On Tue, 2022-08-09 at 09:38 -0700, Darrick J. Wong wrote: > On Thu, Aug 04, 2022 at 12:39:57PM -0700, Allison Henderson wrote: > > Renames that generate parent pointer updates can join up to 5 > > inodes locked in sorted order. So we need to increase the > > number of defer ops inodes and relock them in the same way. > > > > Signed-off-by: Allison Henderson <allison.henderson@oracle.com> > > --- > > fs/xfs/libxfs/xfs_defer.c | 28 ++++++++++++++++++++++++++-- > > fs/xfs/libxfs/xfs_defer.h | 8 +++++++- > > fs/xfs/xfs_inode.c | 2 +- > > fs/xfs/xfs_inode.h | 1 + > > 4 files changed, 35 insertions(+), 4 deletions(-) > > > > diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c > > index 5a321b783398..c0279b57e51d 100644 > > --- a/fs/xfs/libxfs/xfs_defer.c > > +++ b/fs/xfs/libxfs/xfs_defer.c > > @@ -820,13 +820,37 @@ xfs_defer_ops_continue( > > struct xfs_trans *tp, > > struct xfs_defer_resources *dres) > > { > > - unsigned int i; > > + unsigned int i, j; > > + struct xfs_inode *sips[XFS_DEFER_OPS_NR_INODES]; > > + struct xfs_inode *temp; > > > > ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); > > ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); > > > > /* Lock the captured resources to the new transaction. */ > > - if (dfc->dfc_held.dr_inos == 2) > > + if (dfc->dfc_held.dr_inos > 2) { > > + /* > > + * Renames with parent pointer updates can lock up to 5 > > inodes, > > + * sorted by their inode number. So we need to make > > sure they > > + * are relocked in the same way. > > + */ > > + memset(sips, 0, sizeof(sips)); > > + for (i = 0; i < dfc->dfc_held.dr_inos; i++) > > + sips[i] = dfc->dfc_held.dr_ip[i]; > > + > > + /* Bubble sort of at most 5 inodes */ > > + for (i = 0; i < dfc->dfc_held.dr_inos; i++) { > > + for (j = 1; j < dfc->dfc_held.dr_inos; j++) { > > + if (sips[j]->i_ino < sips[j-1]->i_ino) > > { > > + temp = sips[j]; > > + sips[j] = sips[j-1]; > > + sips[j-1] = temp; > > + } > > + } > > + } > > Why not reuse xfs_sort_for_rename? Initially I had looked at doing that, but it would need some refactoring as it is not meant for an arbitrary number of inodes. Either some logic specific to rename would get pulled up, or we'd need another helper to repackage the parameters, but it's such a small bit of code, I'm not sure it saves much LOC either way. > > I also wonder if it's worth the trouble to replace the open-coded > bubblesort with a call to sort_r(), but TBH I suspect the cost of a > retpoline for the compare function isn't worth the overhead. Yeah, it would make sense if there was lot of other places we sorted inodes, but with only two callers it does seem like a bit much. I am fine with what ever method folks prefer tho. > > > + > > + xfs_lock_inodes(sips, dfc->dfc_held.dr_inos, > > XFS_ILOCK_EXCL); > > + } else if (dfc->dfc_held.dr_inos == 2) > > xfs_lock_two_inodes(dfc->dfc_held.dr_ip[0], > > XFS_ILOCK_EXCL, > > dfc->dfc_held.dr_ip[1], > > XFS_ILOCK_EXCL); > > else if (dfc->dfc_held.dr_inos == 1) > > diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h > > index 114a3a4930a3..3e4029d2ce41 100644 > > --- a/fs/xfs/libxfs/xfs_defer.h > > +++ b/fs/xfs/libxfs/xfs_defer.h > > @@ -70,7 +70,13 @@ extern const struct xfs_defer_op_type > > xfs_attr_defer_type; > > /* > > * Deferred operation item relogging limits. > > */ > > -#define XFS_DEFER_OPS_NR_INODES 2 /* join up to two inodes */ > > + > > +/* > > + * Rename w/ parent pointers can require up to 5 inodes with > > defered ops to > > + * be joined to the transaction: src_dp, target_dp, src_ip, > > target_ip, and wip. > > + * These inodes are locked in sorted order by their inode numbers > > Much inode. Thanks for recording this. Sure, thx for the reviews! Allison > > --D > > > + */ > > +#define XFS_DEFER_OPS_NR_INODES 5 > > #define XFS_DEFER_OPS_NR_BUFS 2 /* join up to two buffers > > */ > > > > /* Resources that must be held across a transaction roll. */ > > diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c > > index 3022918bf96a..cfdcca95594f 100644 > > --- a/fs/xfs/xfs_inode.c > > +++ b/fs/xfs/xfs_inode.c > > @@ -447,7 +447,7 @@ xfs_lock_inumorder( > > * lock more than one at a time, lockdep will report false > > positives saying we > > * have violated locking orders. > > */ > > -static void > > +void > > xfs_lock_inodes( > > struct xfs_inode **ips, > > int inodes, > > diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h > > index 4d626f4321bc..bc06d6e4164a 100644 > > --- a/fs/xfs/xfs_inode.h > > +++ b/fs/xfs/xfs_inode.h > > @@ -573,5 +573,6 @@ void xfs_end_io(struct work_struct *work); > > > > int xfs_ilock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode > > *ip2); > > void xfs_iunlock2_io_mmap(struct xfs_inode *ip1, struct xfs_inode > > *ip2); > > +void xfs_lock_inodes(struct xfs_inode **ips, int inodes, uint > > lock_mode); > > > > #endif /* __XFS_INODE_H__ */ > > -- > > 2.25.1 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-10 3:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-06 14:39 [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 kernel test robot -- strict thread matches above, loose matches on Subject: below -- 2022-08-04 19:39 [PATCH RESEND v2 00/18] Parent Pointers Allison Henderson 2022-08-04 19:39 ` [PATCH RESEND v2 02/18] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 Allison Henderson 2022-08-09 16:38 ` Darrick J. Wong 2022-08-10 3:07 ` Alli
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.