Re: [RFC PATCH] bcache: enable big endian support for IBM s390x
From: Coly Li <hidden>
Date: 2018-03-15 15:46:18
From: Coly Li <hidden>
Date: 2018-03-15 15:46:18
On 15/03/2018 9:47 PM, Christoph Hellwig wrote:
quoted
+static void swap_cache_sb_from_cpu(struct cache_sb *sb, + struct cache_sb *out) +{ + int i; + + out->offset = cpu_to_le64(sb->offset); + out->flags = cpu_to_le64(sb->flags); + out->seq = cpu_to_le64(sb->seq);This looks completely bogus and sparse will complain loudly about it. Please make sure you have proper endianess annotations in place.
Hi Christoph, Oh, you notice me, I realize currently bcache does not have an on-disk super block format, struct cache_sb is used for both on-disk and in-memory. Thanks for the hint, I need to separate on-disk data structures from in-memory ones. Coly Li