From: Paul Clements <paul.clements@steeleye.com>
To: linux-raid@vger.kernel.org, neilb@suse.de
Subject: [PATCH/BUG] mdadm: write behind value does not have endian conversion
Date: Fri, 06 Oct 2006 13:53:57 -0400 [thread overview]
Message-ID: <45269835.2020801@steeleye.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
Neil,
The write behind value does not get converted to/from little endian
which causes write behind not to work on big endian machines (RUN ARRAY
fails with invalid argument error):
# mdadm -B /dev/md0 -l1 -n2 --write-behind=256 /dev/sdb10 --write-mostly
/dev/nbd0 --bitmap=/bitmaps/test5
mdadm: RUN_ARRAY failed: Invalid argument
# tail /var/log/messages
Oct 6 13:14:48 caspian kernel: daemon sleep: 5s
Oct 6 13:14:48 caspian kernel: sync size: 1001456 KB
Oct 6 13:14:48 caspian kernel: max write behind: 65536
Oct 6 13:14:48 caspian kernel: md0: failed to create bitmap (-22)
Attached patch for mdadm fixes this.
Thanks,
Paul
[-- Attachment #2: mdadm-2.5.1-write-behind-endian-fix.diff --]
[-- Type: text/plain, Size: 416 bytes --]
--- mdadm-2.5.1/bitmap.c.orig Fri Oct 6 13:40:35 2006
+++ mdadm-2.5.1/bitmap.c Fri Oct 6 13:40:53 2006
@@ -33,6 +33,7 @@ inline void sb_le_to_cpu(bitmap_super_t
sb->chunksize = __le32_to_cpu(sb->chunksize);
sb->daemon_sleep = __le32_to_cpu(sb->daemon_sleep);
sb->sync_size = __le64_to_cpu(sb->sync_size);
+ sb->write_behind = __le32_to_cpu(sb->sync_size);
}
inline void sb_cpu_to_le(bitmap_super_t *sb)
next reply other threads:[~2006-10-06 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 17:53 Paul Clements [this message]
2006-10-06 19:03 ` [PATCH/BUG] mdadm: write behind value does not have endian conversion Paul Clements
2006-10-09 1:20 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45269835.2020801@steeleye.com \
--to=paul.clements@steeleye.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.