4 /* Default time granularity in nanoseconds */
5 #define DEFAULT_TIME_GRAN 1000000000
7 +static int get_default_compressor(void)
9 + if (ubifs_compr_present(UBIFS_COMPR_LZO))
10 + return UBIFS_COMPR_LZO;
12 + if (ubifs_compr_present(UBIFS_COMPR_ZLIB))
13 + return UBIFS_COMPR_ZLIB;
15 + return UBIFS_COMPR_NONE;
19 * create_default_filesystem - format empty UBI volume.
20 * @c: UBIFS file-system description object
21 @@ -183,7 +194,7 @@ static int create_default_filesystem(str
22 if (c->mount_opts.override_compr)
23 sup->default_compr = cpu_to_le16(c->mount_opts.compr_type);
25 - sup->default_compr = cpu_to_le16(UBIFS_COMPR_LZO);
26 + sup->default_compr = cpu_to_le16(get_default_compressor());
28 generate_random_uuid(sup->uuid);