From owner-svn-src-head@FreeBSD.ORG Thu Jan 17 03:27:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EF4B6B9F; Thu, 17 Jan 2013 03:27:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E21026FB; Thu, 17 Jan 2013 03:27:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H3R8Zq075325; Thu, 17 Jan 2013 03:27:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H3R8pf075324; Thu, 17 Jan 2013 03:27:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301170327.r0H3R8pf075324@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 Jan 2013 03:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245533 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 03:27:09 -0000 Author: mav Date: Thu Jan 17 03:27:08 2013 New Revision: 245533 URL: http://svnweb.freebsd.org/changeset/base/245533 Log: - Fix rebuild position broken at r245522. - Identify one more metadata field. Modified: head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Thu Jan 17 03:25:31 2013 (r245532) +++ head/sys/geom/raid/md_promise.c Thu Jan 17 03:27:08 2013 (r245533) @@ -126,7 +126,8 @@ struct promise_raid_conf { uint8_t magic_6; uint8_t sector_size; uint16_t magic_7; - uint32_t magic_8[32]; + uint32_t magic_8[31]; + uint32_t backup_time; uint16_t magic_9; uint32_t disk_offset_high; uint32_t disk_sectors_high; @@ -228,6 +229,7 @@ g_raid_md_promise_print(struct promise_r printf("magic_5 0x%08x\n", meta->magic_5); printf("total_sectors_high 0x%08x\n", meta->total_sectors_high); printf("sector_size %u\n", meta->sector_size); + printf("backup_time %d\n", meta->backup_time); printf("disk_offset_high 0x%08x\n", meta->disk_offset_high); printf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); printf("disk_rebuild_high 0x%08x\n", meta->disk_rebuild_high); @@ -398,6 +400,7 @@ next: meta->disk_rebuild_high = 0; if (meta->total_sectors_high == 0x15161718) { meta->total_sectors_high = 0; + meta->backup_time = 0; if (meta->rebuild_lba64 == 0x2122232425262728) meta->rebuild_lba64 = UINT64_MAX; } @@ -793,7 +796,7 @@ nofit: sd->sd_rebuild_pos = 0; else { sd->sd_rebuild_pos = - (((off_t)pd->pd_meta[sdn]->disk_rebuild << 32) + + (((off_t)pd->pd_meta[sdn]->disk_rebuild_high << 32) + pd->pd_meta[sdn]->disk_rebuild) * 512; } } else if (!(meta->disks[md_disk_pos].flags & PROMISE_F_ONLINE)) {