Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bcf0021 authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

UBIFS: do not check data crc by default

Change the default UBIFS behavior WRT data CRC checking. Currently,
UBIFS checks data CRC when reading, which slows it down quite a bit,
and this is the default option. However, it looks like in average
user does not need this feature and would prefer faster read speed
over extra reliability. And this seems to be de-facto standard that
file-systems do not check data CRC every time they read from the
media.

Thus, make UBIFS default behavior so that it does not check data
CRC. This corresponds to the no_chk_data_crc mount option. Those users
who need extra protection can always enable it using the chk_data_crc
option.

Please, read more information about this feature here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_checksumming



Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent cce3f612
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -82,12 +82,12 @@ Mount options
bulk_read		read more in one go to take advantage of flash
bulk_read		read more in one go to take advantage of flash
			media that read faster sequentially
			media that read faster sequentially
no_bulk_read (*)	do not bulk-read
no_bulk_read (*)	do not bulk-read
no_chk_data_crc		skip checking of CRCs on data nodes in order to
no_chk_data_crc (*)	skip checking of CRCs on data nodes in order to
			improve read performance. Use this option only
			improve read performance. Use this option only
			if the flash media is highly reliable. The effect
			if the flash media is highly reliable. The effect
			of this option is that corruption of the contents
			of this option is that corruption of the contents
			of a file can go unnoticed.
			of a file can go unnoticed.
chk_data_crc (*)	do not skip checking CRCs on data nodes
chk_data_crc		do not skip checking CRCs on data nodes
compr=none              override default compressor and set it to "none"
compr=none              override default compressor and set it to "none"
compr=lzo               override default compressor and set it to "lzo"
compr=lzo               override default compressor and set it to "lzo"
compr=zlib              override default compressor and set it to "zlib"
compr=zlib              override default compressor and set it to "zlib"
+1 −0
Original line number Original line Diff line number Diff line
@@ -1977,6 +1977,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
	INIT_LIST_HEAD(&c->old_buds);
	INIT_LIST_HEAD(&c->old_buds);
	INIT_LIST_HEAD(&c->orph_list);
	INIT_LIST_HEAD(&c->orph_list);
	INIT_LIST_HEAD(&c->orph_new);
	INIT_LIST_HEAD(&c->orph_new);
	c->no_chk_data_crc = 1;


	c->vfs_sb = sb;
	c->vfs_sb = sb;
	c->highest_inum = UBIFS_FIRST_INO;
	c->highest_inum = UBIFS_FIRST_INO;