public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs_repair: stop using ->data_entry_p()
Date: Tue, 21 Jan 2020 10:37:06 -0800	[thread overview]
Message-ID: <20200121183706.GQ8257@magnolia> (raw)
In-Reply-To: <57ab702d-0a66-8323-5e87-08aa315cf9c7@redhat.com>

On Mon, Jan 20, 2020 at 08:29:17AM -0600, Eric Sandeen wrote:
> On 1/17/20 10:39 PM, Darrick J. Wong wrote:
> > On Fri, Jan 17, 2020 at 05:17:11PM -0600, Eric Sandeen wrote:
> >> The ->data_entry_p() op went away in v5.5 kernelspace, so rework
> >> xfs_repair to use ->data_entry_offset instead, in preparation
> >> for the v5.5 libxfs backport.
> >>
> >> This could later be cleaned up to use offsets as was done
> >> in kernel commit 8073af5153c for example.
> > 
> > See, now that you've said that, I start wondering why not do that?
> 
> Because this is the fast/safe path to getting the libxfs merge done IMHO ;)
> 
> ...
> 
> 
> >> @@ -1834,7 +1834,7 @@ longform_dir2_entry_check_data(
> >>  			       (dep->name[0] == '.' && dep->namelen == 1));
> >>  			add_inode_ref(current_irec, current_ino_offset);
> >>  			if (da_bno != 0 ||
> >> -			    dep != M_DIROPS(mp)->data_entry_p(d)) {
> >> +			    dep != (void *)d + M_DIROPS(mp)->data_entry_offset) {
> > 
> > Er.... void pointer arithmetic?
> 
> er, let me take another look at that.

fmeh, we apparently allow this gcc extension in the kernel so I guess
it's fine for xfsprogs :P

--D

> -eric
> 
> 

  reply	other threads:[~2020-01-21 18:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 23:17 [PATCH] xfs_repair: stop using ->data_entry_p() Eric Sandeen
2020-01-18  4:39 ` Darrick J. Wong
2020-01-20 14:29   ` Eric Sandeen
2020-01-21 18:37     ` Darrick J. Wong [this message]
2020-01-22  0:41       ` Darrick J. Wong
2020-01-20  8:58 ` Christoph Hellwig

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=20200121183706.GQ8257@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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