From: Fedor Pchelkin <pchelkin@ispras.ru>
To: Carlos Maiolino <cem@kernel.org>, "Darrick J. Wong" <djwong@kernel.org>
Cc: Fedor Pchelkin <pchelkin@ispras.ru>,
Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: [PATCH v2 0/6] xfs: cleanup key comparing routines
Date: Wed, 2 Jul 2025 12:39:27 +0300 [thread overview]
Message-ID: <20250702093935.123798-1-pchelkin@ispras.ru> (raw)
Key comparing routines are currently opencoded with extra casts and
subtractions which is error prone and can be replaced with a neat
cmp_int() helper which is now in a generic header file.
Started from:
https://lore.kernel.org/linux-xfs/20250426134232.128864-1-pchelkin@ispras.ru/T/#u
Thanks Darrick for suggestion!
v1: https://lore.kernel.org/linux-xfs/20250612102455.63024-1-pchelkin@ispras.ru/T/#u
v2: tune 6/6 patch to rename the "diff_two_ptrs" part
Fedor Pchelkin (6):
xfs: rename diff_two_keys routines
xfs: rename key_diff routines
xfs: refactor cmp_two_keys routines to take advantage of cmp_int()
xfs: refactor cmp_key_with_cur routines to take advantage of cmp_int()
xfs: use a proper variable name and type for storing a comparison
result
xfs: refactor xfs_btree_diff_two_ptrs() to take advantage of cmp_int()
fs/xfs/libxfs/xfs_alloc_btree.c | 52 +++++++++------------
fs/xfs/libxfs/xfs_bmap_btree.c | 32 +++++--------
fs/xfs/libxfs/xfs_btree.c | 33 +++++++-------
fs/xfs/libxfs/xfs_btree.h | 41 +++++++++--------
fs/xfs/libxfs/xfs_ialloc_btree.c | 24 +++++-----
fs/xfs/libxfs/xfs_refcount_btree.c | 18 ++++----
fs/xfs/libxfs/xfs_rmap_btree.c | 67 ++++++++++------------------
fs/xfs/libxfs/xfs_rtrefcount_btree.c | 18 ++++----
fs/xfs/libxfs/xfs_rtrmap_btree.c | 67 ++++++++++------------------
fs/xfs/scrub/btree.c | 2 +-
fs/xfs/scrub/rcbag_btree.c | 38 +++++-----------
11 files changed, 158 insertions(+), 234 deletions(-)
--
2.50.0
next reply other threads:[~2025-07-02 9:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 9:39 Fedor Pchelkin [this message]
2025-07-02 9:39 ` [PATCH v2 1/6] xfs: rename diff_two_keys routines Fedor Pchelkin
2025-07-02 9:39 ` [PATCH v2 2/6] xfs: rename key_diff routines Fedor Pchelkin
2025-07-02 9:39 ` [PATCH v2 3/6] xfs: refactor cmp_two_keys routines to take advantage of cmp_int() Fedor Pchelkin
2025-07-02 9:39 ` [PATCH v2 4/6] xfs: refactor cmp_key_with_cur " Fedor Pchelkin
2025-07-02 9:39 ` [PATCH v2 5/6] xfs: use a proper variable name and type for storing a comparison result Fedor Pchelkin
2025-07-02 9:39 ` [PATCH v2 6/6] xfs: refactor xfs_btree_diff_two_ptrs() to take advantage of cmp_int() Fedor Pchelkin
2025-07-02 14:43 ` Darrick J. Wong
2025-07-08 12:00 ` [PATCH v2 0/6] xfs: cleanup key comparing routines Carlos Maiolino
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=20250702093935.123798-1-pchelkin@ispras.ru \
--to=pchelkin@ispras.ru \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=lvc-project@linuxtesting.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
all inboxes | Powered by JetHome®