From owner-freebsd-geom@FreeBSD.ORG Mon Sep 30 11:06:44 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F3C8DC8 for ; Mon, 30 Sep 2013 11:06:44 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4BCFE2BEB for ; Mon, 30 Sep 2013 11:06:44 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8UB6iNa053454 for ; Mon, 30 Sep 2013 11:06:44 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8UB6h4M053452 for freebsd-geom@FreeBSD.org; Mon, 30 Sep 2013 11:06:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Sep 2013 11:06:43 GMT Message-Id: <201309301106.r8UB6h4M053452@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 11:06:44 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/181900 geom [geom] [patch] Line breaks missing in geli's kern.geom o kern/181704 geom [geom] ggatec crash the system when I write something o kern/179889 geom [geli] geli stopped work after updating RELEASE 9.* so o kern/178684 geom gpart(8) cannot get my GEOM tree o kern/178359 geom [geom] [patch] geom_eli: support external metadata o kern/176744 geom [geom] [patch] BIO_FLUSH not recorded by devstats o kern/170038 geom [geom] geom_mirror always starts degraded after reboot o kern/169539 geom [geom] [patch] fix ability to run gmirror on MSI MegaR a bin/169077 geom bsdinstall(8) does not use partition labels in /etc/fs f kern/165745 geom [geom] geom_multipath page fault on removed drive o kern/165428 geom [glabel][patch] Add xfs support to glabel o kern/164254 geom [geom] gjournal not stopping on GPT partitions o kern/164252 geom [geom] gjournal overflow o kern/164143 geom [geom] Partition table not recognized after upgrade R8 a kern/163020 geom [geli] [patch] enable the Camellia-XTS on GEOM ELI o kern/162690 geom [geom] gpart label changes only take effect after a re o kern/162010 geom [geli] panic: Provider's error should be set (error=0) o kern/161979 geom [geom] glabel doesn't update after newfs, and glabel s o bin/161807 geom [patch] add option for explicitly specifying metadata o kern/161752 geom [geom] glabel(8) doesn't get gpt label change o bin/161677 geom gpart(8) Probably bug in gptboot o kern/160409 geom [geli] failed to attach provider f kern/159595 geom [geom] [panic] panic on gmirror unload in vbox [regres f kern/159414 geom [isp] isp(4)+gmultipath(8) : removing active fiber pat p kern/158398 geom [headers] [patch] includes o kern/158197 geom [geom] geom_cache with size>1000 leads to panics o kern/157879 geom [libgeom] [regression] ABI change without version bump o kern/157863 geom [geli] kbdmux prevents geli passwords from being enter o kern/157739 geom [geom] GPT labels with geom_multipath o kern/157724 geom [geom] gpart(8) 'add' command must preserve gap for sc o kern/157723 geom [geom] GEOM should not process 'c' (raw) partitions fo o kern/157108 geom [gjournal] dumpon(8) fails on gjournal providers o kern/155994 geom [geom] Long "Suspend time" when reading large files fr o bin/154570 geom [patch] gvinum(8) can't be built as part of the kernel o kern/154226 geom [geom] GEOM label does not change when you modify them o kern/150858 geom [geom] [geom_label] [patch] glabel(8) is not compatibl o kern/150626 geom [geom] [gjournal] gjournal(8) destroys label o kern/150555 geom [geom] gjournal unusable on GPT partitions o kern/150334 geom [geom] [udf] [patch] geom label does not support UDF o kern/149762 geom volume labels with rogue characters o bin/149215 geom [panic] [geom_part] gpart(8): Delete linux's slice via o kern/147667 geom [gmirror] Booting with one component of a gmirror, the o kern/145818 geom [geom] geom_stat_open showing cached information for n o kern/145042 geom [geom] System stops booting after printing message "GE o kern/143455 geom gstripe(8) in RELENG_8 (31st Jan 2010) broken o kern/142563 geom [geom] [hang] ioctl freeze in zpool o kern/141740 geom [geom] gjournal(8): g_journal_destroy concurrent error o kern/140352 geom [geom] gjournal + glabel not working o kern/135898 geom [geom] Severe filesystem corruption - large files or l o kern/134113 geom [geli] Problem setting secondary GELI key o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o bin/131415 geom [geli] keystrokes are unregulary sent to Geli when typ o kern/131353 geom [geom] gjournal(8) kernel lock o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid o kern/127420 geom [geom] [gjournal] [panic] Journal overflow on gmirrore o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o bin/86388 geom [geom] [geom_part] periodic(8) daily should backup gpa o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. 80 problems total. From owner-freebsd-geom@FreeBSD.ORG Wed Oct 2 16:15:55 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38A47D35 for ; Wed, 2 Oct 2013 16:15:55 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm8-vm9.bullet.mail.gq1.yahoo.com (nm8-vm9.bullet.mail.gq1.yahoo.com [98.136.218.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF877253E for ; Wed, 2 Oct 2013 16:15:54 +0000 (UTC) Received: from [98.137.12.189] by nm8.bullet.mail.gq1.yahoo.com with NNFMP; 02 Oct 2013 16:15:48 -0000 Received: from [98.136.164.65] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 02 Oct 2013 16:15:48 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 02 Oct 2013 16:15:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380730548; bh=aeS3rqsVe4SLc+8Dr3eUp+oYJJHK+FWspBtBTChHM00=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=s4kcirblfZbBdJ4q05ywnV7+fTPFqUedKs99l3pbVHJwmQqWJyrbeDc1lgEIzx3hAiPpW1aeEblTueSkeOM2xO8Mr0sB6GkKs3WifIEPqNy4ULzK2oW2xzmvKOzZzxCx8UmlxjEPJRFctbBdv+HTcYCnxZQ/xyWXDn3j9Mu1fUA= X-Yahoo-Newman-Id: 190283.87177.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Fy8A8ncVM1nU3ov.KIGnRXdaAEKynEfCtPPQ05yUfNEWF1R BEgYCP4xePa22rkLgMspNqqTMxsdqQBPsQNgLtVBrMT.LLAcPN9AbXI5ZiXo PSUpfbC122.oPOsrJi0s0p01TPKuGZolLu.kDdtRrutxct_Me4VcnEA2wBui .CQbUQRjkq_rVinooTWWp89V16rjFbF0SdrjG6JrXYaEssV6_.6X_A69ABYe 8ZMqdqnTCS51K8RKgFfNkfHt5u7OttSmCFdXtAjCEacYN6eWm9kKGNQbw0.. 9X8qfuDP_q7brEFn6kWPP9Y6JdrJx0u9iApbOWB7WMHXEv7XVFdHchY9sP4j kpZ4r40.rXpHat3VMC.kvo3i1MAziawRtMJPzYAlMp0wcTzXy5_OMgfJKEgv LyPKrCBV64p2xoKs2iH_q8zUOcfoq.2PepVDo2IJ8.8jYN2mQKWqtG0hVBjl HL39WlBn5itYkudGhOR8honKNz6z8kKljQyM27jHmP5wO_yQ9U30qLMdve4Y VgsQ2Q2t552Hh8mUS_biywkriNeNUERntYTD4P8fzqrReVM0daVBXXiQTiBA 5xg-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp227.mail.gq1.yahoo.com with SMTP; 02 Oct 2013 16:15:48 +0000 UTC Subject: Endian issues, LE write to BE partitions From: Sean Bruno To: freebsd-fs@freebsd.org Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-SrhZVfgFxlg3k0ahEVKb" Date: Wed, 02 Oct 2013 09:15:46 -0700 Message-ID: <1380730546.1619.47.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-Mailman-Approved-At: Wed, 02 Oct 2013 16:28:09 +0000 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 16:15:55 -0000 --=-SrhZVfgFxlg3k0ahEVKb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Using makefs from an amd64 host to build a f/s in a VTOC8 partition will destroy the entire partition table. I simplified the test to simple dd to an existing partition and got the same result, exonerating mkfs I suspect a lack of endian knowledge in geom itself, not geom_part_vtoc8. =20 test case: using amd64 host (10.0 current) create monolothic image truncate -s+5G /var/tmp/myfile.img mdconfig -f /var/tmp/myfile.img build and load geom_part_vtoc8 kernel module use gpart to create VTOC8 part table add partition to part table to yeild the following: =3D> 0 10442250 md0 VTOC8 (5.0G) 0 10442250 1 freebsd-ufs (5G) =20 dd to md0a from dev zero for just a bit dd if=3D/dev/zero of=3D/dev/md0a bs=3D64k count=3D100 destroy md0 via mdconfig -d -u 0 recreate it with mdconfig -f /var/tmp/myfile.img gpart displays no partions for the image any more: gpart: No such geom: md0. bcc freebsd-geom --=-SrhZVfgFxlg3k0ahEVKb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSTEayAAoJEBkJRdwI6BaHOy8H/Aimwsjhet3TOKfv4rwRTVFo bYVoFdP8EvN9XXox6+aKxXjHrKJBhmCsCUpwWTUlrp6iNenMPTbxa+QHrgldO6wv a3gUXbU++WOc98elcFHb9fwN+Ks4lfp+ph45EFkz4w8ptmFdG5fKRZXsiNFCgzYv eerizZSK4S7FM4XtM0BH0K9ps8upLa+bQRw0sARwU8GTPB3Do+VlKWVU3f0svFPa QXpmEx1sc4SCiPZd7mO91niZ/+NMmmtGJ0k4X8LEvx1XVujxqWtlJxJ29sMEWZ5H 2GQligqDnjpmJXl4Y6tKisNFASJzMyG2TtcjiRV4AEwefgQ1UNJ/ASkZCGPTwCo= =6c4g -----END PGP SIGNATURE----- --=-SrhZVfgFxlg3k0ahEVKb-- From owner-freebsd-geom@FreeBSD.ORG Wed Oct 2 19:57:17 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E13227F; Wed, 2 Oct 2013 19:57:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25DF52447; Wed, 2 Oct 2013 19:57:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1F6A6B965; Wed, 2 Oct 2013 15:57:16 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: [RFC][CFT] GEOM direct dispatch and fine-grained CAM locking Date: Wed, 2 Oct 2013 13:30:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <5224511D.4090503@FreeBSD.org> <20130906230236.GI43281@caravan.chchile.org> <522AC88D.4070005@FreeBSD.org> In-Reply-To: <522AC88D.4070005@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201310021330.23251.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 02 Oct 2013 15:57:16 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, Alexander Motin , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 19:57:17 -0000 On Saturday, September 07, 2013 2:32:45 am Alexander Motin wrote: > On 07.09.2013 02:02, Jeremie Le Hen wrote: > > On Fri, Sep 06, 2013 at 11:29:11AM +0300, Alexander Motin wrote: > >> On 06.09.2013 11:06, Jeremie Le Hen wrote: > >>> On Fri, Sep 06, 2013 at 12:46:27AM +0200, Olivier Cochard-Labb=E9 wro= te: > >>>> On Thu, Sep 5, 2013 at 11:38 PM, Alexander Motin =20 wrote: > >>>>> I've found and fixed possible double request completion, that could= =20 cause > >>>>> such symptoms if happened. Updated patch located as usual: > >>>>> http://people.freebsd.org/~mav/camlock_patches/camlock_20130905.pat= ch > >>>>> > >>> With this new one I cannot boot any more (I also updated the source > >>> tree). This is a hand transcripted version: > >>> > >>> Trying to mount root from zfs:zroot/root []... > >>> panic: Batch flag already set > >>> cpuid =3D 1 > >>> KDB: stack backtrace: > >>> db_trace_self_wrapper() > >>> kdb_backtrace() > >>> vpanic() > >>> kassert_panic() > >>> xpt_batch_start() > >>> ata_interrupt() > >>> softclock_call_cc() > >>> softclock() > >>> ithread_loop() > >>> fork_exit() > >>> fork_trampoline() > >> > >> Thank you for the report. I see my fault. It is probably specific to > >> ata(4) driver only. I've workarounded that in new patch version, but > >> probably that area needs some rethinking. > >> > >> http://people.freebsd.org/~mav/camlock_patches/camlock_20130906.patch > > > > I'm not sure you needed a confirmation, but it boots. Thanks :). > > > > I didn't quite understand the thread; is direct dispatch enabled for > > amd64? ISTR you said only i386 but someone else posted the macro for > > amd64. >=20 > Yes, it is enabled for amd64. I've said x86, meaning both i386 and amd64. =46YI, I tested mfi with this patch set and mfid worked fine for handling g= _up directly: Index: dev/mfi/mfi_disk.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- dev/mfi/mfi_disk.c (revision 257407) +++ dev/mfi/mfi_disk.c (working copy) @@ -162,6 +162,7 @@ sc->ld_disk->d_unit =3D sc->ld_unit; sc->ld_disk->d_sectorsize =3D secsize; sc->ld_disk->d_mediasize =3D sectors * secsize; + sc->ld_disk->d_flags =3D DISKFLAG_DIRECT_COMPLETION; if (sc->ld_disk->d_mediasize >=3D (1 * 1024 * 1024)) { sc->ld_disk->d_fwheads =3D 255; sc->ld_disk->d_fwsectors =3D 63; = =20 =2D-=20 John Baldwin From owner-freebsd-geom@FreeBSD.ORG Wed Oct 2 20:13:51 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 78B37C17 for ; Wed, 2 Oct 2013 20:13:51 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm49-vm10.bullet.mail.bf1.yahoo.com (nm49-vm10.bullet.mail.bf1.yahoo.com [216.109.114.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 307DD2597 for ; Wed, 2 Oct 2013 20:13:51 +0000 (UTC) Received: from [98.139.212.146] by nm49.bullet.mail.bf1.yahoo.com with NNFMP; 02 Oct 2013 20:13:49 -0000 Received: from [98.139.213.9] by tm3.bullet.mail.bf1.yahoo.com with NNFMP; 02 Oct 2013 20:13:49 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 02 Oct 2013 20:13:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380744829; bh=uTqth4e9adrjYntf0xvUKX0f+t/QfgeuOMWIM3cc5KY=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=L/JCEPaEABxzDzwoSc/nAMjgbq+DftcQb85UhClyuvBUUnWXPJhDmePRChhKZZhLZi2euOo7CNTTFKJn/1tHMQVA5739iS1hx2u/ShpFkX/4sNCyqtekQDQGuyEjpdYpXxk+LWPWsZzS/vOn0GqtQF5zD1VoNDEVq/pElkt8AMA= X-Yahoo-Newman-Id: 195518.85991.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Lr8YVB0VM1nsFWEiwGjJU_jkl2bTKos53PCmA42C__E7pPJ FcdSSR7nam1GLMW3rFOkvih2BLXYQFzeBMqoNkmj14YAIHV5yHBMn3CDD4ir Pq.6KrMZBdnDraPT5RkthtTJoXOpXwkUU56X9l9jlX1Q98GNbWIKwkchc3Av TM4EQoBeN0metrZyOXjVsr6nGwgjy5ip0RnT1TFbIZyaT_nEfRccM5jURqk6 UOCoGi0qGJLfBE7ngWJ7yVQ9jgArZ8utdRTLDTPuoYdrQs8D4ZmyC9MOlU2Z v0CEo_S.COA4LFdHKSxnPnSTWNnVU5UBBWvV7UNjyLtQyzoLRWZWHGrNbcs6 ZDS3ynm43vOl_8lDlPexu2ZFvPJviodl5yVNwLeTt6vCti6.r.DmuacsGMhm oSL9AZTdw92KlxWxd1Ch8brSFVk.dB1yKL4C9Lm1gG.eS0wgToqj1WD790B1 pabWRtXYVz5dFzQSc6ZzHDfZcUK4JzilCZnS0CCdwUo5KCv6u5X_yT.FsYb1 CEK2wafAOdxflZxgnZa9cJl4e0PxxLXCOv1koM7PdUz8ETixKZhSjnA4KpDX 2OQ-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp109.mail.bf1.yahoo.com with SMTP; 02 Oct 2013 13:13:49 -0700 PDT Subject: [SOLVED?] Re: Endian issues, LE write to BE partitions From: Sean Bruno To: sbruno@freebsd.org In-Reply-To: <1380730546.1619.47.camel@localhost> References: <1380730546.1619.47.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-1n515Inn0ufD0tsRQbzX" Date: Wed, 02 Oct 2013 13:13:47 -0700 Message-ID: <1380744827.6516.16.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-Mailman-Approved-At: Wed, 02 Oct 2013 20:33:11 +0000 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 20:13:51 -0000 --=-1n515Inn0ufD0tsRQbzX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wed, 2013-10-02 at 09:15 -0700, Sean Bruno wrote: > Using makefs from an amd64 host to build a f/s in a VTOC8 partition will > destroy the entire partition table. I simplified the test to simple dd > to an existing partition and got the same result, exonerating mkfs >=20 > I suspect a lack of endian knowledge in geom itself, not > geom_part_vtoc8. =20 >=20 > test case: > using amd64 host (10.0 current) create monolothic image > truncate -s+5G /var/tmp/myfile.img > mdconfig -f /var/tmp/myfile.img > build and load geom_part_vtoc8 kernel module > use gpart to create VTOC8 part table > add partition to part table to yeild the following: >=20 > =3D> 0 10442250 md0 VTOC8 (5.0G) > 0 10442250 1 freebsd-ufs (5G) =20 >=20 > dd to md0a from dev zero for just a bit > dd if=3D/dev/zero of=3D/dev/md0a bs=3D64k count=3D100 >=20 > destroy md0 via mdconfig -d -u 0 > recreate it with mdconfig -f /var/tmp/myfile.img >=20 > gpart displays no partions for the image any more: > gpart: No such geom: md0. >=20 > bcc freebsd-geom Nathan brought me some knowledge. newfs(8) knows that the first 16 sectors for the first partition are special and not to touch it. makefs(8) does not. So, as a proof of concept, I modified makefs to read() the first 16 sectors from the "image" (in my case, /dev/md0a) and throw it away. (lseek() failed on the partition, so read() was used) This got me to a bootable SPARC64 image in qemu-system-sparc64, and will probably allow further booting in other BE architectures. Is this patch going to break non "device" makefs calls? e.g. if I want to create an image file and not use a loopback device? Index: ffs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ffs.c (revision 255871) +++ ffs.c (working copy) @@ -470,6 +470,7 @@ char *buf; int i, bufsize; off_t bufrem; + char temp_buf[16*512]; =20 assert (image !=3D NULL); assert (fsopts !=3D NULL); @@ -480,6 +481,7 @@ warn("Can't open `%s' for writing", image); return (-1); } + read(fsopts->fd, temp_buf, 16*512); =20 /* zero image */ #if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS bcc - nwhitehorn, freebsd-geom --=-1n515Inn0ufD0tsRQbzX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSTH57AAoJEBkJRdwI6BaHgJsH/jwJnObv/zaBDTXRnwuusSV4 Cj1MSaJOVgEyrguD75FMOCD3IcvXMThzehapdrc8OoWvdFXdufeXskUfS+FTWU8w BTMir0SVaX1FGN518pXy+PHQpwEi8tfm8VTnspzUqrQwxK6qB/snwdPfO0wd88eS vy1hXcnKwSugoIrFK5RYMjyXNMIuuFKxDRbxVDOEmpN6JgNeBxwl/RYnrsxQJPme 0y+ZFDZ3Qx7gEs3NjWM80uS2iu8TXst0yoM5mgQqkHkxdQsCximIUq4zQaBtEI5/ Tx7ZoxM3SrP0o9hQBNFEn2EYbfg94NY9uTR/Z9IkEcbd2/ZMcquwFxpKq+23Vcc= =z2iu -----END PGP SIGNATURE----- --=-1n515Inn0ufD0tsRQbzX--