From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: Daniel Rosenberg <drosen@google.com>,
stable@vger.kernel.org, Eric Biggers <ebiggers@google.com>,
Chao Yu <yuchao0@huawei.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/3] f2fs: Advertise encrypted casefolding in sysfs
Date: Fri, 4 Jun 2021 17:32:08 -0700 [thread overview]
Message-ID: <20210605003210.856458-1-jaegeuk@kernel.org> (raw)
From: Daniel Rosenberg <drosen@google.com>
Older kernels don't support encryption with casefolding. This adds
the sysfs entry encrypted_casefold to show support for those combined
features. Support for this feature was originally added by
commit 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption")
Fixes: 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption")
Cc: stable@vger.kernel.org # v5.11+
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/sysfs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 62fbe4f20dd6..4daa6aeb200b 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -583,6 +583,7 @@ enum feat_id {
FEAT_COMPRESSION,
FEAT_RO,
FEAT_TEST_DUMMY_ENCRYPTION_V2,
+ FEAT_ENCRYPTED_CASEFOLD,
};
static ssize_t f2fs_feature_show(struct f2fs_attr *a,
@@ -605,6 +606,7 @@ static ssize_t f2fs_feature_show(struct f2fs_attr *a,
case FEAT_COMPRESSION:
case FEAT_RO:
case FEAT_TEST_DUMMY_ENCRYPTION_V2:
+ case FEAT_ENCRYPTED_CASEFOLD:
return sprintf(buf, "supported\n");
}
return 0;
@@ -709,7 +711,10 @@ F2FS_GENERAL_RO_ATTR(avg_vblocks);
#ifdef CONFIG_FS_ENCRYPTION
F2FS_FEATURE_RO_ATTR(encryption, FEAT_CRYPTO);
F2FS_FEATURE_RO_ATTR(test_dummy_encryption_v2, FEAT_TEST_DUMMY_ENCRYPTION_V2);
+#ifdef CONFIG_UNICODE
+F2FS_FEATURE_RO_ATTR(encrypted_casefold, FEAT_ENCRYPTED_CASEFOLD);
#endif
+#endif /* CONFIG_FS_ENCRYPTION */
#ifdef CONFIG_BLK_DEV_ZONED
F2FS_FEATURE_RO_ATTR(block_zoned, FEAT_BLKZONED);
#endif
@@ -822,7 +827,10 @@ static struct attribute *f2fs_feat_attrs[] = {
#ifdef CONFIG_FS_ENCRYPTION
ATTR_LIST(encryption),
ATTR_LIST(test_dummy_encryption_v2),
+#ifdef CONFIG_UNICODE
+ ATTR_LIST(encrypted_casefold),
#endif
+#endif /* CONFIG_FS_ENCRYPTION */
#ifdef CONFIG_BLK_DEV_ZONED
ATTR_LIST(block_zoned),
#endif
--
2.32.0.rc1.229.g3e70b5a671-goog
next reply other threads:[~2021-06-05 0:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 0:32 Jaegeuk Kim [this message]
2021-06-05 0:32 ` [PATCH 2/3] f2fs: add pin_file in feature list Jaegeuk Kim
2021-06-07 13:57 ` [f2fs-dev] " Chao Yu
2021-06-05 0:32 ` [PATCH 3/3] f2fs: clean up /sys/fs/f2fs/<disk>/features Jaegeuk Kim
2021-06-05 2:02 ` [f2fs-dev] " Eric Biggers
2021-06-06 5:36 ` [PATCH 3/3 v2] " Jaegeuk Kim
2021-06-07 14:00 ` [f2fs-dev] " Chao Yu
2021-06-07 16:58 ` Jaegeuk Kim
2021-06-10 23:09 ` Eric Biggers
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=20210605003210.856458-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=drosen@google.com \
--cc=ebiggers@google.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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