]> git.baikalelectronics.ru Git - kernel.git/commit
dm space map common: memcpy the disk root to ensure it's arch aligned
authorJoe Thornber <ejt@redhat.com>
Thu, 19 Nov 2015 13:03:36 +0000 (13:03 +0000)
committerMike Snitzer <snitzer@redhat.com>
Thu, 16 Feb 2017 18:02:54 +0000 (13:02 -0500)
commitae54d3ff2e5f25fb6fbcdb2290d101507ae2bfa9
tree163e9a4f68dd4ffddf87ba4b3f92dd67a39a56ef
parentab87554972dcfcb12135665430c84c191761d54f
dm space map common: memcpy the disk root to ensure it's arch aligned

The metadata_space_map_root passed to sm_ll_open_metadata() may or may
not be arch aligned, use memcpy to ensure it is.  This is not a fast
path so the extra memcpy doesn't hurt us.

Long-term it'd be better to use the kernel's alignment infrastructure to
remove the memcpy()s that are littered across persistent-data (btree,
array, space-maps, etc).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/persistent-data/dm-space-map-common.c