)]}'
{
  "commit": "2e60e02297cf54e367567f2d85b2ca56b1c4a906",
  "tree": "ea824afcaff58be894799a011f74d80c3560f372",
  "parents": [
    "0b302d5aa7975006fa2ec3d66386610b9b36c669"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Thu Apr 23 11:05:18 2009 +0900"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "jens.axboe@oracle.com",
    "time": "Tue Apr 28 07:37:35 2009 +0200"
  },
  "message": "block: clean up request completion API\n\nRequest completion has gone through several changes and became a bit\nmessy over the time.  Clean it up.\n\n1. end_that_request_data() is a thin wrapper around\n   end_that_request_data_first() which checks whether bio is NULL\n   before doing anything and handles bidi completion.\n   blk_update_request() is a thin wrapper around\n   end_that_request_data() which clears nr_sectors on the last\n   iteration but doesn\u0027t use the bidi completion.\n\n   Clean it up by moving the initial bio NULL check and nr_sectors\n   clearing on the last iteration into end_that_request_data() and\n   renaming it to blk_update_request(), which makes blk_end_io() the\n   only user of end_that_request_data().  Collapse\n   end_that_request_data() into blk_end_io().\n\n2. There are four visible completion variants - blk_end_request(),\n   __blk_end_request(), blk_end_bidi_request() and end_request().\n   blk_end_request() and blk_end_bidi_request() uses blk_end_request()\n   as the backend but __blk_end_request() and end_request() use\n   separate implementation in __blk_end_request() due to different\n   locking rules.\n\n   blk_end_bidi_request() is identical to blk_end_io().  Collapse\n   blk_end_io() into blk_end_bidi_request(), separate out request\n   update into internal helper blk_update_bidi_request() and add\n   __blk_end_bidi_request().  Redefine [__]blk_end_request() as thin\n   inline wrappers around [__]blk_end_bidi_request().\n\n3. As the whole request issue/completion usages are about to be\n   modified and audited, it\u0027s a good chance to convert completion\n   functions return bool which better indicates the intended meaning\n   of return values.\n\n4. The function name end_that_request_last() is from the days when it\n   was a public interface and slighly confusing.  Give it a proper\n   internal name - blk_finish_request().\n\n5. Add description explaning that blk_end_bidi_request() can be safely\n   used for uni requests as suggested by Boaz Harrosh.\n\nThe only visible behavior change is from #1.  nr_sectors counts are\ncleared after the final iteration no matter which function is used to\ncomplete the request.  I couldn\u0027t find any place where the code\nassumes those nr_sectors counters contain the values for the last\nsegment and this change is good as it makes the API much more\nconsistent as the end result is now same whether a request is\ncompleted using [__]blk_end_request() alone or in combination with\nblk_update_request().\n\nAPI further cleaned up per Christoph\u0027s suggestion.\n\n[ Impact: cleanup, rq-\u003e*nr_sectors always updated after req completion ]\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Boaz Harrosh \u003cbharrosh@panasas.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2f277ea0e599b6f25cff28c38783c69d486cee1b",
      "old_mode": 33188,
      "old_path": "block/blk-core.c",
      "new_id": "89cc05d9a7a90e9db1a8f7221107bbd6b1cc9420",
      "new_mode": 33188,
      "new_path": "block/blk-core.c"
    },
    {
      "type": "modify",
      "old_id": "1fa9dcf9aa6ad0092f6c94693820fd6d4bb71a42",
      "old_mode": 33188,
      "old_path": "include/linux/blkdev.h",
      "new_id": "501f6845cc73708dc735a6069272fa6f6c5c20fa",
      "new_mode": 33188,
      "new_path": "include/linux/blkdev.h"
    }
  ]
}
