)]}'
{
  "commit": "85ef06d1d252f6a2e73b678591ab71caad4667bb",
  "tree": "dc5cbc4f2e54f5b5b3f8653a595799e5fe0f2f18",
  "parents": [
    "04bf7869ca0fd12009aee301cac2264a36df4d98"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Fri Jul 01 16:17:47 2011 +0200"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "jaxboe@fusionio.com",
    "time": "Fri Jul 01 16:17:47 2011 +0200"
  },
  "message": "block: flush MEDIA_CHANGE from drivers on close(2)\n\nCurrently, only open(2) is defined as the \u0027clearing\u0027 point.  It has\ntwo roles - first, it\u0027s an acknowledgement from userland indicating\nthat the event has been received and kernel can clear pending states\nand proceed to generate more events.  Secondly, it\u0027s passed on to\ndevice drivers as a hint indicating that a synchronization point has\nbeen reached and it might want to take a deeper look at the device.\n\nThe latter currently is only used by sr which uses two different\nmechanisms - GET_EVENT_MEDIA_STATUS_NOTIFICATION and TEST_UNIT_READY\nto discover events, where the former is lighter weight and safe to be\nused repeatedly but may not provide full coverage.  Among other\nthings, GET_EVENT can\u0027t detect media removal while TUR can.\n\nThis patch makes close(2) - blkdev_put() - indicate clearing hint for\nMEDIA_CHANGE to drivers.  disk_check_events() is renamed to\ndisk_flush_events() and updated to take @mask for events to flush\nwhich is or\u0027d to ev-\u003eclearing and will be passed to the driver on the\nnext -\u003echeck_events() invocation.\n\nThis change makes sr generate MEDIA_CHANGE when media is ejected from\nuserland - e.g. with eject(1).\n\nNote: Given the current usage, it seems @clearing hint is needlessly\ncomplex.  disk_clear_events() can simply clear all events and the hint\ncan be boolean @flush.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Kay Sievers \u003ckay.sievers@vrfy.org\u003e\nSigned-off-by: Jens Axboe \u003cjaxboe@fusionio.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "82d97c3594a8ace6ddd757d22669a750a223fa35",
      "old_mode": 33188,
      "old_path": "block/genhd.c",
      "new_id": "fbd7605a5865dec674b190104fadaa7061672d19",
      "new_mode": 33188,
      "new_path": "block/genhd.c"
    },
    {
      "type": "modify",
      "old_id": "610e8e0b04b88946721eb58b78791bab0e72440b",
      "old_mode": 33188,
      "old_path": "fs/block_dev.c",
      "new_id": "6ff7f070016f7d8e77e6965b86fa6d63c1bcab34",
      "new_mode": 33188,
      "new_path": "fs/block_dev.c"
    },
    {
      "type": "modify",
      "old_id": "300d7582006e49f6ea08a3df09fc9070748c5256",
      "old_mode": 33188,
      "old_path": "include/linux/genhd.h",
      "new_id": "02fa4697a0e51b679d8b3962e87a919541956a1f",
      "new_mode": 33188,
      "new_path": "include/linux/genhd.h"
    }
  ]
}
