]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Use bd_dev to generate index when dev_state_hashtable add items.
authorGu JinXiang <gujx@cn.fujitsu.com>
Wed, 11 Oct 2017 08:44:27 +0000 (16:44 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:28:01 +0000 (12:28 +0100)
commitc69e83ef1c7b1f15861c42ae7badf9cefa9f1434
tree6400bcd2a44b88c3df0d5fa86b5b73347b007fcc
parent83e73e9d4d1bb19442512c47e5423cb1c2890a63
btrfs: Use bd_dev to generate index when dev_state_hashtable add items.

Fix missing change from commit 1bc385ab1ff0
("btrfs: index check-integrity state hash by a dev_t").

Function btrfsic_dev_state_hashtable_lookup uses dev_t to generate hashval
when look in up a btrfsic_dev_state in hash table. So when we add a
btrfsic_dev_state into the hash table, it should also use dev_t.

Reproducer of this bug:
Use MOUNT_OPTIONS="-o check_int" when running xfstest, device can not be
mounted successfully. So xfstest can not run.

Signed-off-by: Gu JinXiang <gujx@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c