From: Josef Bacik <josef@toxicpanda.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Cc: dsterba@suse.com
Subject: Re: [PATCH v8 3/3] btrfs: create read policy sysfs attribute, pid
Date: Wed, 21 Oct 2020 10:42:15 -0400 [thread overview]
Message-ID: <78f8abc7-d7de-77be-6e4a-81beb683fced@toxicpanda.com> (raw)
In-Reply-To: <806bf3aaa5cb0243dd2cea6bb79e5ac9ae347111.1602756068.git.anand.jain@oracle.com>
On 10/20/20 10:02 AM, Anand Jain wrote:
> Add
>
> /sys/fs/btrfs/UUID/read_policy
>
> attribute so that the read policy for the raid1, raid1c34 and raid10 can
> be tuned.
>
> When this attribute is read, it shall show all available policies, with
> active policy being with in [ ]. The read_policy attribute can be written
> using one of the items listed in there.
>
> For example:
> $cat /sys/fs/btrfs/UUID/read_policy
> [pid]
> $echo pid > /sys/fs/btrfs/UUID/read_policy
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> rebase on latest misc-next
> v5:
> Title rename: old: btrfs: sysfs, add read_policy attribute
> Uses the btrfs_strmatch() helper (BTRFS_READ_POLICY_NAME_MAX dropped).
> Use the table for the policy names.
> Rename len to ret.
> Use a simple logic to prefix space in btrfs_read_policy_show()
> Reviewed-by: Josef Bacik <josef@toxicpanda.com> dropped.
>
> v4:-
> v3: rename [by_pid] to [pid]
> v2: v2: check input len before strip and kstrdup
>
> fs/btrfs/sysfs.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index eb0b2bfcce67..07a1a57b2df2 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -886,6 +886,54 @@ static int btrfs_strmatch(const char *given, const char *golden)
> return -EINVAL;
> }
>
> +static const char* const btrfs_read_policy_name[] = { "pid" };
This fails checkpatch.pl, it should be
static const char * const. Thanks,
Josef
next prev parent reply other threads:[~2020-10-21 14:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 14:02 [PATCH v8 0/3] readmirror feature (read_policy sysfs and Anand Jain
2020-10-20 14:02 ` [PATCH v8 1/3] btrfs: add btrfs_strmatch helper Anand Jain
2020-10-21 14:44 ` Josef Bacik
2020-10-22 7:40 ` Anand Jain
2020-10-20 14:02 ` [PATCH v8 2/3] btrfs: create read policy framework Anand Jain
2020-10-21 14:46 ` Josef Bacik
2020-10-20 14:02 ` [PATCH v8 3/3] btrfs: create read policy sysfs attribute, pid Anand Jain
2020-10-21 14:42 ` Josef Bacik [this message]
2020-10-22 7:40 ` Anand Jain
2020-10-20 14:22 ` [PATCH v8 0/3] readmirror feature (read_policy sysfs and in-memory only approach) 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=78f8abc7-d7de-77be-6e4a-81beb683fced@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=anand.jain@oracle.com \
--cc=dsterba@suse.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