From owner-freebsd-arch@FreeBSD.ORG  Thu Jan 12 01:33:43 2012
Return-Path: <owner-freebsd-arch@FreeBSD.ORG>
Delivered-To: arch@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B864E106566B;
	Thu, 12 Jan 2012 01:33:43 +0000 (UTC)
	(envelope-from jmg@h2.funkthat.com)
Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A7178FC13;
	Thu, 12 Jan 2012 01:33:43 +0000 (UTC)
Received: from h2.funkthat.com (localhost [127.0.0.1])
	by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id q0C1D24O064770
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 11 Jan 2012 17:13:02 -0800 (PST)
	(envelope-from jmg@h2.funkthat.com)
Received: (from jmg@localhost)
	by h2.funkthat.com (8.14.3/8.14.3/Submit) id q0C1D2mK064764;
	Wed, 11 Jan 2012 17:13:02 -0800 (PST) (envelope-from jmg)
Date: Wed, 11 Jan 2012 17:13:02 -0800
From: John-Mark Gurney <jmg@funkthat.com>
To: Don Lewis <truckman@freebsd.org>
Message-ID: <20120112011301.GI52468@funkthat.com>
Mail-Followup-To: Don Lewis <truckman@freebsd.org>, nvass@gmx.com,
	alfred@freebsd.org, arch@freebsd.org, adrian@freebsd.org,
	dougb@freebsd.org
References: <4F0AB63D.2040503@gmx.com>
	<201201091009.q09A9NQb025487@gw.catspoiler.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201201091009.q09A9NQb025487@gw.catspoiler.org>
User-Agent: Mutt/1.4.2.3i
X-Operating-System: FreeBSD 7.2-RELEASE i386
X-Files: The truth is out there
X-URL: http://resnet.uoregon.edu/~gurney_j/
X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(h2.funkthat.com [127.0.0.1]);
	Wed, 11 Jan 2012 17:13:03 -0800 (PST)
Cc: arch@freebsd.org, adrian@freebsd.org, nvass@gmx.com, alfred@freebsd.org,
	dougb@freebsd.org
Subject: Re: [patch] allow crash dumps to Linux swap partitions
X-BeenThere: freebsd-arch@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>,
	<mailto:freebsd-arch-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arch>
List-Post: <mailto:freebsd-arch@freebsd.org>
List-Help: <mailto:freebsd-arch-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>,
	<mailto:freebsd-arch-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Jan 2012 01:33:43 -0000

Don Lewis wrote this message on Mon, Jan 09, 2012 at 02:09 -0800:
> On  9 Jan, Nikos Vassiliadis wrote:
> > On 1/9/2012 11:25 AM, Doug Barton wrote:
> >> Actually I'm fairly confident that we write dumps backwards from the end
> >> of the swap partition. It's done that way on purpose in case fsck'ing
> >> causes the system to swap, it may still be possible to save the dump.
> > 
> > So, dumping core is safe, but not sharing the swap area...
> > It would be nice to be able to do that.
> 
> According to the mkswap(8) man page (which hasn't been updated
> since 2.2 even though the machine is running a 2.6 kernel) on a nearby
> Linux machine, the metadata stored in the first page of the swap
> partition. It looks like we could safely coexist if we skipped the first
> page of the partition. Otherwise Linux will want mkswap to be run on the
> partition before it will swap to the partition.

Don't we already skip the first 8k of the swap partition because back
in the day when bsdlabel's partition sector 0 was the same as the
slice sector 0, and so if any FS or swap wrote to the first 8k, it
would overwrite the bsdlabel?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."