Linux-XFS Archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chandan Babu R <chandan.babu@oracle.com>,
	"Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: add higher level directory operations helpers
Date: Thu, 25 Apr 2024 15:16:58 +0200	[thread overview]
Message-ID: <20240425131703.928936-1-hch@lst.de> (raw)

Hi all,

with the scrub and online repair code we now duplicate the switching
between the directory format for directory operations in at least two
places for each operation, with the metadir code adding even more for
some of these operations.

This series adds _args helpers to consolidate this code, and then
refactors the checking for the directory format into a single well-defined
helper.

It is based on the online repair patchbombs that Darrick submitted
yesterday.

Diffstat:
 libxfs/xfs_dir2.c     |  274 +++++++++++++++++++++++---------------------------
 libxfs/xfs_dir2.h     |   17 ++-
 libxfs/xfs_exchmaps.c |    9 -
 scrub/dir.c           |    3 
 scrub/dir_repair.c    |   58 ----------
 scrub/readdir.c       |   59 +---------
 xfs_dir2_readdir.c    |   19 +--
 7 files changed, 168 insertions(+), 271 deletions(-)

             reply	other threads:[~2024-04-25 13:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 13:16 Christoph Hellwig [this message]
2024-04-25 13:16 ` [PATCH 1/5] xfs: factor out a xfs_dir_lookup_args helper Christoph Hellwig
2024-04-25 13:17 ` [PATCH 2/5] xfs: factor out a xfs_dir_createname_args helper Christoph Hellwig
2024-04-25 13:17 ` [PATCH 3/5] xfs: factor out a xfs_dir_removename_args helper Christoph Hellwig
2024-04-25 13:17 ` [PATCH 4/5] xfs: factor out a xfs_dir_replace_args helper Christoph Hellwig
2024-04-25 13:17 ` [PATCH 5/5] xfs: refactor dir format helpers Christoph Hellwig
2024-04-25 21:22 ` add higher level directory operations helpers Darrick J. Wong

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=20240425131703.928936-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=chandan.babu@oracle.com \
    --cc=djwong@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).