From: Pavel Reichl <preichl@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH v2 01/29] xfsprogs: Stop using platform_uuid_compare()
Date: Fri, 6 Aug 2021 23:22:50 +0200 [thread overview]
Message-ID: <20210806212318.440144-2-preichl@redhat.com> (raw)
In-Reply-To: <20210806212318.440144-1-preichl@redhat.com>
platform_uuid_compare() only calls uuid_compare() thus in should be
replaced by uuid_compare() deprecated and removed in the future.
---
copy/xfs_copy.c | 2 +-
db/sb.c | 2 +-
libxfs/libxfs_priv.h | 2 +-
libxlog/util.c | 2 +-
| 4 ++--
repair/attr_repair.c | 2 +-
repair/dinode.c | 6 +++---
repair/phase6.c | 2 +-
repair/scan.c | 4 ++--
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index fc7d225f..841ab7e4 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -15,7 +15,7 @@
#include "libfrog/platform.h"
#define rounddown(x, y) (((x)/(y))*(y))
-#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
+#define uuid_equal(s,d) (uuid_compare((*s),(*d)) == 0)
extern int platform_check_ismounted(char *, char *, struct stat *, int);
diff --git a/db/sb.c b/db/sb.c
index cec7dce9..7017e1e5 100644
--- a/db/sb.c
+++ b/db/sb.c
@@ -17,7 +17,7 @@
#include "output.h"
#include "init.h"
-#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
+#define uuid_equal(s,d) (uuid_compare((*s),(*d)) == 0)
static int sb_f(int argc, char **argv);
static void sb_help(void);
diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
index e37d5933..782bb006 100644
--- a/libxfs/libxfs_priv.h
+++ b/libxfs/libxfs_priv.h
@@ -505,7 +505,7 @@ static inline int retzero(void) { return 0; }
#define xfs_qm_dqattach(i) (0)
#define uuid_copy(s,d) platform_uuid_copy((s),(d))
-#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
+#define uuid_equal(s,d) (uuid_compare((*s),(*d)) == 0)
#define xfs_icreate_log(tp, agno, agbno, cnt, isize, len, gen) ((void) 0)
#define xfs_sb_validate_fsb_count(sbp, nblks) (0)
diff --git a/libxlog/util.c b/libxlog/util.c
index a85d70c9..b4dfeca0 100644
--- a/libxlog/util.c
+++ b/libxlog/util.c
@@ -76,7 +76,7 @@ header_check_uuid(xfs_mount_t *mp, xlog_rec_header_t *head)
if (print_skip_uuid)
return 0;
- if (!platform_uuid_compare(&mp->m_sb.sb_uuid, &head->h_fs_uuid))
+ if (!uuid_compare(mp->m_sb.sb_uuid, head->h_fs_uuid))
return 0;
platform_uuid_unparse(&mp->m_sb.sb_uuid, uu_sb);
--git a/repair/agheader.c b/repair/agheader.c
index 2af24106..1c4138e4 100644
--- a/repair/agheader.c
+++ b/repair/agheader.c
@@ -100,7 +100,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_t *agf, xfs_agnumber_t i)
if (!xfs_sb_version_hascrc(&mp->m_sb))
return retval;
- if (platform_uuid_compare(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid)) {
+ if (uuid_compare(agf->agf_uuid, mp->m_sb.sb_meta_uuid)) {
char uu[64];
retval = XR_AG_AGF;
@@ -179,7 +179,7 @@ verify_set_agi(xfs_mount_t *mp, xfs_agi_t *agi, xfs_agnumber_t agno)
if (!xfs_sb_version_hascrc(&mp->m_sb))
return retval;
- if (platform_uuid_compare(&agi->agi_uuid, &mp->m_sb.sb_meta_uuid)) {
+ if (uuid_compare(agi->agi_uuid, mp->m_sb.sb_meta_uuid)) {
char uu[64];
retval = XR_AG_AGI;
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index bc3c2bef..25bdff73 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -947,7 +947,7 @@ _("expected block %" PRIu64 ", got %llu, inode %" PRIu64 "attr block\n"),
return 1;
}
/* verify uuid */
- if (platform_uuid_compare(&info->uuid, &mp->m_sb.sb_meta_uuid) != 0) {
+ if (uuid_compare(info->uuid, mp->m_sb.sb_meta_uuid) != 0) {
do_warn(
_("wrong FS UUID, inode %" PRIu64 " attr block %" PRIu64 "\n"),
ino, bp->b_bn);
diff --git a/repair/dinode.c b/repair/dinode.c
index 291c5807..a6156830 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -1098,7 +1098,7 @@ null_check(char *name, int length)
* This does /not/ do quotacheck, it validates the basic quota
* inode metadata, checksums, etc.
*/
-#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
+#define uuid_equal(s,d) (uuid_compare((*s),(*d)) == 0)
static int
process_quota_inode(
struct xfs_mount *mp,
@@ -2329,8 +2329,8 @@ _("inode identifier %llu mismatch on inode %" PRIu64 "\n"),
return 1;
goto clear_bad_out;
}
- if (platform_uuid_compare(&dino->di_uuid,
- &mp->m_sb.sb_meta_uuid)) {
+ if (uuid_compare(dino->di_uuid,
+ mp->m_sb.sb_meta_uuid)) {
if (!uncertain)
do_warn(
_("UUID mismatch on inode %" PRIu64 "\n"), lino);
diff --git a/repair/phase6.c b/repair/phase6.c
index 6bddfefa..05e6a321 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -1886,7 +1886,7 @@ _("expected block %" PRIu64 ", got %llu, directory inode %" PRIu64 "\n"),
return 1;
}
/* verify uuid */
- if (platform_uuid_compare(uuid, &mp->m_sb.sb_meta_uuid) != 0) {
+ if (uuid_compare(*uuid, mp->m_sb.sb_meta_uuid) != 0) {
do_warn(
_("wrong FS UUID, directory inode %" PRIu64 " block %" PRIu64 "\n"),
ino, bp->b_bn);
diff --git a/repair/scan.c b/repair/scan.c
index 2c25af57..361c3b3c 100644
--- a/repair/scan.c
+++ b/repair/scan.c
@@ -268,8 +268,8 @@ _("expected block %" PRIu64 ", got %llu, bmbt block %" PRIu64 "\n"),
return 1;
}
/* verify uuid */
- if (platform_uuid_compare(&block->bb_u.l.bb_uuid,
- &mp->m_sb.sb_meta_uuid) != 0) {
+ if (uuid_compare(block->bb_u.l.bb_uuid,
+ mp->m_sb.sb_meta_uuid) != 0) {
do_warn(
_("wrong FS UUID, bmbt block %" PRIu64 "\n"),
bno);
--
2.31.1
next prev parent reply other threads:[~2021-08-06 21:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 21:22 [PATCH v2 00/29] xfsprogs: Drop the 'platform_' prefix Pavel Reichl
2021-08-06 21:22 ` Pavel Reichl [this message]
2021-08-06 21:22 ` [PATCH v2 02/29] xfsprogs: Stop using platform_test_xfs_fd() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 03/29] xfsprogs: Stop using platform_test_xfs_path() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 04/29] xfsprogs: Stop using platform_fstatfs() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 05/29] xfsprogs: Stop using platform_getoptreset() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 06/29] xfsprogs: Stop using platform_uuid_copy() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 07/29] xfsprogs: Stop using platform_uuid_generate() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 08/29] xfsprogs: Stop using platform_uuid_unparse() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 09/29] xfsprogs: Stop using platform_uuid_clear() Pavel Reichl
2021-08-06 21:22 ` [PATCH v2 10/29] xfsprogs: Stop using platform_uuid_parse() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 11/29] xfsprogs: Stop using platform_uuid_is_null() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 12/29] xfsprogs: Stop using platform_check_mount() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 13/29] xfsprogs: Stop using platform_check_ismounted() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 14/29] xfsprogs: Stop using platform_flush_device() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 15/29] xfsprogs: Stop using platform_mntent_open() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 16/29] xfsprogs: Stop using platform_mntent_next() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 17/29] xfsprogs: Stop using platform_mntent_close() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 18/29] xfsprogs: Stop using platform_findsizes() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 19/29] xfsprogs: Stop using platform_discard_blocks Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 20/29] xfsprogs: Stop using platform_zero_range() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 21/29] xfsprogs: Stop using platform_crash() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 22/29] xfsprogs: Stop using platform_nproc() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 23/29] xfsprogs: Stop using platform_check_iswritable() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 24/29] xfsprogs: Stop using platform_set_blocksize() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 25/29] xfsprogs: Stop using platform_findrawpath() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 26/29] xfsprogs: Stop using platform_findblockpath() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 27/29] xfsprogs: Stop using platform_direct_blockdev() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 28/29] xfsprogs: Stop using platform_align_blockdev() Pavel Reichl
2021-08-06 21:23 ` [PATCH v2 29/29] xfsprogs: Stop using platform_physmem() Pavel Reichl
2021-08-06 23:05 ` [PATCH v2 00/29] xfsprogs: Drop the 'platform_' prefix Dave Chinner
2021-08-07 15:13 ` Pavel Reichl
2021-08-07 21:46 ` Dave Chinner
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=20210806212318.440144-2-preichl@redhat.com \
--to=preichl@redhat.com \
--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