diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-10 09:26:32 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-11 03:52:07 -0500 |
commit | 2bcf002159c2aedd5c0ab5a21c3ea73fec87ff8d (patch) | |
tree | a3218befd44eb549cc915044e23c85c6bacf5986 | |
parent | cce3f612fedcbeee61977497b99bbf68a4082b6b (diff) |
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: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r-- | Documentation/filesystems/ubifs.txt | 4 | ||||
-rw-r--r-- | fs/ubifs/super.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt index 12fedb7834c6..d7b13b01e980 100644 --- a/Documentation/filesystems/ubifs.txt +++ b/Documentation/filesystems/ubifs.txt | |||
@@ -82,12 +82,12 @@ Mount options | |||
82 | bulk_read read more in one go to take advantage of flash | 82 | bulk_read read more in one go to take advantage of flash |
83 | media that read faster sequentially | 83 | media that read faster sequentially |
84 | no_bulk_read (*) do not bulk-read | 84 | no_bulk_read (*) do not bulk-read |
85 | no_chk_data_crc skip checking of CRCs on data nodes in order to | 85 | no_chk_data_crc (*) skip checking of CRCs on data nodes in order to |
86 | improve read performance. Use this option only | 86 | improve read performance. Use this option only |
87 | if the flash media is highly reliable. The effect | 87 | if the flash media is highly reliable. The effect |
88 | of this option is that corruption of the contents | 88 | of this option is that corruption of the contents |
89 | of a file can go unnoticed. | 89 | of a file can go unnoticed. |
90 | chk_data_crc (*) do not skip checking CRCs on data nodes | 90 | chk_data_crc do not skip checking CRCs on data nodes |
91 | compr=none override default compressor and set it to "none" | 91 | compr=none override default compressor and set it to "none" |
92 | compr=lzo override default compressor and set it to "lzo" | 92 | compr=lzo override default compressor and set it to "lzo" |
93 | compr=zlib override default compressor and set it to "zlib" | 93 | compr=zlib override default compressor and set it to "zlib" |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index e9585ad90f5e..1da5155a1bea 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -1977,6 +1977,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) | |||
1977 | INIT_LIST_HEAD(&c->old_buds); | 1977 | INIT_LIST_HEAD(&c->old_buds); |
1978 | INIT_LIST_HEAD(&c->orph_list); | 1978 | INIT_LIST_HEAD(&c->orph_list); |
1979 | INIT_LIST_HEAD(&c->orph_new); | 1979 | INIT_LIST_HEAD(&c->orph_new); |
1980 | c->no_chk_data_crc = 1; | ||
1980 | 1981 | ||
1981 | c->vfs_sb = sb; | 1982 | c->vfs_sb = sb; |
1982 | c->highest_inum = UBIFS_FIRST_INO; | 1983 | c->highest_inum = UBIFS_FIRST_INO; |