qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() p


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order
Date: Fri, 27 May 2022 17:44:26 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

On 5/19/22 17:48, Alberto Faria wrote:
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.

Callers were updated using this Coccinelle script:

     @@ expression child, offset, buf, bytes, flags; @@
     - bdrv_pread(child, offset, buf, bytes, flags)
     + bdrv_pread(child, offset, bytes, buf, flags)

     @@ expression child, offset, buf, bytes, flags; @@
     - bdrv_pwrite(child, offset, buf, bytes, flags)
     + bdrv_pwrite(child, offset, bytes, buf, flags)

     @@ expression child, offset, buf, bytes, flags; @@
     - bdrv_pwrite_sync(child, offset, buf, bytes, flags)
     + bdrv_pwrite_sync(child, offset, bytes, buf, flags)

Resulting overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria<afaria@redhat.com>
Reviewed-by: Paolo Bonzini<pbonzini@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

Checking also, that we covered all occurrences:

git grep '\(bdrv_pread\|bdrv_pwrite\|bdrv_pwrite_sync\)([^)]' | wc -l
174
git show --format= | grep  '^[ 
+].*\(bdrv_pread\|bdrv_pwrite\|bdrv_pwrite_sync\)([^)]' | wc -l
174

(last exclusion of ')' is to ignore things like "bdrv_pwrite()" in comments)

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]