From: Eric Biggers <ebiggers@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: clean up /sys/fs/f2fs/<disk>/features
Date: Thu, 3 Jun 2021 22:10:48 -0700 [thread overview]
Message-ID: <YLm12A7qKFyYYU0Z@sol.localdomain> (raw)
In-Reply-To: <YLmvIH/wVeKwSPCN@google.com>
On Thu, Jun 03, 2021 at 09:42:08PM -0700, Jaegeuk Kim wrote:
> enum feat_id {
> FEAT_CRYPTO = 0,
> FEAT_BLKZONED,
> @@ -587,6 +601,7 @@ enum feat_id {
> FEAT_RO,
> FEAT_TEST_DUMMY_ENCRYPTION_V2,
> FEAT_ENCRYPTED_CASEFOLD,
> + FEAT_PIN_FILE,
> };
>
> static ssize_t f2fs_feature_show(struct f2fs_attr *a,
> @@ -610,6 +625,7 @@ static ssize_t f2fs_feature_show(struct f2fs_attr *a,
> case FEAT_RO:
> case FEAT_TEST_DUMMY_ENCRYPTION_V2:
> case FEAT_ENCRYPTED_CASEFOLD:
> + case FEAT_PIN_FILE:
> return sprintf(buf, "supported\n");
> }
> return 0;
There's no need for the feat_id enum to exist. If f2fs_feature_show() just
always printed "supported\n", it will do the right thing.
Also, adding pin_file probably should be a separate patch. That seems to be a
bug fix, as pin_file was mistakenly added to the per-sb feature list instead of
to the kernel feature list?
> +static ssize_t f2fs_sb_feature_show(struct f2fs_attr *a,
> + struct f2fs_sb_info *sbi, char *buf)
> +{
> + if (F2FS_MATCH_FEATURE(sbi, a->id))
> + return sprintf(buf, "supported\n");
> + return sprintf(buf, "unsupported\n");
> +}
This can just use F2FS_HAS_FEATURE(), provided that encrypted_casefold isn't
included here, which it shouldn't be (as discussed elsewhere).
- Eric
next prev parent reply other threads:[~2021-06-04 5:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 22:08 [PATCH] f2fs: clean up /sys/fs/f2fs/<disk>/features Jaegeuk Kim
2021-06-04 0:40 ` [f2fs-dev] " Eric Biggers
2021-06-04 4:41 ` Jaegeuk Kim
2021-06-04 4:42 ` [PATCH v2] " Jaegeuk Kim
2021-06-04 5:10 ` Eric Biggers [this message]
2021-06-04 5:34 ` [f2fs-dev] " Jaegeuk Kim
2021-06-04 5:49 ` [f2fs-dev] [PATCH v3] " Jaegeuk Kim
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=YLm12A7qKFyYYU0Z@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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