mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: jaegeuk@kernel.org, chao@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: f2fs: add F2FS_IOC_SET_COMPRESS_OPTION_V2 ioctl
Date: Thu,  2 Feb 2023 17:01:24 +0800	[thread overview]
Message-ID: <20230202090124.68518-1-frank.li@vivo.com> (raw)
In-Reply-To: <c179d808-66ee-a4b5-b3f1-91ba336a68ca@kernel.org>

> It looks using union may simply the implementation, but readability of new structure
> becomes worse, since this structure will be exposed to user as an uapi interface, I
> guess we'd better to consider more about its readability, thought?

How about use the following structure?

struct f2fs_comp_option_v2 {
	__u8 algorithm;
	__u8 log_cluster_size;
	__u8 compress_level;
};

For the F2FS_IOC_SET_COMPRESS_OPTION_V2 command, algorithm, log_cluster_size
and compress_level can be controlled.

For compress file checksum, let's add a pair of ioctl controls?

Thx,
Yangtao

  reply	other threads:[~2023-02-02  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 13:35 [PATCH 2/3] " Yangtao Li
2023-01-13  4:24 ` kernel test robot
2023-01-28 10:34 ` Chao Yu
2023-02-02  9:01   ` Yangtao Li [this message]
2023-01-22 15:00 [PATCH v2 1/2] " Yangtao Li
2023-01-22 15:36 ` Yangtao Li
2023-01-22 15:38 ` Yangtao Li

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=20230202090124.68518-1-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=chao@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

all inboxes | Powered by JetHome®