[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
>>>>> "Ulrich" == Ulrich Weigand <> writes:

Ulrich> Hello,

Ulrich> since test11, the NFS code uses the set_bit and related
Ulrich> routines to manipulate the wb_flags member of the nfs_page
Ulrich> struct (nfs_page.h). Unfortunately, wb_flags has still data
Ulrich> type 'int'.

Ulrich> This is a problem (at least) on the 64-bit S/390 architecture,
Ulrich> as our ..._bit macros assume bit 0 is the least significant
Ulrich> bit of a 'long', which means due to big-endian byte order that
Ulrich> bit 0 resides in the 7th byte of the variable. As an int
Ulrich> occupies only 4 bytes, however, set_bit(0, int) clobbers
Ulrich> memory.

Ulrich> Now the question is, who's correct?

You are, the bit macros should only be used on long's. It happens to
work on little endian bitfield machines like the Alpha but thats the
same as when we had the problem with bit operations on char * in the
file system code a couple of years ago.

The NFS code needs to be fixed for this then.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.030 / U:11.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site