)]}'
{
  "commit": "ecdb2e257abc33ae6798d3ccba87bdafa40ef6b6",
  "tree": "497db6a95a9f06270506f6a75354d5df855d5a66",
  "parents": [
    "f7b934c8127deebf4eb56fbe4a4ae0da16b6dbcd"
  ],
  "author": {
    "name": "Kiyoshi Ueda",
    "email": "k-ueda@ct.jp.nec.com",
    "time": "Sat Mar 06 02:29:52 2010 +0000"
  },
  "committer": {
    "name": "Alasdair G Kergon",
    "email": "agk@redhat.com",
    "time": "Sat Mar 06 02:29:52 2010 +0000"
  },
  "message": "dm table: remove dm_get from dm_table_get_md\n\nRemove the dm_get() in dm_table_get_md() because dm_table_get_md() could\nbe called from presuspend/postsuspend, which are called while\nmapped_device is in DMF_FREEING state, where dm_get() is not allowed.\n\nJustification for that is the lifetime of both objects: As far as the\ncurrent dm design/implementation, mapped_device is never freed while\ntargets are doing something, because dm core waits for targets to become\nquiet in dm_put() using presuspend/postsuspend.  So targets should be\nable to touch mapped_device without holding reference count of the\nmapped_device, and we should allow targets to touch mapped_device even\nif it is in DMF_FREEING state.\n\nBackgrounds:\nI\u0027m trying to remove the multipath internal queue, since dm core now has\na generic queue for request-based dm.  In the patch-set, the multipath\ntarget wants to request dm core to start/stop queue.  One of such\nstart/stop requests can happen during postsuspend() while the target\nwaits for pg-init to complete, because the target stops queue when\nstarting pg-init and tries to restart it when completing pg-init.  Since\nqueue belongs to mapped_device, it involves calling dm_table_get_md()\nand dm_put().  On the other hand, postsuspend() is called in dm_put()\nfor mapped_device which is in DMF_FREEING state, and that triggers\nBUG_ON(DMF_FREEING) in the 2nd dm_put().\n\nI had tried to solve this problem by changing only multipath not to\ntouch mapped_device which is in DMF_FREEING state, but I couldn\u0027t and I\ncame up with a question why we need dm_get() in dm_table_get_md().\n\nSigned-off-by: Kiyoshi Ueda \u003ck-ueda@ct.jp.nec.com\u003e\nSigned-off-by: Jun\u0027ichi Nomura \u003cj-nomura@ce.jp.nec.com\u003e\nSigned-off-by: Alasdair G Kergon \u003cagk@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4b22feb01a0c6ced4d850c2e0feba0226d72292f",
      "old_mode": 33188,
      "old_path": "drivers/md/dm-table.c",
      "new_id": "7d70cca585ace66066b9c19b423e7bcaf3ffdd85",
      "new_mode": 33188,
      "new_path": "drivers/md/dm-table.c"
    },
    {
      "type": "modify",
      "old_id": "c7c555a8c7b2ef619ab4671f023a6eb1b8953f33",
      "old_mode": 33188,
      "old_path": "drivers/md/dm-uevent.c",
      "new_id": "6b1e3b61b25eacc469fe17e586c45d7f20687dfe",
      "new_mode": 33188,
      "new_path": "drivers/md/dm-uevent.c"
    },
    {
      "type": "modify",
      "old_id": "aa4e2aa86d490c5aa1af423d23c176ed69c25302",
      "old_mode": 33188,
      "old_path": "drivers/md/dm.c",
      "new_id": "21222f5193fb80f8d1e655c33fd6c7d99271b590",
      "new_mode": 33188,
      "new_path": "drivers/md/dm.c"
    }
  ]
}
