From: Bill O'Donnell <billodo@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: cmaiolino@redhat.com
Subject: Re: [PATCH v2] xfs_db: update sector size when type is set
Date: Fri, 23 Jun 2017 05:26:58 -0500 [thread overview]
Message-ID: <20170623102658.GA31188@redhat.com> (raw)
In-Reply-To: <20170623101602.6cmzx4os45nktgzj@eorzea.usersys.redhat.com>
On Fri, Jun 23, 2017 at 12:16:02PM +0200, Carlos Maiolino wrote:
> Hey Bill,
>
> > diff --git a/db/io.c b/db/io.c
> > index 9918a51..792cc0a 100644
> > --- a/db/io.c
> > +++ b/db/io.c
> > @@ -615,7 +615,13 @@ set_iocur_type(
> > const typ_t *t)
> > {
> > struct xfs_buf *bp = iocur_top->bp;
> > + int bb_count;
> >
> > + /* adjust cursor for types that contain fields */
> > + if (t->fields) {
> > + bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0)));
>
> Doesn't byteize() requires:
>
> #include "bit.h"
>
> ?
Gah! Yes it's required. I had it on my test box, but missed it
in my v2 submit. I'll fix it.
Thanks!
Bill
>
> I can't build xfsprogs with this patch without including bit.h
>
> In file included from ../include/xfs.h:68:0,
> from ../include/libxfs.h:24,
> from io.c:19:
> io.c: In function ‘set_iocur_type’:
> io.c:600:20: warning: implicit declaration of function ‘byteize’
> [-Wimplicit-function-declaration]
> bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0)));
> ^
>
>
> Although, after including it, the patch works fine, fixes the problem with
> different sector sizes.
>
> After fixing the include above, you can add:
>
> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
>
>
> Cheers
>
>
> > + set_cur(t, iocur_top->bb, bb_count, DB_RING_IGN, NULL);
> > + }
> > iocur_top->typ = t;
> >
> > /* verify the buffer if the type has one. */
> > --
> > 2.9.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> Carlos
next prev parent reply other threads:[~2017-06-23 10:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 19:33 [PATCH] xfs_db: update sector size when type is set Bill O'Donnell
2017-06-22 19:47 ` Darrick J. Wong
2017-06-22 20:16 ` Eric Sandeen
2017-06-22 20:31 ` Bill O'Donnell
2017-06-22 20:34 ` Bill O'Donnell
2017-06-22 20:23 ` Bill O'Donnell
2017-06-22 20:39 ` Darrick J. Wong
2017-06-22 20:46 ` Bill O'Donnell
2017-06-22 23:45 ` [PATCH v2] " Bill O'Donnell
2017-06-23 10:16 ` Carlos Maiolino
2017-06-23 10:26 ` Bill O'Donnell [this message]
2017-06-23 10:34 ` [PATCH v3] " Bill O'Donnell
2017-06-23 11:03 ` Carlos Maiolino
2017-06-26 15:25 ` Darrick J. Wong
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=20170623102658.GA31188@redhat.com \
--to=billodo@redhat.com \
--cc=cmaiolino@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;
as well as URLs for NNTP newsgroup(s).