From: Gao Xiang <hsiangkao@redhat.com>
To: Zorro Lang <zlang@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs_db: use correct inode to set inode type
Date: Thu, 13 Aug 2020 23:28:17 +0800 [thread overview]
Message-ID: <20200813152817.GA32687@xiangao.remote.csb> (raw)
In-Reply-To: <20200813152905.GP2937@dhcp-12-102.nay.redhat.com>
On Thu, Aug 13, 2020 at 11:29:05PM +0800, Zorro Lang wrote:
...
> > > ino = XFS_AGINO_TO_INO(mp, xfs_daddr_to_agno(mp, b),
> > > - ((b << BBSHIFT) >> mp->m_sb.sb_inodelog) %
> > > + (((b << BBSHIFT) + bo) >> mp->m_sb.sb_inodelog) %
> > > XFS_AGB_TO_AGINO(mp, mp->m_sb.sb_agblocks));
> > > set_cur_inode(ino);
> > > return;
> >
> > Not familar with such code, but after looking into a bit, (my premature
> > thought is that) I'm wondering if we need to reverify original buffer in
> >
> > if (type->fields) {
> > ...
> > set_cur()
> > }
> >
> > iocur_top->typ = type;
> >
> > /* verify the buffer if the type has one. */
> > ...
> >
> > since set_cur() already verified the buffer in
> > set_cur->libxfs_buf_read->...->libxfs_readbuf_verify?
> >
> > Not related to this patchset but I'm a bit curious about it now...
>
> I'm not the one who learn about xfsprogs best:) But by looking into
> set_cur_inode() -> set_cur(), I think the set_cur() does the xfs_buf
> verification, so I don't think we need to do that again at the end
> of set_iocur_type().
Nope, I wasn't saying we need to add anything after set_cur_inode().
but commit 55f224baf83d ("xfs_db: update buffer size when new type is set")
In detail, I think it might be
if (type->fields) {
...
set_cur()
return; <- here
}
iocur_top->typ = type;
/* verify the buffer if the type has one. */
...
Thanks,
Gao Xiang
>
> Thanks,
> Zorro
>
> >
> > Thanks,
> > Gao Xiang
> >
> > > --
> > > 2.20.1
> > >
> >
>
next prev parent reply other threads:[~2020-08-13 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 6:03 [PATCH] xfs_db: use correct inode to set inode type Zorro Lang
2020-08-13 13:53 ` Gao Xiang
2020-08-13 15:29 ` Zorro Lang
2020-08-13 15:28 ` Gao Xiang [this message]
2020-08-13 17:37 ` Eric Sandeen
2020-08-13 14:56 ` Darrick J. Wong
2020-08-13 15:36 ` Zorro Lang
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=20200813152817.GA32687@xiangao.remote.csb \
--to=hsiangkao@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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