All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: 7eggert@gmx.de
Cc: Fengguang Wu <wfg@mail.ustc.edu.cn>,
	Andrew Morton <akpm@osdl.org>, Martin Peschke <mp3@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/8] readahead: state based method routines: explicitly embed class_new/class_old inside flags
Date: Sun, 28 Jan 2007 11:11:04 -0800	[thread overview]
Message-ID: <20070128111104.789cbd07.randy.dunlap@oracle.com> (raw)
In-Reply-To: <E1HAmF2-0000cV-Ux@be1.lrz>

On Sat, 27 Jan 2007 13:01:08 +0100 Bodo Eggert wrote:

> Fengguang Wu <wfg@mail.ustc.edu.cn> wrote:
> 
> > The new/old ra class were implicitly stored in low bits of
> > file_ra_state.flags. Now make the data structure obvious, and remove the
> > coding tricks.
> 
> > +++ linux-2.6.20-rc4-mm1/include/linux/fs.h
> 
> > -     unsigned long flags;    /* RA_FLAG_xxx | ra_class_old | ra_class_new */
> > +     union {
> > +             unsigned long   flags;  /* RA_FLAG_xxx | class_old | class_new */
> > +             struct {
> > +                     u8      class_new;
> > +                     u8      class_old;
> 
> This doesn't work on big endiam machines, does it?
> 
> IMO you should use a bitfield instead.

Or "use bit masks instead" since

"The order of allocation of bit-fields within a unit (high-order to
low-order or low-order to high-order) is implementation-defined."

---
~Randy

  reply	other threads:[~2007-01-28 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7HR6P-3Wm-3@gated-at.bofh.it>
     [not found] ` <7HR6S-3Wm-13@gated-at.bofh.it>
2007-01-27 12:01   ` [PATCH 2/8] readahead: state based method routines: explicitly embed class_new/class_old inside flags Bodo Eggert
2007-01-28 19:11     ` Randy Dunlap [this message]
2007-01-27  8:02 [PATCH 0/8] readahead updates Fengguang Wu
2007-01-27  8:02 ` [PATCH 2/8] readahead: state based method routines: explicitly embed class_new/class_old inside flags Fengguang Wu
2007-01-27  8:02   ` Fengguang Wu

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=20070128111104.789cbd07.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=7eggert@gmx.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mp3@de.ibm.com \
    --cc=wfg@mail.ustc.edu.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.