Hi Peter, >> static inline uint64_t d2_64(uint64_t v) >> { >> uint64_t mask = v & 0x0101010101010101U; >> mask = (mask << 8) - mask; > > (mask << 7) I assume... No. It's "(mask << 8) - mask". We want to expand the bit at position 0 (in each byte) to the full byte, resulting in 0xFF if the bit is at 1, and 0x00 if the bit is 0. (0 << 8) - 0 = 0x00 (1 << 8) - 1 = 0x100 - 1 = 0xFF Ciao, Andrea -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html