From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Cc: "Gustavo A . R . Silva" <gustavoars@kernel.org>
Subject: [PATCH 4/7] xfs: pass a xfs_efd_log_item to xfs_efd_item_sizeof
Date: Mon, 19 Apr 2021 10:28:01 +0200 [thread overview]
Message-ID: <20210419082804.2076124-5-hch@lst.de> (raw)
In-Reply-To: <20210419082804.2076124-1-hch@lst.de>
xfs_efd_log_item only looks at the embedded xfs_efd_log_item structure,
so pass that directly and rename the function to xfs_efd_log_item_sizeof.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_extfree_item.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index 7ae570d1944590..f15d6cfca6e2f1 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -195,11 +195,11 @@ xfs_efd_item_free(struct xfs_efd_log_item *efdp)
* structure.
*/
static inline int
-xfs_efd_item_sizeof(
- struct xfs_efd_log_item *efdp)
+xfs_efd_log_item_sizeof(
+ struct xfs_efd_log_format *elf)
{
return sizeof(struct xfs_efd_log_format) +
- (efdp->efd_format.efd_nextents - 1) * sizeof(struct xfs_extent);
+ (elf->efd_nextents - 1) * sizeof(struct xfs_extent);
}
STATIC void
@@ -209,7 +209,7 @@ xfs_efd_item_size(
int *nbytes)
{
*nvecs += 1;
- *nbytes += xfs_efd_item_sizeof(EFD_ITEM(lip));
+ *nbytes += xfs_efd_log_item_sizeof(&EFD_ITEM(lip)->efd_format);
}
/*
@@ -234,7 +234,7 @@ xfs_efd_item_format(
xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_EFD_FORMAT,
&efdp->efd_format,
- xfs_efd_item_sizeof(efdp));
+ xfs_efd_log_item_sizeof(&efdp->efd_format));
}
/*
--
2.30.1
next prev parent reply other threads:[~2021-04-19 8:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 8:27 cleanup the EFI/EFD definitions Christoph Hellwig
2021-04-19 8:27 ` [PATCH 1/7] xfs: remove the EFD size asserts in xlog_recover_efd_commit_pass2 Christoph Hellwig
2021-04-20 16:26 ` Darrick J. Wong
2021-04-19 8:27 ` [PATCH 2/7] xfs: clean up the EFI and EFD log format handling Christoph Hellwig
2021-04-20 17:05 ` Darrick J. Wong
2021-04-21 5:55 ` Christoph Hellwig
2021-04-22 0:19 ` Darrick J. Wong
2021-04-19 8:28 ` [PATCH 3/7] xfs: pass a xfs_efi_log_item to xfs_efi_item_sizeof Christoph Hellwig
2021-04-20 17:09 ` Darrick J. Wong
2021-04-21 5:56 ` Christoph Hellwig
2021-04-22 0:29 ` Darrick J. Wong
2021-04-19 8:28 ` Christoph Hellwig [this message]
2021-04-20 17:10 ` [PATCH 4/7] xfs: pass a xfs_efd_log_item to xfs_efd_item_sizeof Darrick J. Wong
2021-04-19 8:28 ` [PATCH 5/7] xfs: add a xfs_efi_item_sizeof helper Christoph Hellwig
2021-04-20 17:11 ` Darrick J. Wong
2021-04-19 8:28 ` [PATCH 6/7] xfs: add a xfs_efd_item_sizeof helper Christoph Hellwig
2021-04-20 17:12 ` Darrick J. Wong
2021-04-19 8:28 ` [PATCH 7/7] xfs: Replace one-element arrays with flexible-array members Christoph Hellwig
2021-04-20 17:15 ` Darrick J. Wong
2021-04-20 22:16 ` Gustavo A. R. Silva
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=20210419082804.2076124-5-hch@lst.de \
--to=hch@lst.de \
--cc=gustavoars@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