All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: pbonzini@redhat.com, aliguori@us.ibm.com,
	Markus Armbruster <armbru@redhat.com>,
	stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 08/32] hd-geometry: Move disk geometry guessing back from block.c
Date: Wed, 04 Jul 2012 10:24:42 +0200	[thread overview]
Message-ID: <4FF3FDCA.3020608@redhat.com> (raw)
In-Reply-To: <CAAu8pHsfHteStK7eC8pAS=hNTFF2P7RL-SLvRLC0x2OFzzbGog@mail.gmail.com>

Am 03.07.2012 20:40, schrieb Blue Swirl:
> On Sat, Jun 30, 2012 at 5:50 AM, Markus Armbruster <armbru@redhat.com> wrote:
>> Blue Swirl <blauwirbel@gmail.com> writes:
>>
>>> On Fri, Jun 29, 2012 at 3:34 PM, Markus Armbruster <armbru@redhat.com> wrote:
>>>> Commit f3d54fc4 factored it out of hw/ide.c for reuse.  Sensible,
>>>> except it was put into block.c.  Device-specific functionality should
>>>> be kept in device code, not the block layer.  Move it to
>>>> hw/hd-geometry.c, and make stylistic changes required to keep
>>>> checkpatch.pl happy.
>>>>
>>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>>> ---
>>>>  block.c          |  121 ------------------------------------------
>>>>  block.h          |    1 -
>>>>  blockdev.h       |    5 ++
>>>>  hw/Makefile.objs |    2 +-
>>>>  hw/hd-geometry.c |  153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>  hw/ide/core.c    |    2 +-
>>>>  hw/scsi-disk.c   |    4 +-
>>>>  hw/virtio-blk.c  |    2 +-
>>>>  8 files changed, 163 insertions(+), 127 deletions(-)
>>>>  create mode 100644 hw/hd-geometry.c
>> [...]
>>>> diff --git a/blockdev.h b/blockdev.h
>>>> index 260e16b..7b05945 100644
>>>> --- a/blockdev.h
>>>> +++ b/blockdev.h
>>>> @@ -62,4 +62,9 @@ void qmp_change_blockdev(const char *device, const char *filename,
>>>>                          bool has_format, const char *format, Error **errp);
>>>>  void do_commit(Monitor *mon, const QDict *qdict);
>>>>  int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
>>>> +
>>>> +/* Hard disk geometry */
>>>> +void hd_geometry_guess(BlockDriverState *bs,
>>>> +                       int *pcyls, int *pheads, int *psecs);
>>>
>>> I'd move this to a separate header under hw/.
>>
>> hw/hd-geometry.h?  Or a header collecting shared block device model
>> code, say hw/block-common.h?
> 
> I'd be happy with either.

I think block-common.h is better. We don't have that much block layer
specific guest-side code that it would make sense to split it up.

>>>> diff --git a/hw/hd-geometry.c b/hw/hd-geometry.c
>>>> new file mode 100644
>>>> index 0000000..9b22e3f
>>>> --- /dev/null
>>>> +++ b/hw/hd-geometry.c
>>>> @@ -0,0 +1,153 @@
>>>> +/*
>>>> + * Hard disk geometry utilities
>>>> + *
>>>> + * Copyright (c) 2003 Fabrice Bellard
>>>> + *
>>>> + * Permission is hereby granted, free of charge, to any person obtaining a copy
>>>> + * of this software and associated documentation files (the "Software"), to deal
>>>> + * in the Software without restriction, including without limitation the rights
>>>> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>>>> + * copies of the Software, and to permit persons to whom the Software is
>>>> + * furnished to do so, subject to the following conditions:
>>>> + *
>>>> + * The above copyright notice and this permission notice shall be included in
>>>> + * all copies or substantial portions of the Software.
>>>> + *
>>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
>>>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>>>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>>>> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>>>> + * THE SOFTWARE.
>>>> + */
>>
>> By the way, X11 license.  I'd very much prefer to put my contributions
>> under GPLv2+.  Is there an acceptable way to do that?
> 
> IANAL, but isn't MIT license compatible with GPL?

IANAL either, but as I understand it:

It is, otherwise distributing qemu would be illegal. But compatibility
means more or less that you can mix them within one project, it doesn't
mean you can convert from one to the other.

> Then maybe you could
> license your contributions under GPLv2+, for example with the same
> statement as GPLv2 to GPLv2+:
> "Contributions after 2012-mm-dd are licensed under the terms of the
> GNU GPL, version 2 or (at your option) any later version."
> 
> Though after that, the file would be dual licensed. Those who want to
> use the MIT version can use the file before the change.

This might be possible. (Though true dual-licensing would mean that the
whole code, including new parts, can be used under either license. This
isn't what we would be doing.) Or have a GPL header and after that add a
notice like "Portions of the code are licensed under the following
conditions: <old license header>".

In any case it's pretty clear to me that you're not allowed to drop the
MIT license header (and therefore blockdev.c still needs a fix)

Kevin

  reply	other threads:[~2012-07-04  8:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340984094-5451-1-git-send-email-armbru@redhat.com>
     [not found] ` <1340984094-5451-19-git-send-email-armbru@redhat.com>
2012-07-02 12:55   ` [Qemu-devel] [PATCH 18/32] hd-geometry: Switch to uint32_t to match BlockConf Stefan Hajnoczi
2012-07-02 13:07     ` Andreas Färber
2012-07-02 14:15       ` Markus Armbruster
2012-07-02 14:34         ` Stefan Hajnoczi
2012-07-03 19:11           ` Blue Swirl
2012-07-03 20:15             ` Andreas Färber
2012-07-04 16:19               ` Paolo Bonzini
2012-07-04 16:36                 ` Eric Blake
2012-07-05 18:37                   ` Blue Swirl
2012-07-05 18:30               ` Blue Swirl
     [not found] ` <1340984094-5451-9-git-send-email-armbru@redhat.com>
     [not found]   ` <CAAu8pHsKC6QMrhjUADiXT8DUrhy9HzbkN8pbYeWjM2aAE38ZwQ@mail.gmail.com>
     [not found]     ` <m3k3ypmjqu.fsf@blackfin.pond.sub.org>
2012-07-03 18:40       ` [Qemu-devel] [PATCH 08/32] hd-geometry: Move disk geometry guessing back from block.c Blue Swirl
2012-07-04  8:24         ` Kevin Wolf [this message]
     [not found] ` <1340984094-5451-4-git-send-email-armbru@redhat.com>
     [not found]   ` <CAAu8pHtQORnuc2G8DiWTt1QcWOKbp7L8WJ=P7HMMZCNV7L-NRQ@mail.gmail.com>
2012-07-04 15:17     ` [Qemu-devel] [PATCH 03/32] vvfat: Fix partition table Kevin Wolf
2012-07-05  9:23       ` Markus Armbruster
2012-07-05  9:55         ` Kevin Wolf
2012-07-05 11:10           ` Markus Armbruster
2012-07-05 11:14             ` Kevin Wolf
     [not found] ` <1340984094-5451-5-git-send-email-armbru@redhat.com>
2012-07-04 15:23   ` [Qemu-devel] [PATCH 04/32] vvfat: Do not clobber the user's geometry Kevin Wolf
2012-07-04 16:25     ` Paolo Bonzini
2012-07-05  7:06       ` Kevin Wolf
2012-07-05  9:16         ` Markus Armbruster
2012-07-05 11:13     ` Markus Armbruster
     [not found] ` <1340984094-5451-6-git-send-email-armbru@redhat.com>
2012-07-05  8:29   ` [Qemu-devel] [PATCH 05/32] qtest: Tidy up temporary files properly Kevin Wolf
2012-07-05  9:27     ` Markus Armbruster
     [not found] ` <1340984094-5451-14-git-send-email-armbru@redhat.com>
2012-07-05  9:16   ` [Qemu-devel] [PATCH 13/32] hd-geometry: Clean up confusing use of prior translation hint Kevin Wolf
2012-07-05  9:28     ` Markus Armbruster
     [not found] ` <1340984094-5451-23-git-send-email-armbru@redhat.com>
2012-07-05 11:33   ` [Qemu-devel] [PATCH 22/32] qtest: Cover qdev properties for disk geometry Kevin Wolf
2012-07-05 12:08     ` Markus Armbruster
     [not found] ` <1340984094-5451-33-git-send-email-armbru@redhat.com>
2012-07-05 15:27   ` [Qemu-devel] [PATCH 32/32] Relax IDE CHS limits from 16383, 16, 63 to 65535, 16, 255 Kevin Wolf
2012-07-05 16:20     ` Markus Armbruster
2012-07-05 16:39       ` Markus Armbruster
2012-07-06  8:50         ` Kevin Wolf
2012-07-11 13:10           ` Markus Armbruster
2012-07-06 14:50       ` Alexander Graf
2012-07-06 18:15         ` Markus Armbruster
2012-07-06  6:57 [Qemu-devel] [PATCH 00/32] Disk geometry cleanup Markus Armbruster
2012-07-06  6:57 ` [Qemu-devel] [PATCH 08/32] hd-geometry: Move disk geometry guessing back from block.c Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FF3FDCA.3020608@redhat.com \
    --to=kwolf@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.