The patch titled md: endian annotations for the bitmap superblock has been added to the -mm tree. Its filename is md-endian-annotations-for-the-bitmap-superblock.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: md: endian annotations for the bitmap superblock From: NeilBrown <neilb@xxxxxxx> And a couple of bug fixes found by sparse. Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/md/bitmap.c | 10 +++++----- include/linux/raid/bitmap.h | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff -puN drivers/md/bitmap.c~md-endian-annotations-for-the-bitmap-superblock drivers/md/bitmap.c --- a/drivers/md/bitmap.c~md-endian-annotations-for-the-bitmap-superblock +++ a/drivers/md/bitmap.c @@ -536,7 +536,7 @@ static int bitmap_read_sb(struct bitmap printk(KERN_INFO "%s: bitmap file is out of date (%llu < %llu) " "-- forcing full recovery\n", bmname(bitmap), events, (unsigned long long) bitmap->mddev->events); - sb->state |= BITMAP_STALE; + sb->state |= cpu_to_le32(BITMAP_STALE); } success: /* assign fields using values from superblock */ @@ -544,11 +544,11 @@ success: bitmap->daemon_sleep = daemon_sleep; bitmap->daemon_lastrun = jiffies; bitmap->max_write_behind = write_behind; - bitmap->flags |= sb->state; + bitmap->flags |= le32_to_cpu(sb->state); if (le32_to_cpu(sb->version) == BITMAP_MAJOR_HOSTENDIAN) bitmap->flags |= BITMAP_HOSTENDIAN; bitmap->events_cleared = le64_to_cpu(sb->events_cleared); - if (sb->state & BITMAP_STALE) + if (sb->state & cpu_to_le32(BITMAP_STALE)) bitmap->events_cleared = bitmap->mddev->events; err = 0; out: @@ -578,9 +578,9 @@ static void bitmap_mask_state(struct bit spin_unlock_irqrestore(&bitmap->lock, flags); sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); switch (op) { - case MASK_SET: sb->state |= bits; + case MASK_SET: sb->state |= cpu_to_le32(bits); break; - case MASK_UNSET: sb->state &= ~bits; + case MASK_UNSET: sb->state &= cpu_to_le32(~bits); break; default: BUG(); } diff -puN include/linux/raid/bitmap.h~md-endian-annotations-for-the-bitmap-superblock include/linux/raid/bitmap.h --- a/include/linux/raid/bitmap.h~md-endian-annotations-for-the-bitmap-superblock +++ a/include/linux/raid/bitmap.h @@ -146,16 +146,16 @@ enum bitmap_state { /* the superblock at the front of the bitmap file -- little endian */ typedef struct bitmap_super_s { - __u32 magic; /* 0 BITMAP_MAGIC */ - __u32 version; /* 4 the bitmap major for now, could change... */ - __u8 uuid[16]; /* 8 128 bit uuid - must match md device uuid */ - __u64 events; /* 24 event counter for the bitmap (1)*/ - __u64 events_cleared;/*32 event counter when last bit cleared (2) */ - __u64 sync_size; /* 40 the size of the md device's sync range(3) */ - __u32 state; /* 48 bitmap state information */ - __u32 chunksize; /* 52 the bitmap chunk size in bytes */ - __u32 daemon_sleep; /* 56 seconds between disk flushes */ - __u32 write_behind; /* 60 number of outstanding write-behind writes */ + __le32 magic; /* 0 BITMAP_MAGIC */ + __le32 version; /* 4 the bitmap major for now, could change... */ + __u8 uuid[16]; /* 8 128 bit uuid - must match md device uuid */ + __le64 events; /* 24 event counter for the bitmap (1)*/ + __le64 events_cleared;/*32 event counter when last bit cleared (2) */ + __le64 sync_size; /* 40 the size of the md device's sync range(3) */ + __le32 state; /* 48 bitmap state information */ + __le32 chunksize; /* 52 the bitmap chunk size in bytes */ + __le32 daemon_sleep; /* 56 seconds between disk flushes */ + __le32 write_behind; /* 60 number of outstanding write-behind writes */ __u8 pad[256 - 64]; /* set to zero */ } bitmap_super_t; _ Patches currently in -mm which might be from neilb@xxxxxxx are origin.patch bug-nfsd-nfs4xdrc-misuse-of-err_ptr.patch fix-svc_procfunc-declaration.patch lockd-endianness-annotations.patch xdr-annotations-nfsv2.patch xdr-annotations-nfsv3.patch xdr-annotations-nfsv4.patch xdr-annotations-nfs-readdir-entries.patch fs-nfs-callback-passes-error-values-big-endian.patch xdr-annotations-fs-nfs-callback.patch nfs-verifier-is-network-endian.patch xdr-annotations-mount_clnt.patch nfs_common-endianness-annotations.patch nfsd-nfserrno-endianness-annotations.patch nfsfh-simple-endianness-annotations.patch xdr-annotations-nfsd_dispatch.patch xdr-annotations-nfsv2-server.patch xdr-annotations-nfsv3-server.patch xdr-annotations-nfsv4-server.patch nfsd-vfsc-endianness-annotations.patch nfsd-nfs4-code-returns-error-values-in-net-endian.patch nfsd-nfsv23-trivial-endianness-annotations-for-error-values.patch nfsd-nfsv4-errno-endianness-annotations.patch xdr-annotations-nfsd-callback.patch nfsd-misc-endianness-annotations.patch nfsd-nfs_replay_me.patch knfsd-fix-race-that-can-disable-nfs-server.patch md-fix-calculation-of-degraded-for-multipath-and-raid10.patch md-add-another-compat_ioctl-for-md.patch md-endian-annotation-for-v1-superblock-access.patch md-endian-annotations-for-the-bitmap-superblock.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets-tidy.patch remove-lock_key-approach-to-managing-nested-bd_mutex-locks.patch simplify-some-aspects-of-bd_mutex-nesting.patch use-mutex_lock_nested-for-bd_mutex-to-avoid-lockdep-warning.patch avoid-lockdep-warning-in-md.patch lockdep-annotate-nfsd4-recover-code.patch md-conditionalize-some-code.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html