* [PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items.
@ 2017-10-11 1:55 Gu Jinxiang
2017-10-11 7:41 ` Nikolay Borisov
0 siblings, 1 reply; 2+ messages in thread
From: Gu Jinxiang @ 2017-10-11 1:55 UTC (permalink / raw)
To: linux-btrfs; +Cc: Gu JinXiang
From: Gu JinXiang <gujx@cn.fujitsu.com>
Fix bug of
<f8f84b2dfda5> (<btrfs: index check-integrity state hash by a dev_t>).
Description of this bug:
Use MOUNT_OPTIONS="-o check_int" when run xfstest, device can not be
mount successfully. So xfstest can not run.
Signed-off-by: Gu JinXiang <gujx@cn.fujitsu.com>
---
fs/btrfs/check-integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 9d3854839038..86d79bc4cfb3 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -613,7 +613,7 @@ static void btrfsic_dev_state_hashtable_add(
struct btrfsic_dev_state_hashtable *h)
{
const unsigned int hashval =
- (((unsigned int)((uintptr_t)ds->bdev)) &
+ (((unsigned int)((uintptr_t)ds->bdev->bd_dev)) &
(BTRFSIC_DEV2STATE_HASHTABLE_SIZE - 1));
list_add(&ds->collision_resolving_node, h->table + hashval);
--
2.13.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items.
2017-10-11 1:55 [PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items Gu Jinxiang
@ 2017-10-11 7:41 ` Nikolay Borisov
0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Borisov @ 2017-10-11 7:41 UTC (permalink / raw)
To: Gu Jinxiang, linux-btrfs
On 11.10.2017 04:55, Gu Jinxiang wrote:
> From: Gu JinXiang <gujx@cn.fujitsu.com>
>
> Fix bug of
> <f8f84b2dfda5> (<btrfs: index check-integrity state hash by a dev_t>).
>
> Description of this bug:
> Use MOUNT_OPTIONS="-o check_int" when run xfstest, device can not be
> mount successfully. So xfstest can not run.
You haven't described what causes the bug but rather how to reproduce it
? Describe what is the difference between using ->bdev and bdev->bd_dev.
And how using one or the other affects the integrity checks and why
those checks fail.
>
> Signed-off-by: Gu JinXiang <gujx@cn.fujitsu.com>
> ---
> fs/btrfs/check-integrity.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
> index 9d3854839038..86d79bc4cfb3 100644
> --- a/fs/btrfs/check-integrity.c
> +++ b/fs/btrfs/check-integrity.c
> @@ -613,7 +613,7 @@ static void btrfsic_dev_state_hashtable_add(
> struct btrfsic_dev_state_hashtable *h)
> {
> const unsigned int hashval =
> - (((unsigned int)((uintptr_t)ds->bdev)) &
> + (((unsigned int)((uintptr_t)ds->bdev->bd_dev)) &
> (BTRFSIC_DEV2STATE_HASHTABLE_SIZE - 1));
>
> list_add(&ds->collision_resolving_node, h->table + hashval);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-11 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 1:55 [PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items Gu Jinxiang
2017-10-11 7:41 ` Nikolay Borisov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.