storagemenager: Skip fstrim while doing block based checkpoint

Block based chckpointing process runs fstrim. So, in cases where
framework triggered fstrim during post-OTA boot based on the "last
fstrim time", we were trimming the filesystem twice. This is
particularly problematic with checkpointing in progress as it slows down
the system i/o dramatically.

In order to mitigate that scenario, skip the boot time idle
maintenance/fstrim if checkpointing is in progress and we are using
block based checkpointing.

Bug: 120095226
Test: Tested by forcing /data/system/last-fstrim last modified time back
      2 years & manually trigger checkpoint using 'vdc checkpoint startCheckpoint 1'
Signed-off-by: Sandeep Patil <sspatil@google.com>

Change-Id: I78aecf51bd6df1b13e901aea0bb8eaf1bd9269a2
1 file changed