From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] md: Make sure 64bit fields in version-1 metadata are 64-bit aligned.
Date: Fri, 7 Apr 2006 14:25:15 +1000 [thread overview]
Message-ID: <1060407042515.22091@suse.de> (raw)
In-Reply-To: 20060407142239.19652.patches@notabene
This patch should go in 2.6.17-rc2 if at all possible. If the problem
gets left much longer, a more ugly solution might be needed.
### Comments for Changeset
reshape_position is a 64bit field that was not 64bit aligned.
So swap with new_level.
NOTE: this is a user-visible change. However:
- The bad code has not appeared in a released kernel
- This code is still marked 'experimental'
- This only affects version-1 superblock, which are not in wide use
- These field are only used (rather than simply reported) by user-space
tools in extemely rare circumstances : after a reshape crashes in the
first second of the reshape process.
So I believe that, at this stage, the change is safe. Especially if
people heed the 'help' message on use mdadm-2.4.1.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/Kconfig | 11 ++++++-----
./include/linux/raid/md_p.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff ./drivers/md/Kconfig~current~ ./drivers/md/Kconfig
--- ./drivers/md/Kconfig~current~ 2006-04-07 14:15:42.000000000 +1000
+++ ./drivers/md/Kconfig 2006-04-07 14:16:35.000000000 +1000
@@ -139,11 +139,12 @@ config MD_RAID5_RESHAPE
is online. However it is still EXPERIMENTAL code. It should
work, but please be sure that you have backups.
- You will need a version of mdadm newer than 2.3.1. During the
- early stage of reshape there is a critical section where live data
- is being over-written. A crash during this time needs extra care
- for recovery. The newer mdadm takes a copy of the data in the
- critical section and will restore it, if necessary, after a crash.
+ You will need mdadm verion 2.4.1 or later to use this
+ feature safely. During the early stage of reshape there is
+ a critical section where live data is being over-written. A
+ crash during this time needs extra care for recovery. The
+ newer mdadm takes a copy of the data in the critical section
+ and will restore it, if necessary, after a crash.
The mdadm usage is e.g.
mdadm --grow /dev/md1 --raid-disks=6
diff ./include/linux/raid/md_p.h~current~ ./include/linux/raid/md_p.h
--- ./include/linux/raid/md_p.h~current~ 2006-04-07 14:11:53.000000000 +1000
+++ ./include/linux/raid/md_p.h 2006-04-07 14:14:48.000000000 +1000
@@ -227,8 +227,8 @@ struct mdp_superblock_1 {
*/
/* These are only valid with feature bit '4' */
- __u64 reshape_position; /* next address in array-space for reshape */
__u32 new_level; /* new level we are reshaping to */
+ __u64 reshape_position; /* next address in array-space for reshape */
__u32 delta_disks; /* change in number of raid_disks */
__u32 new_layout; /* new layout */
__u32 new_chunk; /* new chunk size (bytes) */
parent reply other threads:[~2006-04-07 4:25 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20060407142239.19652.patches@notabene>]
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=1060407042515.22091@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
/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.