cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings
Date: Fri, 11 Sep 2015 11:45:14 +0100	[thread overview]
Message-ID: <55F2B0BA.3090109@redhat.com> (raw)
In-Reply-To: <CAHc6FU6rne1uDXDF-sEmoCLVYF3=zroFXK37DQm7=D1sOxGGVQ@mail.gmail.com>

On 10/09/15 23:04, Andreas Gruenbacher wrote:
> 2015-09-09 18:27 GMT+02:00 Andrew Price <anprice@redhat.com>:
>> It would be better to use %u for an unsigned int. We don't have
>> __attribute__((format(printf...))) on print_gfs2 yet but it would catch
>> that.
>
> I've tried adding the printf format attribute; it's quite a mess. A
> common pattern is that values are not printed with the proper
> signedness. The fact that the code is messing around with __be64
> variables which have been converted to cpu endianness, and that __be64
> and uint64_t need different printf formats ("%llu" and "%"PRIu64) to
> pacify gcc doesn't help.

Yes, I think ideally we should have a set of userspace structures to 
keep things separate. None of the applications should need to use the 
__be* kernel types and libgfs2 should only use them minimally, if at 
all. I'm not sure whether it's best to do that automatically using 
preprocessor magic on the kernel headers, or just by adding new types to 
gfs2-utils with the intention of keeping them in sync manually, or some 
other way.

Andy



  parent reply	other threads:[~2015-09-11 10:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 15:55 [Cluster-devel] [PATCH 1/2] libgfs2: Add support for dirent.de_rahead Andreas Gruenbacher
2015-09-09 15:55 ` [Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings Andreas Gruenbacher
2015-09-09 16:27   ` Andrew Price
2015-09-10 11:07     ` Andrew Price
2015-09-10 12:51       ` Andreas Grünbacher
2015-09-10 22:04     ` Andreas Gruenbacher
2015-09-10 22:05       ` [Cluster-devel] [PATCH 1/2] gfs2: Fix printf format errors on x86 Andreas Gruenbacher
2015-09-10 22:05         ` [Cluster-devel] [PATCH 2/2] gfs2_edit: Add attribute printf for print_gfs2 Andreas Gruenbacher
2015-09-11 10:45           ` Andrew Price
2015-09-11 10:45       ` Andrew Price [this message]
2015-09-11 11:02         ` [Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings Andreas Gruenbacher
2015-09-11 11:28           ` [Cluster-devel] gfs2 on-disk headers in user space Andrew Price
2015-09-11 11:40             ` Andreas Grünbacher
2015-09-11 11:57               ` Andrew Price

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=55F2B0BA.3090109@redhat.com \
    --to=anprice@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;
as well as URLs for NNTP newsgroup(s).