From: Bill O'Donnell <billodo@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 05/10] libxfs: drop the ifork_ops parameter from _inode_verify_forks
Date: Mon, 22 Apr 2019 14:43:09 -0500 [thread overview]
Message-ID: <20190422194309.GA30508@redhat.com> (raw)
In-Reply-To: <155594792189.115924.17675145707430115266.stgit@magnolia>
On Mon, Apr 22, 2019 at 08:45:21AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Now that the inode remembers its own ifork_ops, we can drop the second
> parameter from libxfs_inode_verify_forks.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> ---
> include/xfs_inode.h | 3 +--
> libxfs/rdwr.c | 11 +++++------
> libxfs/util.c | 2 +-
> 3 files changed, 7 insertions(+), 9 deletions(-)
>
>
> diff --git a/include/xfs_inode.h b/include/xfs_inode.h
> index e1e8b430..52d79f3c 100644
> --- a/include/xfs_inode.h
> +++ b/include/xfs_inode.h
> @@ -151,8 +151,7 @@ extern void libxfs_trans_ichgtime(struct xfs_trans *,
> extern int libxfs_iflush_int (struct xfs_inode *, struct xfs_buf *);
>
> /* Inode Cache Interfaces */
> -extern bool libxfs_inode_verify_forks(struct xfs_inode *ip,
> - struct xfs_ifork_ops *);
> +extern bool libxfs_inode_verify_forks(struct xfs_inode *ip);
> extern int libxfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
> uint, struct xfs_inode **,
> struct xfs_ifork_ops *);
> diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
> index 69d5abb2..bc2ed38c 100644
> --- a/libxfs/rdwr.c
> +++ b/libxfs/rdwr.c
> @@ -1338,16 +1338,15 @@ extern kmem_zone_t *xfs_ili_zone;
> */
> bool
> libxfs_inode_verify_forks(
> - struct xfs_inode *ip,
> - struct xfs_ifork_ops *ops)
> + struct xfs_inode *ip)
> {
> struct xfs_ifork *ifp;
> xfs_failaddr_t fa;
>
> - if (!ops)
> + if (!ip->i_fork_ops)
> return true;
>
> - fa = xfs_ifork_verify_data(ip, ops);
> + fa = xfs_ifork_verify_data(ip, ip->i_fork_ops);
> if (fa) {
> ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);
> xfs_inode_verifier_error(ip, -EFSCORRUPTED, "data fork",
> @@ -1355,7 +1354,7 @@ libxfs_inode_verify_forks(
> return false;
> }
>
> - fa = xfs_ifork_verify_attr(ip, ops);
> + fa = xfs_ifork_verify_attr(ip, ip->i_fork_ops);
> if (fa) {
> ifp = XFS_IFORK_PTR(ip, XFS_ATTR_FORK);
> xfs_inode_verifier_error(ip, -EFSCORRUPTED, "attr fork",
> @@ -1392,7 +1391,7 @@ libxfs_iget(
> }
>
> ip->i_fork_ops = ifork_ops;
> - if (!libxfs_inode_verify_forks(ip, ifork_ops)) {
> + if (!libxfs_inode_verify_forks(ip)) {
> libxfs_irele(ip);
> return -EFSCORRUPTED;
> }
> diff --git a/libxfs/util.c b/libxfs/util.c
> index 2e3b9d51..ea75fa20 100644
> --- a/libxfs/util.c
> +++ b/libxfs/util.c
> @@ -422,7 +422,7 @@ libxfs_iflush_int(xfs_inode_t *ip, xfs_buf_t *bp)
> VFS_I(ip)->i_version++;
>
> /* Check the inline fork data before we write out. */
> - if (!libxfs_inode_verify_forks(ip, ip->i_fork_ops))
> + if (!libxfs_inode_verify_forks(ip))
> return -EFSCORRUPTED;
>
> /*
>
next prev parent reply other threads:[~2019-04-22 19:43 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 15:44 [PATCH v3 00/10] xfsprogs-5.0: fix various problems Darrick J. Wong
2019-04-22 15:44 ` [PATCH 01/10] scrub: fix Makefile targets which depend on builddefs Darrick J. Wong
2019-04-22 18:27 ` Eric Sandeen
2019-04-22 18:28 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 02/10] xfs_info: use findmnt to handle mounted block devices Darrick J. Wong
2019-04-22 18:35 ` Eric Sandeen
2019-04-22 19:27 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 03/10] xfs_repair: correctly account for free space btree shrinks when fixing freelist Darrick J. Wong
2019-04-22 19:24 ` Eric Sandeen
2019-04-22 19:36 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 04/10] libxfs: retain ifork_ops when flushing inode Darrick J. Wong
2019-04-22 19:40 ` Bill O'Donnell
2019-04-22 19:45 ` Eric Sandeen
2019-10-02 6:00 ` Arkadiusz Miśkiewicz
2019-04-22 15:45 ` [PATCH 05/10] libxfs: drop the ifork_ops parameter from _inode_verify_forks Darrick J. Wong
2019-04-22 19:43 ` Bill O'Donnell [this message]
2019-04-22 20:49 ` Eric Sandeen
2019-04-22 15:45 ` [PATCH 06/10] misc: fix strncpy length complaints Darrick J. Wong
2019-04-22 20:48 ` Eric Sandeen
2019-04-22 20:57 ` Darrick J. Wong
2019-04-22 21:04 ` Eric Sandeen
2019-04-22 21:07 ` Eric Sandeen
2019-04-23 15:07 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 07/10] libxfs: refactor buffer item release code Darrick J. Wong
2019-04-22 21:26 ` Eric Sandeen
2019-04-22 21:35 ` Darrick J. Wong
2019-04-22 21:40 ` Eric Sandeen
2019-04-23 20:51 ` [PATCH v2 " Darrick J. Wong
2019-04-23 20:56 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 08/10] libxfs: don't touch buffer log item pointer when flushing inode log item Darrick J. Wong
2019-04-23 17:56 ` Eric Sandeen
2019-04-23 20:52 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 09/10] libxfs: fix buffer log item lifetime weirdness Darrick J. Wong
2019-04-23 21:15 ` Bill O'Donnell
2019-04-22 15:45 ` [PATCH 10/10] libxfs: shorten inode item lifetime Darrick J. Wong
2019-04-23 21:22 ` Bill O'Donnell
2019-04-23 21:04 ` [PATCH 11/10] libfrog: fix memory leak in bitmap_free Darrick J. Wong
2019-04-23 21:23 ` Bill O'Donnell
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=20190422194309.GA30508@redhat.com \
--to=billodo@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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 NNTP newsgroup(s).