From: Anand Jain <anand.jain@oracle.com>
To: Boris Burkov <boris@bur.io>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
fstests@vger.kernel.org
Subject: Re: [PATCH v4 2/6] btrfs: quota mode helpers
Date: Fri, 29 Sep 2023 17:11:02 +0800 [thread overview]
Message-ID: <8e038cf1-bd07-bab3-c3f8-0d77f4a5323f@oracle.com> (raw)
In-Reply-To: <2884e54c-9542-fdf7-9746-cfd7d56f5e19@oracle.com>
On 29/09/2023 16:57, Anand Jain wrote:
> On 29/09/2023 07:16, Boris Burkov wrote:
>> To facilitate skipping tests depending on the qgroup mode after mkfs,
>> add support for figuring out the mode. This cannot just rely on the new
>> sysfs file, since it might not be present on older kernels.
>>
>> Signed-off-by: Boris Burkov <boris@bur.io>
>
> Reviewed-by: Anand Jain <anand.jain@oracle.com>
>
>
> Nits Applied locally.
>
>> +_require_scratch_qgroup()
>> +{
>> + _scratch_mkfs >>$seqres.full 2>&1
>> + _scratch_mount
>> + _run_btrfs_util_prog quota enable $SCRATCH_MNT
>
> Some time ago, we stopped using _run_btrfs_util_prog() in favor of > $BTRFS_UTIL_PROG. The idea is that any errors are printed to stdout,
> which is good. However, $BTRFS_UTIL_PROG has a drawback: it doesn't
> print the command used, as run_check() does.
I'm correcting myself: We still use _run_btrfs_util_prog() in less
critical scenarios for quick status checks.
Thx, Anand
>
>
>
>> + _check_regular_qgroup $SCRATCH_DEV || _notrun "not running normal
>> qgroups"
>> + _scratch_unmount
>> +}
>> +
>> +_require_scratch_enable_simple_quota()
>> +{
>> + _scratch_mkfs >>$seqres.full 2>&1
>> + _scratch_mount
>> + _qgroup_mode $SCRATCH_DEV | grep 'squota' && _notrun "cannot
>> enable simple quota; on by default"
>> + $BTRFS_UTIL_PROG quota enable --simple $SCRATCH_MNT || _notrun
>> "simple quotas not available"
>> + _scratch_unmount
>> +}
>
> Fixed lines above 80 chars long.
>
> Thanks, Anand
next prev parent reply other threads:[~2023-09-29 9:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 23:16 [PATCH v4 0/6] btrfs: simple quotas fstests Boris Burkov
2023-09-28 23:16 ` [PATCH v4 1/6] common: refactor sysfs_attr functions Boris Burkov
2023-09-29 8:23 ` Anand Jain
2023-09-28 23:16 ` [PATCH v4 2/6] btrfs: quota mode helpers Boris Burkov
2023-09-29 8:57 ` Anand Jain
2023-09-29 9:11 ` Anand Jain [this message]
2023-09-28 23:16 ` [PATCH v4 3/6] btrfs/301: new test for simple quotas Boris Burkov
2023-09-28 23:16 ` [PATCH v4 4/6] btrfs: quota rescan helpers Boris Burkov
2023-09-29 9:14 ` Anand Jain
2023-09-28 23:16 ` [PATCH v4 5/6] btrfs: use new rescan wrapper Boris Burkov
2023-09-29 9:28 ` Anand Jain
2023-09-28 23:16 ` [PATCH v4 6/6] btrfs: skip squota incompatible tests Boris Burkov
2023-09-29 9:37 ` Anand Jain
2023-09-29 9:42 ` Anand Jain
2023-09-29 16:57 ` Boris Burkov
2023-09-29 17:28 ` Boris Burkov
2023-09-29 17:43 ` [PATCH] btrfs: fix rescan helper Boris Burkov
2023-09-30 9:37 ` Anand Jain
2023-09-30 9:45 ` [PATCH v4 0/6] btrfs: simple quotas fstests Anand Jain
2023-10-05 8:08 ` Anand Jain
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=8e038cf1-bd07-bab3-c3f8-0d77f4a5323f@oracle.com \
--to=anand.jain@oracle.com \
--cc=boris@bur.io \
--cc=fstests@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.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;
as well as URLs for NNTP newsgroup(s).