aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorMikulas Patocka <[email protected]>2023-06-26 16:46:00 +0200
committerMike Snitzer <[email protected]>2023-06-27 16:02:18 -0400
commitda8b4fc1f63a01a0eca9338ae338b804c437b51f (patch)
treed4b671cee1d6c6e28a52a760d6757d9deaa1319c /lib/mpi/mpi-bit.c
parent6d50eb4725934fd22f5eeccb401000687c790fd0 (diff)
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 <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions