)]}'
{
  "commit": "c5025c25527641923bc54bc76f0c422764857bd0",
  "tree": "b5a6c70b7ec036d163c7e2c6d469ed01a6889878",
  "parents": [
    "11ff6971edb5e92960559ec33e7d1b6742708b92"
  ],
  "author": {
    "name": "Hao Jiang",
    "email": "jianghao@google.com",
    "time": "Mon Mar 30 21:57:29 2026 +0000"
  },
  "committer": {
    "name": "Muhammad Usama Chaudhry",
    "email": "muhammadusama@google.com",
    "time": "Wed Jul 29 10:10:20 2026 -0700"
  },
  "message": "nvmedevice: fix tight event cycle grace period race conditions\n\nThis commit resolves two race conditions that could bypass the tight\nevent cycle grace period mitigation:\n\n1. Ghost Callback Race: A `Degraded` or `Removed` event could be processed\n   immediately after the grace period timer expires but before the ASIO\n   queue executes the timer callback. Relying solely on `recovering` was\n   insufficient (especially for `Removed` events), leading to an unwanted\n   NVMe interface start on a device that was just stopped.\n2. Consecutive Available Bypass: Back-to-back `Available` events during\n   the grace period bypassed the `recovering` boolean logic and immediately\n   started the interface, completely negating the grace period.\n\nBoth race conditions are now closed by introducing a `gracePeriodActive`\nstate variable. We now safely verify this state within the async timer\ncallback before starting the device, and explicitly ignore consecutive\n`Available` events when the ASIO timer is actively running.\n\nTesting:\n- Added `consecutiveAvailableBypass` unit test to verify that consecutive\n  `Available` events do not bypass the grace period timer.\n\nTested: all unitest passed\nChange-Id: Iced289dd4da6692dc3353e4814228eacaa6f2c97\nSigned-off-by: Hao Jiang \u003cjianghao@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "98877b5f113190a618f5f071d53c6946fbda31a0",
      "old_mode": 33188,
      "old_path": "src/NVMeDevice.cpp",
      "new_id": "dcce6de3a338800db683718eae03b80f30bf3428",
      "new_mode": 33188,
      "new_path": "src/NVMeDevice.cpp"
    },
    {
      "type": "modify",
      "old_id": "feb40d75f1f74960cf59abcefeb3be476315a78a",
      "old_mode": 33188,
      "old_path": "src/NVMeDevice.hpp",
      "new_id": "fe1952f543aa3376a4a327e8841786307c0dee46",
      "new_mode": 33188,
      "new_path": "src/NVMeDevice.hpp"
    },
    {
      "type": "modify",
      "old_id": "00f471483881492e0b56e96462761144feaf0f74",
      "old_mode": 33188,
      "old_path": "tests/test_nvme_mi_recovery.cpp",
      "new_id": "0065e8e77c81871eb6db0872f199293d9a42ff0f",
      "new_mode": 33188,
      "new_path": "tests/test_nvme_mi_recovery.cpp"
    }
  ]
}
