summaryrefslogtreecommitdiff
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-10-19 16:59:12 +0300
committerRichard Weinberger <richard@nod.at>2016-12-13 01:07:38 +0300
commitd63d61c16972c667d770f713c21aa04e2c0489d2 (patch)
tree9e40aed759c90f2435d36ea98a2ddbfed4c0e811 /fs/ubifs/sb.c
parentcc41a536524fba126ab11c41a866cf9037adbaf8 (diff)
downloadlinux-d63d61c16972c667d770f713c21aa04e2c0489d2.tar.xz
ubifs: Implement UBIFS_FLG_DOUBLE_HASH
This feature flag indicates that all directory entry nodes have a 32bit cookie set and therefore UBIFS is allowed to perform lookups by hash. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/sb.c')
-rw-r--r--fs/ubifs/sb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 3cbb904a6d7d..4a2b4c361587 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -163,6 +163,7 @@ static int create_default_filesystem(struct ubifs_info *c)
tmp64 = (long long)max_buds * c->leb_size;
if (big_lpt)
sup_flags |= UBIFS_FLG_BIGLPT;
+ sup_flags |= UBIFS_FLG_DOUBLE_HASH;
sup->ch.node_type = UBIFS_SB_NODE;
sup->key_hash = UBIFS_KEY_HASH_R5;
@@ -620,6 +621,7 @@ int ubifs_read_superblock(struct ubifs_info *c)
memcpy(&c->uuid, &sup->uuid, 16);
c->big_lpt = !!(sup_flags & UBIFS_FLG_BIGLPT);
c->space_fixup = !!(sup_flags & UBIFS_FLG_SPACE_FIXUP);
+ c->double_hash = !!(sup_flags & UBIFS_FLG_DOUBLE_HASH);
/* Automatically increase file system size to the maximum size */
c->old_leb_cnt = c->leb_cnt;