Re: [PATCH 01/18] block: Make blk_{pread, pwrite}() return 0 on success

2022-07-04 Thread Alberto Faria
On Mon, Jul 4, 2022 at 2:52 PM Hanna Reitz wrote: > There are a couple of places where you decided to replace “*len” > variables that used to store the return value by a plain “ret”. That > seems good to me, given how these functions no longer return length > values, but you haven’t done so consis

Re: [PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success

2022-07-04 Thread Hanna Reitz
On 17.05.22 13:35, Alberto Faria wrote: They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes ar

Re: [PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 12:35:07PM +0100, Alberto Faria wrote: > They currently return the value of their 'bytes' parameter on success. > > Make them return 0 instead, for consistency with other I/O functions and > in preparation to implement them using generated_co_wrapper. This also > makes it c

Re: [PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success

2022-05-17 Thread Greg Kurz
On Tue, 17 May 2022 12:35:07 +0100 Alberto Faria wrote: > They currently return the value of their 'bytes' parameter on success. > > Make them return 0 instead, for consistency with other I/O functions and > in preparation to implement them using generated_co_wrapper. This also > makes it clear

[PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success

2022-05-17 Thread Alberto Faria
They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes are not possible. Signed-off-by: Alberto Fa