mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Steven Whitehouse <swhiteho@redhat.com>
Cc: linux-kernel@vger.kernel.org, cluster-devel@redhat.com
Subject: Re: [PATCH 1/3] bitops: Add __ffs64 bitop
Date: Mon, 27 Apr 2009 12:31:17 -0400	[thread overview]
Message-ID: <49834.1240849877@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 27 Apr 2009 16:41:06 BST." <1240846866.29604.122.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

On Mon, 27 Apr 2009 16:41:06 BST, Steven Whitehouse said:
> The intent was that it would operate on native endian u64 words so that
> it shouldn't be affected by the endianess.

Hmm.. it's passing a 64-bit by value, not by a pointer ref - a subtle
distinction - if that code had done   *(u32)word instead it would break
on some archs.  That will teach me to read code when not caffeinated enough.

(I also admit that often I post comments on the basis of "If I can misread
this, so can some other poor decaffienated Joe Programmer on a Monday morning" ;)

>                                            In the GFS2 code where it is
> used, the byte ordering is converted to native order before this
> function is applied,

Is that a reasonable expectation when other parts of the kernel start
using it?  We've seen bugs before when 32-bit code tries to deal with
a 64-bit or bigger bitfield as a pair or series of 32-bit fields...

- * @word: The 64 bit word
+ * @word: The 64 bit word - must be in native byte order

probably is enough for those who bother finding the function def/doc. And
the ones who don't bother, we can't help anyhow. ;)


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

      reply	other threads:[~2009-04-27 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23  9:16 GFS2: Block alloc fixes Steven Whitehouse
2009-04-23  9:16 ` [PATCH 1/3] bitops: Add __ffs64 bitop Steven Whitehouse
2009-04-23  9:16   ` [PATCH 2/3] GFS2: Fix bug in block allocation Steven Whitehouse
2009-04-23  9:16     ` [PATCH 3/3] GFS2: Ensure that the inode goal block settings are updated Steven Whitehouse
2009-04-27 13:40   ` [PATCH 1/3] bitops: Add __ffs64 bitop Valdis.Kletnieks
2009-04-27 15:41     ` Steven Whitehouse
2009-04-27 16:31       ` Valdis.Kletnieks [this message]

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=49834.1240849877@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=cluster-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@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

all inboxes | Powered by JetHome®