Re: [PATCH 2/8] readahead: state based method routines: explicitly embed class_new/class_old inside flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fengguang Wu <[email protected]> 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.
-- 
Your e-mail has been returned due to insufficient voltage. 

Friß, Spammer: [email protected]
 [email protected] [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux