Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3397b680 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Avoid deadlock when FSTRIM requested at boot."

parents 66b4139d 1783f149
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ import android.os.storage.StorageResultCode;
import android.os.storage.StorageVolume;
import android.os.storage.VolumeInfo;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.ArrayMap;
import android.util.AtomicFile;
import android.util.DebugUtils;
@@ -533,7 +534,11 @@ class MountService extends IMountService.Stub
                    break;
                }
                case H_FSTRIM: {
                    waitForReady();
                    if (!isReady()) {
                        Slog.i(TAG, "fstrim requested, but no daemon connection yet; trying again");
                        sendMessageDelayed(obtainMessage(H_FSTRIM), DateUtils.SECOND_IN_MILLIS);
                    }

                    Slog.i(TAG, "Running fstrim idle maintenance");

                    // Remember when we kicked it off