Re: [Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-14 Thread Markus Armbruster
John Snow writes: > On 08/14/2014 03:12 AM, Markus Armbruster wrote: >> >> I'd prefer if (s->drive_kind == IDE_CFATA) ... else ..., because it >> avoids the double negative. > > OK. This is how cmd_identify delegates. For matters of style I usually > try to defer to nearby code. > >> >> Your code

Re: [Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-14 Thread John Snow
On 08/14/2014 03:12 AM, Markus Armbruster wrote: I'd prefer if (s->drive_kind == IDE_CFATA) ... else ..., because it avoids the double negative. OK. This is how cmd_identify delegates. For matters of style I usually try to defer to nearby code. Your code duplicates the parts of the func

Re: [Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-14 Thread Markus Armbruster
John Snow writes: > Currently, if the block device backing the IDE drive is resized, > the information about the device as cached inside of the IDEState > structure is not updated, thus when a guest OS re-queries the drive, > it is unable to see the expanded size. > > This patch adds a resize cal

[Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-13 Thread John Snow
Currently, if the block device backing the IDE drive is resized, the information about the device as cached inside of the IDEState structure is not updated, thus when a guest OS re-queries the drive, it is unable to see the expanded size. This patch adds a resize callback that updates the IDENTIFY