aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉrico Nogueira <ericonr@disroot.org>2020-04-12 18:34:35 -0300
committerJaegeuk Kim <jaegeuk@kernel.org>2020-05-06 07:41:06 -0700
commitf8f14b9c0f8f6a7913b5fda0f01d4313ccb32852 (patch)
tree215df376049f5f7f5596ab6778925536e35c54c2
parent88d1bd9615c2d3fb37ba45f30feba8b75d2e9307 (diff)
downloadf2fs-tools-f8f14b9c0f8f6a7913b5fda0f01d4313ccb32852.tar.gz
mkfs.f2fs: update manual and help message
Add options that were missing from the mkfs.f2fs man page, and explain them more thoroughly when possible. Special care was given to document all the features that can be enabled during the creation of the filesystem. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--man/mkfs.f2fs.8141
-rw-r--r--mkfs/f2fs_format_main.c12
2 files changed, 124 insertions, 29 deletions
diff --git a/man/mkfs.f2fs.8 b/man/mkfs.f2fs.8
index f9484eb..022941f 100644
--- a/man/mkfs.f2fs.8
+++ b/man/mkfs.f2fs.8
@@ -13,20 +13,30 @@ mkfs.f2fs \- create an F2FS file system
]
[
.B \-c
-.I device
+.I device-list
]
[
.B \-d
-.I debugging-level
+.I debug-level
]
[
.B \-e
.I extension-list
]
[
+.B \-E
+.I extension-list
+]
+[
.B \-f
]
[
+.B \-g
+]
+[
+.B \-i
+]
+[
.B \-l
.I volume-label
]
@@ -42,6 +52,10 @@ mkfs.f2fs \- create an F2FS file system
.I feature-list
]
[
+.B \-C
+.I encoding:flags
+]
+[
.B \-q
]
[
@@ -53,17 +67,23 @@ mkfs.f2fs \- create an F2FS file system
.I #-of-segments-per-section
]
[
+.B \-S
+]
+[
.B \-t
.I nodiscard/discard
]
[
.B \-w
-.I specific sector_size for target sectors
+.I wanted-sector-size
]
[
.B \-z
.I #-of-sections-per-zone
]
+[
+.B \-V
+]
.I device
.I [sectors]
.SH DESCRIPTION
@@ -84,45 +104,113 @@ If the value is equal to 1, each of active log areas are initially
assigned separately according to the whole volume size.
The default value is 1.
.TP
-.BI \-c " device"
-Build f2fs with this device additionally, so that user can see all
-the devices as one big volume.
+.BI \-c " device-list"
+Build f2fs with these additional comma separated devices, so that the user can
+see all the devices as one big volume.
+Supports up to 7 devices except meta device.
.TP
.BI \-d " debug-level"
Specify the level of debugging options.
The default number is 0, which shows basic debugging messages.
.TP
.BI \-e " extension-list"
-Specify a file extension list in order f2fs to treat them as cold files.
-The data of files having those extensions will be stored to the cold log.
-The default list includes most of multimedia file extensions such as jpg, gif,
-mpeg, mkv, and so on.
+Specify a list of file extensions that f2fs will treat as cold files.
+The data of files with those extensions will be stored in the cold log.
+The default list includes most of the multimedia file extensions such as
+jpg, gif, mpeg, mkv, and so on.
+.TP
+.BI \-E " extension-list"
+Specify a list of file extensions that f2fs will treat as hot files.
+The data of files with those extensions will be stored in the hot log.
+The default list includes database file extensions, such as db.
.TP
.BI \-f
Force overwrite when an existing filesystem is detected on the device.
By default, mkfs.f2fs will not write to the device if it suspects that
there is a filesystem or partition table on the device already.
.TP
+.BI \-g
+Add default Android options.
+.TP
+.BI \-i
+Enable extended node bitmap.
.BI \-l " volume-label"
Specify the volume label to the partition mounted as F2FS.
.TP
.BI \-m
Specify f2fs filesystem to supports the block zoned feature.
-Without it, the filesystem isn't supports the feature.
+Without it, the filesystem doesn't support the feature.
.TP
.BI \-o " overprovision-ratio-percentage"
-Specify the percentage over the volume size for overprovision area. This area
-is hidden to users, and utilized by F2FS cleaner. If not specified, the best
-number will be assigned automatically accoring to the partition size.
+Specify the percentage of the volume that will be used as overprovision area.
+This area is hidden to users, and utilized by F2FS cleaner. If not specified, the
+best number will be assigned automatically according to the partition size.
.TP
.BI \-O " feature-list"
-Specify a feature list like feature1[feature2,feature3,...] in order f2fs
-filesystem will supports.
-e.g "encrypt" and so on.
+Set additional features for the filesystem. Features are comma separated, and
+the flag can be repeated. The following features are supported:
+.RS 1.2i
+.TP 1.2i
+.B encrypt
+Enable support for filesystem level encryption.
+.TP
+.B extra_attr
+Enable extra attr feature, required for some of the other features.
+.TP
+.B project_quota
+Enable project ID tracking. This is used for projet quota accounting. Requires extra attr.
+.TP
+.B inode_checksum
+Enable inode checksum. Requires extra attr.
+.TP
+.B flexible_inline_xattr
+Enable flexible inline xattr. Requires extra attr.
+.TP
+.B quota
+Enable quotas.
+.TP
+.B inode_crtime
+Enable inode creation time feature. Requires extra attr.
+.TP
+.B lost_found
+Enable lost+found feature.
+.TP
+.B verity
+Reserved feature.
+.TP
+.B sb_checksum
+Enable superblock checksum.
+.TP
+.B casefold
+Enable casefolding support in the filesystem. Optional flags can be passed with
+.B \-C
+.TP
+.B compression
+Enable support for filesystem level compression. Requires extra attr.
+.RE
+.TP
+.BI \-C " encoding:flags"
+Support casefolding with a specific encoding, with optional comma separated flags.
+.RS 1.2i
+.TP 1.2i
+.I encoding:
+.RS 1.2i
+.TP 1.2i
+.B utf8
+Use UTF-8 for casefolding.
+.RE
+.I flags:
+.RS 1.2i
+.TP 1.2i
+.B strict
+This flag specifies that invalid strings should be rejected by the filesystem.
+Default is disabled.
+.RE
+.RE
.TP
.BI \-q
Quiet mode.
-With it, mkfs.f2fs does not show any messages include the basic messages.
+With it, mkfs.f2fs does not show any messages, including the basic messages.
.TP
.BI \-R
Give root_owner option for initial uid/gid assignment.
@@ -133,13 +221,15 @@ Specify the number of segments per section. A section consists of
multiple consecutive segments, and is the unit of garbage collection.
The default number is 1, which means one segment is assigned to a section.
.TP
-.BI \-t " nodiscard/discard"
-Specify 1 or 0 to enable/disable discard policy.
-If the value is equal to 1, discard policy is enabled, otherwise is disable.
+.BI \-S
+Enable sparse mode.
+.TP
+.BI \-t " 1/0"
+Specify 1 or 0 to enable or disable discard policy, respectively.
The default value is 1.
.TP
-.BI \-w "sector-size"
-Specify the sector size in bytes along with given target sectors.
+.BI \-w " wanted-sector-size"
+Specify the sector size in bytes.
Without it, the sectors will be calculated by device sector size.
.TP
.BI \-z " #-of-sections-per-zone"
@@ -147,6 +237,11 @@ Specify the number of sections per zone. A zone consists of multiple sections.
F2FS allocates segments for active logs with separated zones as much as possible.
The default number is 1, which means a zone consists of one section.
.TP
+.BI sectors
+Number of sectors. Default is determined by device size.
+.TP
+.BI \-V
+Print the version number and exit.
.SH AUTHOR
This version of
.B mkfs.f2fs
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index d68fc65..204a410 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -44,17 +44,18 @@ static void mkfs_usage()
MSG(0, "\nUsage: mkfs.f2fs [options] device [sectors]\n");
MSG(0, "[options]:\n");
MSG(0, " -a heap-based allocation [default:0]\n");
- MSG(0, " -c [device path] up to 7 devices excepts meta device\n");
+ MSG(0, " -c device1[,device2,...] up to 7 additional devices, except meta device\n");
MSG(0, " -d debug level [default:0]\n");
MSG(0, " -e [cold file ext list] e.g. \"mp3,gif,mov\"\n");
MSG(0, " -E [hot file ext list] e.g. \"db\"\n");
- MSG(0, " -f force overwrite the exist filesystem\n");
+ MSG(0, " -f force overwrite of the existing filesystem\n");
MSG(0, " -g add default options\n");
MSG(0, " -i extended node bitmap, node ratio is 20%% by default\n");
MSG(0, " -l label\n");
MSG(0, " -m support zoned block device [default:0]\n");
- MSG(0, " -o overprovision ratio [default:5]\n");
- MSG(0, " -O feature1[feature2,feature3,...] e.g. \"encrypt\"\n");
+ MSG(0, " -o overprovision percentage [default:auto]\n");
+ MSG(0, " -O feature1[,feature2,...] e.g. \"encrypt\"\n");
+ MSG(0, " -C [encoding[:flag1,...]] Support casefolding with optional flags\n");
MSG(0, " -q quiet mode\n");
MSG(0, " -R root_owner [default: 0:0]\n");
MSG(0, " -s # of segments per section [default:1]\n");
@@ -63,8 +64,7 @@ static void mkfs_usage()
MSG(0, " -w wanted sector size\n");
MSG(0, " -z # of sections per zone [default:1]\n");
MSG(0, " -V print the version number and exit\n");
- MSG(0, "sectors: number of sectors. [default: determined by device size]\n");
- MSG(0, " -C [encoding:flag1,flag2] Support casefolding with optional flags\n");
+ MSG(0, "sectors: number of sectors [default: determined by device size]\n");
exit(1);
}