Date: Mon, 9 Jan 2012 01:04:50 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Alfred Perlstein <alfred@freebsd.org> Cc: arch@freebsd.org, Don Lewis <truckman@freebsd.org> Subject: Re: [patch] allow crash dumps to Linux swap partitions Message-ID: <CAJ-VmonUzf=Y74M-dg155bXtFH2YjJ60hF1F265ug6bYuzpedg@mail.gmail.com> In-Reply-To: <20120109061706.GC89781@elvis.mu.org> References: <201201082035.q08KZjL5024434@gw.catspoiler.org> <20120109061706.GC89781@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
.. doesn't linux swap have some metadata somewhere?
Adrian
On 8 January 2012 22:17, Alfred Perlstein <alfred@freebsd.org> 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 <truckman@FreeBSD.org> [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. This could be useful for users of laptops who boot
>> multiple operating systems.
>>
>>
>> Index: sys/geom/part/g_part_ebr.c
>> ===================================================================
>> --- sys/geom/part/g_part_ebr.c (revision 229800)
>> +++ sys/geom/part/g_part_ebr.c (working copy)
>> @@ -333,9 +333,10 @@
>> {
>> struct g_part_ebr_entry *entry;
>>
>> - /* Allow dumping to a FreeBSD partition only. */
>> + /* Allow dumping to a FreeBSD partition or Linux swap partition only. */
>> entry = (struct g_part_ebr_entry *)baseentry;
>> - return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
>> + return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
>> + entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
>> }
>>
>> #if defined(GEOM_PART_EBR_COMPAT)
>> Index: sys/geom/part/g_part_mbr.c
>> ===================================================================
>> --- sys/geom/part/g_part_mbr.c (revision 229800)
>> +++ sys/geom/part/g_part_mbr.c (working copy)
>> @@ -304,9 +304,10 @@
>> {
>> struct g_part_mbr_entry *entry;
>>
>> - /* Allow dumping to a FreeBSD partition only. */
>> + /* Allow dumping to a FreeBSD partition or Linux swap partition only. */
>> entry = (struct g_part_mbr_entry *)baseentry;
>> - return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
>> + return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
>> + entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
>> }
>>
>> static int
>>
>>
>>
>> Is anyone else disturbed by the 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonUzf=Y74M-dg155bXtFH2YjJ60hF1F265ug6bYuzpedg>
