Mikulas Patocka da8b4fc1f6 dm integrity: only allocate recalculate buffer when needed
dm-integrity preallocated 8MiB buffer for recalculating in the
constructor and freed it in the destructor. This wastes memory when
the user has many dm-integrity devices.

Fix dm-integrity so that the buffer is only allocated when
recalculation is in progress; allocate the buffer at the beginning of
integrity_recalc() and free it at the end.

Note that integrity_recalc() doesn't hold any locks when allocating
the buffer, so it shouldn't cause low-memory deadlock.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
2023-06-27 16:02:18 -04:00
..
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2022-08-02 14:38:59 -07:00
2023-06-13 15:25:39 -07:00
2023-06-13 15:25:39 -07:00
2023-06-13 15:25:39 -07:00
2023-06-13 15:25:39 -07:00
2023-06-13 15:25:39 -07:00
2023-06-13 15:25:39 -07:00