From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 3/3] f2fs_io: show more flags
Date: Wed, 6 May 2020 14:40:50 +0800 [thread overview]
Message-ID: <38429e30-cd8c-6169-2d4f-90e56a9d202f@huawei.com> (raw)
In-Reply-To: <20200502002920.76569-3-jaegeuk@kernel.org>
On 2020/5/2 8:29, Jaegeuk Kim wrote:
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> tools/f2fs_io/f2fs_io.c | 28 ++++++++++++++++++++++++++++
> tools/f2fs_io/f2fs_io.h | 12 ++++++++++++
> 2 files changed, 40 insertions(+)
>
> diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
> index 9be99f0..d1889ff 100644
> --- a/tools/f2fs_io/f2fs_io.c
> +++ b/tools/f2fs_io/f2fs_io.c
> @@ -186,6 +186,10 @@ static void do_set_verity(int argc, char **argv, const struct cmd_desc *cmd)
> "f2fs_io getflags [file]\n\n" \
> "get a flag given the file\n" \
> "flag can show \n" \
> +" encryption\n" \
> +" nocow(pinned)\n" \
> +" inline_data\n" \
> +" verity\n" \
> " casefold\n" \
> " compression\n" \
> " nocompression\n"
> @@ -222,6 +226,30 @@ static void do_getflags(int argc, char **argv, const struct cmd_desc *cmd)
> printf("nocompression");
> exist = 1;
> }
> + if (flag & FS_ENCRYPT_FL) {
> + if (exist)
> + printf(",");
> + printf("encrypt");
> + exist = 1;
> + }
> + if (flag & FS_VERITY_FL) {
> + if (exist)
> + printf(",");
> + printf("verity");
> + exist = 1;
> + }
> + if (flag & FS_INLINE_DATA_FL) {
> + if (exist)
> + printf(",");
> + printf("inline_data");
> + exist = 1;
> + }
> + if (flag & FS_NOCOW_FL) {
> + if (exist)
> + printf(",");
> + printf("nocow(pinned)");
> + exist = 1;
> + }
> if (!exist)
> printf("none");
> printf("\n");
> diff --git a/tools/f2fs_io/f2fs_io.h b/tools/f2fs_io/f2fs_io.h
> index c6ea7ff..2c828bc 100644
> --- a/tools/f2fs_io/f2fs_io.h
> +++ b/tools/f2fs_io/f2fs_io.h
> @@ -110,6 +110,18 @@ typedef u32 __be32;
> #define F2FS_IOC_FSGETXATTR FS_IOC_FSGETXATTR
> #define F2FS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
>
> +#ifndef FS_ENCRYPT_FL
> +#define FS_ENCRYPT_FL 0x00000800 /* Encrypted file */
> +#endif
> +#ifndef FS_VERITY_FL
> +#define FS_VERITY_FL 0x00100000 /* Verity protected inode */
> +#endif
> +#ifndef FS_INLINE_DATA_FL
> +#define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */
/* Inline data regular/symlink */
> +#endif
> +#ifndef FS_NOCOW_FL
> +#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
> +#endif
> #ifndef FS_NOCOMP_FL
> #define FS_NOCOMP_FL 0x00000400 /* Don't compress */
> #endif
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2020-05-06 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 0:29 [f2fs-dev] [PATCH 1/3] f2fs_io: add fsync Jaegeuk Kim
2020-05-02 0:29 ` [f2fs-dev] [PATCH 2/3] f2fs_io: don't give garbage data in upper 32bits Jaegeuk Kim
2020-05-06 6:36 ` Chao Yu
2020-05-02 0:29 ` [f2fs-dev] [PATCH 3/3] f2fs_io: show more flags Jaegeuk Kim
2020-05-06 6:40 ` Chao Yu [this message]
2020-05-06 14:40 ` Jaegeuk Kim
2020-05-06 6:35 ` [f2fs-dev] [PATCH 1/3] f2fs_io: add fsync Chao Yu
2020-05-06 14:39 ` Jaegeuk Kim
2020-05-07 2:45 ` Chao Yu
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=38429e30-cd8c-6169-2d4f-90e56a9d202f@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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).