]> git.baikalelectronics.ru Git - kernel.git/commit
md: remove 'idx' from 'struct resync_pages'
authorMing Lei <ming.lei@redhat.com>
Fri, 14 Jul 2017 08:14:42 +0000 (16:14 +0800)
committerShaohua Li <shli@fb.com>
Fri, 21 Jul 2017 19:47:20 +0000 (12:47 -0700)
commit94da74678f085aa2ca0dd07f17d4c99f93cd0cf0
treec1ce4e89348f207fb4e1c572bad3bfd2db4c28b6
parentc8df7d3d8f4e92d95091f5f9b7708fb8274a7e7a
md: remove 'idx' from 'struct resync_pages'

bio_add_page() won't fail for resync bio, and the page index for each
bio is same, so remove it.

More importantly the 'idx' of 'struct resync_pages' is initialized in
mempool allocator function, the current way is wrong since mempool is
only responsible for allocation, we can't use that for initialization.

Suggested-by: NeilBrown <neilb@suse.com>
Reported-by: NeilBrown <neilb@suse.com>
Reported-and-tested-by: Patrick <dto@gmx.net>
Fixes: fc286beeab3b(md: raid10: don't use bio's vec table to manage resync pages)
Fixes: 28e0206aae14(md: raid1: don't use bio's vec table to manage resync pages)
Cc: stable@vger.kernel.org (4.12+)
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.h
drivers/md/raid1.c
drivers/md/raid10.c