{"id":3178,"date":"2022-12-20T16:43:43","date_gmt":"2022-12-20T19:43:43","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/f2fs_io-man8\/"},"modified":"2022-12-20T16:43:43","modified_gmt":"2022-12-20T19:43:43","slug":"f2fs_io-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/f2fs_io-man8\/","title":{"rendered":"f2fs_io (man8)"},"content":{"rendered":"<h1 align=\"center\">f2fs_io<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#AVAILABLE COMMANDS\">AVAILABLE COMMANDS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">f2fs_io \u2212 f2fs ioctl utility<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>f2fs_io<\/b> is used to send various commands to the f2fs file system for administrative purposes.<\/p>\n<h2>AVAILABLE COMMANDS <a name=\"AVAILABLE COMMANDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>set_verity<\/b> <i>[file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Set the verity flags associated with the specified file.<\/p>\n<p style=\"margin-left:11%;\"><b>getflags<\/b> <i>[file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Get the flags associated with the specified file.<\/p>\n<p style=\"margin-left:11%;\"><b>setflags<\/b> <i>[flag] [file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Set an f2fs file on specified file. The flag can be casefold, compression, and nocompression.<\/p>\n<p style=\"margin-left:11%;\"><b>shutdown<\/b> <i>shutdown filesystem<\/i><\/p>\n<p style=\"margin-left:22%;\">Freeze and stop all IOs for the file system mounted on <i>dir.<\/i> The level parameter can be:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"2%\">\n<p>0<\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"48%\">\n<p>going down with full sync<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"2%\">\n<p>1<\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"48%\">\n<p>going down with checkpoint only<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"2%\">\n<p>2<\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"48%\">\n<p>going down with no sync<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"2%\">\n<p>3<\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"48%\">\n<p>going down with metadata flush<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"2%\">\n<p>4<\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"48%\">\n<p>going down with fsck mark<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>pinfile<\/b> <i>[get|set] [file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Get or set the pinning status on a file.<\/p>\n<p style=\"margin-left:11%;\"><b>fallocate<\/b> <i>[keep_size] [offset] [length] [file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Request that space be allocated on a file. The <i>keep_size<\/i> parameter can be either 1 or 0.<\/p>\n<p style=\"margin-left:11%;\"><b>write<\/b> <i>[chunk_size in 4kb] [offset in chunk_size] [count] [pattern] [IO] <br \/> [file_path]<\/i><\/p>\n<p style=\"margin-left:22%;\">Write a given pattern to <i>file_path<\/i>. The <i>pattern<\/i> parameter can be:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"6%\">\n<p><b>zero<\/b><\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"8%\">\n<p>zeros<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:29%;\"><b>inc_num<\/b><\/p>\n<p style=\"margin-left:40%;\">incrementing numbers<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"6%\">\n<p><b>rand<\/b><\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"22%\">\n<p>random numbers<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">The <i>IO<\/i> parameter can be:<\/p>\n<p style=\"margin-left:29%;\"><b>buffered<\/b><\/p>\n<p style=\"margin-left:40%;\">buffered I\/O<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"5%\">\n<p><b>dio<\/b><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"15%\">\n<p>direct I\/O<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>read<\/b> <i>[chunk_size in 4kb] [offset in chunk_size] [count] [IO] <br \/> [print_nbytes] [file_path]<\/i><\/p>\n<p style=\"margin-left:22%;\">Read data in <i>file_path<\/i> and print <i>print_nbytes<\/i>. The <i>IO<\/i> options can be:<\/p>\n<p style=\"margin-left:29%;\"><b>buffered<\/b><\/p>\n<p style=\"margin-left:40%;\">buffered I\/O<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"5%\">\n<p><b>dio<\/b><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"15%\">\n<p>direct I\/O<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>fiemap<\/b> <i>[offset in 4kb] [count] [file_path]<\/i><\/p>\n<p style=\"margin-left:22%;\">get block address in file<\/p>\n<p style=\"margin-left:11%;\"><b>gc_urgent<\/b> <i>dev [start|end|run] [time in sec]<\/i><\/p>\n<p style=\"margin-left:22%;\">Start, end, or run gc_urgent for a given time period<\/p>\n<p style=\"margin-left:11%;\"><b>defrag_file<\/b> <i>[start] [length] [file_path]<\/i><\/p>\n<p style=\"margin-left:22%;\">Defragment a file.<\/p>\n<p style=\"margin-left:11%;\"><b>copy<\/b> <i>[-d] [-m] [-s] [src_path] [dst_path]<\/i><\/p>\n<p style=\"margin-left:22%;\">Copy file from src_path to dst_path. The <i>pattern<\/i> parameter can be:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"3%\">\n<p><b>-d<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"45%\">\n<p>use direct I\/O<\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"3%\">\n<p><b>-m<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"45%\">\n<p>use mmap for source file<\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"29%\"><\/td>\n<td width=\"3%\">\n<p><b>-s<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"45%\">\n<p>use sendfile to transfer data<\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>get_cblocks<\/b> <i>[file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Get the number of compressed blocks.<\/p>\n<p style=\"margin-left:11%;\"><b>release_cblocks<\/b> <i>[file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Release compressed blocks to get free space.<\/p>\n<p style=\"margin-left:11%;\"><b>reserve_cblocks<\/b> <i>[file]<\/i><\/p>\n<p style=\"margin-left:22%;\">Reserve free blocks to prepare decompressing blocks in the file.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This version of <b>f2fs_io<\/b> has been written by Jaegeuk Kim <jaegeuk@kernel.org>.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>f2fs_io<\/b> is available from git:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/jaegeuk\/f2fs-tools.git.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  f2fs_io \u2212 f2fs ioctl utility <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,321,4],"class_list":["post-3178","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-f2fs_io","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3178"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3178\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}