Re: [PATCH] block: Use a GString in bdrv_perm_names()

2020-01-14 Thread Philippe Mathieu-Daudé
On 1/10/20 6:15 PM, Alberto Garcia wrote: This is a bit more efficient than having to allocate and free memory for each new permission. The default size (30) is enough for "consistent read, write, resize". Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6 inserti

Re: [PATCH] block: Use a GString in bdrv_perm_names()

2020-01-14 Thread Max Reitz
On 10.01.20 18:15, Alberto Garcia wrote: > This is a bit more efficient than having to allocate and free memory > for each new permission. > > The default size (30) is enough for "consistent read, write, resize". > > Signed-off-by: Alberto Garcia > --- > block.c | 11 ++- > 1 file chang

Re: [PATCH] block: Use a GString in bdrv_perm_names()

2020-01-10 Thread Eric Blake
On 1/10/20 11:15 AM, Alberto Garcia wrote: This is a bit more efficient than having to allocate and free memory for each new permission. The default size (30) is enough for "consistent read, write, resize". Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6 insert

[PATCH] block: Use a GString in bdrv_perm_names()

2020-01-10 Thread Alberto Garcia
This is a bit more efficient than having to allocate and free memory for each new permission. The default size (30) is enough for "consistent read, write, resize". Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/block.c b