)]}'
{
  "commit": "2e6883bdf49abd0e7f0d9b6297fc3be7ebb2250b",
  "tree": "aec0418150413c7e9f43fb2ec68bfd24738b0623",
  "parents": [
    "1f7decf6d9f06dac008b8d66935c0c3b18e564f9"
  ],
  "author": {
    "name": "Fengguang Wu",
    "email": "wfg@mail.ustc.edu.cn",
    "time": "Tue Oct 16 23:30:43 2007 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Wed Oct 17 08:43:02 2007 -0700"
  },
  "message": "writeback: introduce writeback_control.more_io to indicate more io\n\nAfter making dirty a 100M file, the normal behavior is to start the writeback\nfor all data after 30s delays.  But sometimes the following happens instead:\n\n\t- after 30s:    ~4M\n\t- after 5s:     ~4M\n\t- after 5s:     all remaining 92M\n\nSome analyze shows that the internal io dispatch queues goes like this:\n\n\t\ts_io            s_more_io\n\t\t-------------------------\n\t1)\t100M,1K         0\n\t2)\t1K              96M\n\t3)\t0               96M\n\n1) initial state with a 100M file and a 1K file\n2) 4M written, nr_to_write \u003c\u003d 0, so write more\n3) 1K written, nr_to_write \u003e 0, no more writes(BUG)\n\nnr_to_write \u003e 0 in (3) fools the upper layer to think that data have all been\nwritten out.  The big dirty file is actually still sitting in s_more_io.  We\ncannot simply splice s_more_io back to s_io as soon as s_io becomes empty, and\nlet the loop in generic_sync_sb_inodes() continue: this may starve newly\nexpired inodes in s_dirty.  It is also not an option to draw inodes from both\ns_more_io and s_dirty, an let the loop go on: this might lead to live locks,\nand might also starve other superblocks in sync time(well kupdate may still\nstarve some superblocks, that\u0027s another bug).\n\nWe have to return when a full scan of s_io completes.  So nr_to_write \u003e 0 does\nnot necessarily mean that \"all data are written\".  This patch introduces a\nflag writeback_control.more_io to indicate this situation.  With it the big\ndirty file no longer has to wait for the next kupdate invocation 5s later.\n\nCc: David Chinner \u003cdgc@sgi.com\u003e\nCc: Ken Chen \u003ckenchen@google.com\u003e\nSigned-off-by: Fengguang Wu \u003cwfg@mail.ustc.edu.cn\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "414df43706c739c18e75fee1475630fb8519d880",
      "old_mode": 33188,
      "old_path": "fs/fs-writeback.c",
      "new_id": "71c158ac60a3f9ed55ff25a74792ef8e3fc551f1",
      "new_mode": 33188,
      "new_path": "fs/fs-writeback.c"
    },
    {
      "type": "modify",
      "old_id": "52be879793ed9213058efb7a0f4c18788be6de63",
      "old_mode": 33188,
      "old_path": "include/linux/writeback.h",
      "new_id": "1200868a5dee19ade9498c85364d007e7fdbc253",
      "new_mode": 33188,
      "new_path": "include/linux/writeback.h"
    },
    {
      "type": "modify",
      "old_id": "33485213158810d5b50879556cb76c268faa4b68",
      "old_mode": 33188,
      "old_path": "mm/page-writeback.c",
      "new_id": "bcdbbf6c4a85e727de84a6df9f5cb02958fffe44",
      "new_mode": 33188,
      "new_path": "mm/page-writeback.c"
    }
  ]
}
