Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Cédric Le Goater
On 11/16/21 10:29, Markus Armbruster wrote: Cédric Le Goater writes: On 11/15/21 16:57, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/15/21 16:57, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Cédric Le Goater
On 11/15/21 16:57, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means bus=0,unit=N, where subsequent calls count N up

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/15/21 16:57, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >>> On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Philippe Mathieu-Daudé
On 11/15/21 16:57, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: >> On 11/15/21 13:55, Markus Armbruster wrote: >>> drive_get_next() is basically a bad idea. It returns the "next" block >>> backend of a certain interface type. "Next" means bus=0,unit=N, where >>> subsequent calls

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/15/21 13:55, Markus Armbruster wrote: >> drive_get_next() is basically a bad idea. It returns the "next" block >> backend of a certain interface type. "Next" means bus=0,unit=N, where >> subsequent calls count N up from zero, per interface type. >> >>

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Philippe Mathieu-Daudé
On 11/15/21 13:55, Markus Armbruster wrote: > drive_get_next() is basically a bad idea. It returns the "next" block > backend of a certain interface type. "Next" means bus=0,unit=N, where > subsequent calls count N up from zero, per interface type. > > This lets you define unit numbers

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 15 Nov 2021 at 12:55, Markus Armbruster wrote: >> >> drive_get_next() is basically a bad idea. It returns the "next" block >> backend of a certain interface type. "Next" means bus=0,unit=N, where >> subsequent calls count N up from zero, per interface type. >>

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Peter Maydell
On Mon, 15 Nov 2021 at 12:55, Markus Armbruster wrote: > > drive_get_next() is basically a bad idea. It returns the "next" block > backend of a certain interface type. "Next" means bus=0,unit=N, where > subsequent calls count N up from zero, per interface type. > > This lets you define unit

[PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means bus=0,unit=N, where subsequent calls count N up from zero, per interface type. This lets you define unit numbers implicitly by execution order. If the order changes, or new