From owner-freebsd-arch@FreeBSD.ORG Mon Jan 9 09:04:51 2012 Return-Path: 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 5464A106566C; Mon, 9 Jan 2012 09:04:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id CC6DD8FC18; Mon, 9 Jan 2012 09:04:50 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so4034924vbb.13 for ; Mon, 09 Jan 2012 01:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ub+tdAAF1Pm/p3Xw0FWXOBgzt8R2Ms+Pmj4z7EKHWog=; b=RekGRgcM6618wMgf49wgcqFhoELmomdacXkElHKMEm3xycmcj5WUSzFMqysm7uvcVG s99M8qeRjyYIWO0VF3WLU9zGFUER9UQkQI+8lPlYHgk1/QW9wa/Kr7xUG1tlg9DSlPvc QPD+HOcJbjt8/PUMd1Pz5UZx7nhe7bQW9SonA= MIME-Version: 1.0 Received: by 10.52.24.35 with SMTP id r3mr7090452vdf.81.1326099890248; Mon, 09 Jan 2012 01:04:50 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Mon, 9 Jan 2012 01:04:50 -0800 (PST) In-Reply-To: <20120109061706.GC89781@elvis.mu.org> References: <201201082035.q08KZjL5024434@gw.catspoiler.org> <20120109061706.GC89781@elvis.mu.org> Date: Mon, 9 Jan 2012 01:04:50 -0800 X-Google-Sender-Auth: 2VxS6bugMi4BZDJrRenc4Wh-4IM Message-ID: From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, Don Lewis 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 09:04:51 -0000 .. doesn't linux swap have some metadata somewhere? Adrian On 8 January 2012 22:17, Alfred Perlstein wrote: > This is cool, it does seem to beg for a function instead of inlining > the logic in two places in case someone wants to add even more logic > to it. > > * Don Lewis [120108 13:14] wrote: >> I've got a machine that is set up to dual boot both FreeBSD and Linux. >> It is also disk space impaired, so to make the best use possible of the >> available space, I have FreeBSD set up to swap to the Linux swap >> partition. Until now I haven't had working crash dumps because geom >> didn't permit crash dumps to Linux swap partitions. This patch removes >> that limitation. =A0This could be useful for users of laptops who boot >> multiple operating systems. >> >> >> Index: sys/geom/part/g_part_ebr.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 >> --- sys/geom/part/g_part_ebr.c =A0 =A0 =A0 =A0(revision 229800) >> +++ sys/geom/part/g_part_ebr.c =A0 =A0 =A0 =A0(working copy) >> @@ -333,9 +333,10 @@ >> =A0{ >> =A0 =A0 =A0 struct g_part_ebr_entry *entry; >> >> - =A0 =A0 /* Allow dumping to a FreeBSD partition only. */ >> + =A0 =A0 /* Allow dumping to a FreeBSD partition or Linux swap partitio= n only. */ >> =A0 =A0 =A0 entry =3D (struct g_part_ebr_entry *)baseentry; >> - =A0 =A0 return ((entry->ent.dp_typ =3D=3D DOSPTYP_386BSD) ? 1 : 0); >> + =A0 =A0 return ((entry->ent.dp_typ =3D=3D DOSPTYP_386BSD || >> + =A0 =A0 =A0 =A0 entry->ent.dp_typ =3D=3D DOSPTYP_LINSWP) ? 1 : 0); >> =A0} >> >> =A0#if defined(GEOM_PART_EBR_COMPAT) >> Index: sys/geom/part/g_part_mbr.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 >> --- sys/geom/part/g_part_mbr.c =A0 =A0 =A0 =A0(revision 229800) >> +++ sys/geom/part/g_part_mbr.c =A0 =A0 =A0 =A0(working copy) >> @@ -304,9 +304,10 @@ >> =A0{ >> =A0 =A0 =A0 struct g_part_mbr_entry *entry; >> >> - =A0 =A0 /* Allow dumping to a FreeBSD partition only. */ >> + =A0 =A0 /* Allow dumping to a FreeBSD partition or Linux swap partitio= n only. */ >> =A0 =A0 =A0 entry =3D (struct g_part_mbr_entry *)baseentry; >> - =A0 =A0 return ((entry->ent.dp_typ =3D=3D DOSPTYP_386BSD) ? 1 : 0); >> + =A0 =A0 return ((entry->ent.dp_typ =3D=3D DOSPTYP_386BSD || >> + =A0 =A0 =A0 =A0 entry->ent.dp_typ =3D=3D DOSPTYP_LINSWP) ? 1 : 0); >> =A0} >> >> =A0static int >> >> >> >> Is anyone else disturbed by =A0the foot shooting potential of allowing >> crash dumps to be written to 386BSD partitions? >> >> _______________________________________________ >> freebsd-arch@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arch >> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > > -- > - Alfred Perlstein > .- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 > .- FreeBSD committer > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"