From: Anand Jain <anajain.sg@gmail.com>
To: Disha Goel <disgoel@linux.ibm.com>, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, ritesh.list@gmail.com,
ojaswin@linux.ibm.com, djwong@kernel.org, fdmanana@kernel.org,
quwenruo.btrfs@gmx.com, zlang@kernel.org
Subject: Re: [PATCH v2 1/2] common/dmlogwrites: add _require_log_writes_sized helper
Date: Tue, 5 May 2026 07:43:32 +0800 [thread overview]
Message-ID: <683ddd4b-d811-4d6e-a348-6918a10fbab8@gmail.com> (raw)
In-Reply-To: <3cc304b6-0069-4cb8-b3c2-a15d0365cde3@gmail.com>
On 5/5/26 07:16, Anand Jain wrote:
>
>
> On 5/5/26 05:53, Anand Jain wrote:
>>
>> looks good.
>>
>> Reviewed-by: Anand Jain <asj@kernel.org>
>>
>> Thanks
>>
>
> sorry, not yet; I'm canceling the RVB.
> Details below.
>
>
>> v2:
>> - Renamed function from _require_logwrites_size to
> _require_log_writes_sized
>> - Added documentation comment clarifying the parameter is in KB
>> - Made function call _require_log_writes() internally to avoid redundant
>> calls in test code
>
>
> This change log should be below the Signed-off-by "---"
>
>
>> Suggested-by: Darrick J. Wong <djwong@kernel.org>
>> Suggested-by: Anand Jain <anajain.sg@gmail.com>
>> Signed-off-by: Disha Goel <disgoel@linux.ibm.com>
>> ---
>
> ... v2 changes here...
>
>
>> common/dmlogwrites | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/common/dmlogwrites b/common/dmlogwrites
>> index a27e1966..0925b333 100644
>> --- a/common/dmlogwrites
>> +++ b/common/dmlogwrites
>> @@ -14,6 +14,21 @@ _require_log_writes()
>> _require_test_program "log-writes/replay-log"
>> }
>>
>> +# Require a log writes device of a minimum size
>> +# $1: minimum size in KB
>> +_require_log_writes_sized()
>> +{
>> + local size=$1
>> +
>> + [ $# -eq 1 ] || _fail "_require_log_writes_sized: expected
> size param"
>> +
>> + _require_log_writes
>> +
>> + local devsize=$(_get_device_size $LOGWRITES_DEV)
>
> Please keep all declarations at the beginning of the function.
>
>> + [ $devsize -lt $1 ] && \
>
> use $size instead of $1 and
>
> $devsize and $size units are different, 512 sectors vs KiB
My bad, devsize is also in KiB. So this is fine.
>
>> + _notrun "LOGWRITES_DEV too small, ${devsize}KB <
> ${size}KB"
>> +}
>> +
>
> $devsize is not in KB and $size is in KiB
This is fine as well.
Thanks, Anand
prev parent reply other threads:[~2026-05-04 23:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 12:25 [PATCH v2 1/2] common/dmlogwrites: add _require_log_writes_sized helper Disha Goel
2026-04-27 12:25 ` [PATCH v2 2/2] btrfs/291: fix state transition logic and add size requirement Disha Goel
2026-05-05 2:46 ` Anand Jain
2026-05-08 14:52 ` Disha Goel
2026-05-04 21:53 ` [PATCH v2 1/2] common/dmlogwrites: add _require_log_writes_sized helper Anand Jain
2026-05-04 23:16 ` Anand Jain
2026-05-04 23:43 ` Anand Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=683ddd4b-d811-4d6e-a348-6918a10fbab8@gmail.com \
--to=anajain.sg@gmail.com \
--cc=disgoel@linux.ibm.com \
--cc=djwong@kernel.org \
--cc=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=ritesh.list@gmail.com \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox