aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ubifs.h
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-09-04 09:26:00 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-30 04:12:56 -0400
commit2953e73f1ce4b3284b409aefb9d46bbde6515c37 (patch)
tree56126c6a589bd0450eb288db6a93946e50e5bc29 /fs/ubifs/ubifs.h
parent4793e7c5e1c88382ead18db5ca072bac54467318 (diff)
UBIFS: add no_chk_data_crc mount option
UBIFS read performance can be improved by skipping the CRC check when data nodes are read. This option can be used if the underlying media is considered to be highly reliable. Note that CRCs are always checked for metadata. Read speed on Arm platform with OneNAND goes from 19 MiB/s to 27 MiB/s with data CRC checking disabled. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r--fs/ubifs/ubifs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 8513239ea8a..d6ae3f7b2b0 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -894,10 +894,12 @@ struct ubifs_orphan {
894 * struct ubifs_mount_opts - UBIFS-specific mount options information. 894 * struct ubifs_mount_opts - UBIFS-specific mount options information.
895 * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast) 895 * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast)
896 * @bulk_read: enable bulk-reads 896 * @bulk_read: enable bulk-reads
897 * @chk_data_crc: check CRCs when reading data nodes
897 */ 898 */
898struct ubifs_mount_opts { 899struct ubifs_mount_opts {
899 unsigned int unmount_mode:2; 900 unsigned int unmount_mode:2;
900 unsigned int bulk_read:2; 901 unsigned int bulk_read:2;
902 unsigned int chk_data_crc:2;
901}; 903};
902 904
903/** 905/**
@@ -1001,6 +1003,9 @@ struct ubifs_mount_opts {
1001 * @bulk_read: enable bulk-reads 1003 * @bulk_read: enable bulk-reads
1002 * @bulk_read_buf_size: buffer size for bulk-reads 1004 * @bulk_read_buf_size: buffer size for bulk-reads
1003 * 1005 *
1006 * @no_chk_data_crc: do not check CRCs when reading data nodes (except during
1007 * recovery)
1008 *
1004 * @dirty_pg_cnt: number of dirty pages (not used) 1009 * @dirty_pg_cnt: number of dirty pages (not used)
1005 * @dirty_zn_cnt: number of dirty znodes 1010 * @dirty_zn_cnt: number of dirty znodes
1006 * @clean_zn_cnt: number of clean znodes 1011 * @clean_zn_cnt: number of clean znodes
@@ -1138,6 +1143,7 @@ struct ubifs_mount_opts {
1138 * @rcvrd_mst_node: recovered master node to write when mounting ro to rw 1143 * @rcvrd_mst_node: recovered master node to write when mounting ro to rw
1139 * @size_tree: inode size information for recovery 1144 * @size_tree: inode size information for recovery
1140 * @remounting_rw: set while remounting from ro to rw (sb flags have MS_RDONLY) 1145 * @remounting_rw: set while remounting from ro to rw (sb flags have MS_RDONLY)
1146 * @always_chk_crc: always check CRCs (while mounting and remounting rw)
1141 * @mount_opts: UBIFS-specific mount options 1147 * @mount_opts: UBIFS-specific mount options
1142 * 1148 *
1143 * @dbg_buf: a buffer of LEB size used for debugging purposes 1149 * @dbg_buf: a buffer of LEB size used for debugging purposes
@@ -1244,6 +1250,8 @@ struct ubifs_info {
1244 int bulk_read; 1250 int bulk_read;
1245 int bulk_read_buf_size; 1251 int bulk_read_buf_size;
1246 1252
1253 int no_chk_data_crc;
1254
1247 atomic_long_t dirty_pg_cnt; 1255 atomic_long_t dirty_pg_cnt;
1248 atomic_long_t dirty_zn_cnt; 1256 atomic_long_t dirty_zn_cnt;
1249 atomic_long_t clean_zn_cnt; 1257 atomic_long_t clean_zn_cnt;
@@ -1374,6 +1382,7 @@ struct ubifs_info {
1374 struct ubifs_mst_node *rcvrd_mst_node; 1382 struct ubifs_mst_node *rcvrd_mst_node;
1375 struct rb_root size_tree; 1383 struct rb_root size_tree;
1376 int remounting_rw; 1384 int remounting_rw;
1385 int always_chk_crc;
1377 struct ubifs_mount_opts mount_opts; 1386 struct ubifs_mount_opts mount_opts;
1378 1387
1379#ifdef CONFIG_UBIFS_FS_DEBUG 1388#ifdef CONFIG_UBIFS_FS_DEBUG
@@ -1416,7 +1425,7 @@ int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len,
1416int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum, 1425int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum,
1417 int offs, int dtype); 1426 int offs, int dtype);
1418int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, 1427int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum,
1419 int offs, int quiet); 1428 int offs, int quiet, int chk_crc);
1420void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad); 1429void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad);
1421void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last); 1430void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last);
1422int ubifs_io_init(struct ubifs_info *c); 1431int ubifs_io_init(struct ubifs_info *c);