From: Scott James Remnant <scott@ubuntu.com>
To: linux-hotplug@vger.kernel.org
Subject: vol_id and RAID 1.0 metadata
Date: Tue, 28 Aug 2007 16:44:22 +0000 [thread overview]
Message-ID: <1188319462.15863.28.camel@quest.netsplit.com> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 345 bytes --]
We've had a bug report filed for Ubuntu caused by vol_id not correctly
detecting a RAID1 with 1.0 metadata:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/133773
A patch is attached to the bug (attached again here), does this seem a
reasonable fix?
Scott
--
Scott James Remnant
Ubuntu Development Manager
scott@ubuntu.com
[-- Attachment #1.1.2: udev-volid-md1.patch --]
[-- Type: text/x-patch, Size: 1278 bytes --]
diff -urp udev-113/extras/volume_id/lib/linux_raid.c udev-113.mod/extras/volume_id/lib/linux_raid.c
--- udev-113/extras/volume_id/lib/linux_raid.c 2007-06-24 01:44:48.000000000 +1000
+++ udev-113.mod/extras/volume_id/lib/linux_raid.c 2007-08-28 22:11:47.000000000 +1000
@@ -142,14 +142,21 @@ static int volume_id_probe_linux_raid1(s
int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size)
{
- uint64_t sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES;
+ uint64_t sboff1 =
+ (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES;
+ uint64_t sboff2 =
+ size < 0x3000 ? 0x0400 : (size - 0x2000 & ~0x0e00);
/* version 0 at the end of the device */
- if (volume_id_probe_linux_raid0(id, off + sboff, size) == 0)
+ if (volume_id_probe_linux_raid0(id, off + sboff1, size) == 0)
+ return 0;
+ if (volume_id_probe_linux_raid0(id, off + sboff2, size) == 0)
return 0;
/* version 1.0 at the end of the device */
- if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0)
+ if (volume_id_probe_linux_raid1(id, off + sboff1, size) == 0)
+ return 0;
+ if (volume_id_probe_linux_raid1(id, off + sboff2, size) == 0)
return 0;
/* version 1.1 at the start of the device */
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2007-08-28 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-28 16:44 Scott James Remnant [this message]
2007-08-29 4:03 ` vol_id and RAID 1.0 metadata Kay Sievers
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=1188319462.15863.28.camel@quest.netsplit.com \
--to=scott@ubuntu.com \
--cc=linux-hotplug@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).