On Monday December 4, [EMAIL PROTECTED] wrote: > > Ingo, Neil: > > Al has summarized that csum_partial() is arch-specific. > However, drivers/md/md.c uses it.
Yep. > > Does that mean that RAID volumes are not portable across > (some) architectures? Yep. version-0.90 superblocks are already not portable between archs of different endianness. There can also be issues between arch with different implementations of csum_partial, though the use of csum_fold in if (csum_fold(calc_sb_csum(sb)) != csum_fold(sb->sb_csum)) { printk(KERN_WARNING "md: invalid superblock checksum on %s\n", b); (in super_90_load in md.c) tries to alleviate this. > > Should md.c use a specific, known, fixed (as in static, > arch-independent) version of csum_partial()? For version-1 superblocks it uses arch-independent byte-order and arch-independent checksums but.... > > Will changing now possibly make some existing volumes > non-portable? .. it really is too late for 0.90 superblocks. Certainly changing it would back things for people who want to revert to an earlier kernel. The use of csum_fold has been in place since late 2004 so you would need to go quite a long way back to hit problems... and if you go that far back you could hit problems with mdadm too (as mdadm calculated the checksum the same on all architectures...). So maybe we could get rid of csum_partial and use a replacement and still have most things work.... tested patched would be considered :-) NeilBrown - 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/