)]}'
{
  "commit": "6628bc74f1aa9c35dd386320bf7ec04f12edb1b3",
  "tree": "c51e82966384fcdda25594372197d80fcb6a649b",
  "parents": [
    "2a643ec67f9efc4b6921a3dd6e257f3b5360622b"
  ],
  "author": {
    "name": "Artem Bityutskiy",
    "email": "Artem.Bityutskiy@nokia.com",
    "time": "Fri Aug 27 09:15:09 2010 +0200"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "jaxboe@fusionio.com",
    "time": "Fri Aug 27 09:16:18 2010 +0200"
  },
  "message": "writeback: do not lose wakeup events when forking bdi threads\n\nThis patch fixes the following issue:\n\nINFO: task mount.nfs4:1120 blocked for more than 120 seconds.\n\"echo 0 \u003e /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\nmount.nfs4    D 00000000fffc6a21     0  1120   1119 0x00000000\n ffff880235643948 0000000000000046 ffffffff00000000 ffffffff00000000\n ffff880235643fd8 ffff880235314760 00000000001d44c0 ffff880235643fd8\n 00000000001d44c0 00000000001d44c0 00000000001d44c0 00000000001d44c0\nCall Trace:\n [\u003cffffffff813bc747\u003e] schedule_timeout+0x34/0xf1\n [\u003cffffffff813bc530\u003e] ? wait_for_common+0x3f/0x130\n [\u003cffffffff8106b50b\u003e] ? trace_hardirqs_on+0xd/0xf\n [\u003cffffffff813bc5c3\u003e] wait_for_common+0xd2/0x130\n [\u003cffffffff8104159c\u003e] ? default_wake_function+0x0/0xf\n [\u003cffffffff813beaa0\u003e] ? _raw_spin_unlock+0x26/0x2a\n [\u003cffffffff813bc6bb\u003e] wait_for_completion+0x18/0x1a\n [\u003cffffffff81101a03\u003e] sync_inodes_sb+0xca/0x1bc\n [\u003cffffffff811056a6\u003e] __sync_filesystem+0x47/0x7e\n [\u003cffffffff81105798\u003e] sync_filesystem+0x47/0x4b\n [\u003cffffffff810e7ffd\u003e] generic_shutdown_super+0x22/0xd2\n [\u003cffffffff810e80f8\u003e] kill_anon_super+0x11/0x4f\n [\u003cffffffffa00d06d7\u003e] nfs4_kill_super+0x3f/0x72 [nfs]\n [\u003cffffffff810e7b68\u003e] deactivate_locked_super+0x21/0x41\n [\u003cffffffff810e7fd6\u003e] deactivate_super+0x40/0x45\n [\u003cffffffff810fc66c\u003e] mntput_no_expire+0xb8/0xed\n [\u003cffffffff810fc73b\u003e] release_mounts+0x9a/0xb0\n [\u003cffffffff810fc7bb\u003e] put_mnt_ns+0x6a/0x7b\n [\u003cffffffffa00d0fb2\u003e] nfs_follow_remote_path+0x19a/0x296 [nfs]\n [\u003cffffffffa00d11ca\u003e] nfs4_try_mount+0x75/0xaf [nfs]\n [\u003cffffffffa00d1790\u003e] nfs4_get_sb+0x276/0x2ff [nfs]\n [\u003cffffffff810e7dba\u003e] vfs_kern_mount+0xb8/0x196\n [\u003cffffffff810e7ef6\u003e] do_kern_mount+0x48/0xe8\n [\u003cffffffff810fdf68\u003e] do_mount+0x771/0x7e8\n [\u003cffffffff810fe062\u003e] sys_mount+0x83/0xbd\n [\u003cffffffff810089c2\u003e] system_call_fastpath+0x16/0x1b\n\nThe reason of this hang was a race condition: when the flusher thread is\nforking a bdi thread, we use \u0027kthread_run()\u0027, so we run it _before_ we make it\nvisible in \u0027bdi-\u003ewb.task\u0027. The bdi thread runs, does all works, and goes sleep.\n\u0027bdi-\u003ewb.task\u0027 is still NULL. And this is a dangerous time window.\n\nIf at this time someone queues a work for this bdi, he does not see the bdi\nthread and wakes up the forker thread instead! But the forker has already\nforked this bdi thread, but just did not make it visible yet!\n\nThe result is that we lose the wake up event for this bdi thread and the NFS4\ncode waits forever.\n\nTo fix the problem, we should use \u0027ktrhead_create()\u0027 for creating bdi threads,\nthen make them visible in \u0027bdi-\u003ewb.task\u0027, and only after this wake them up.\nThis is exactly what this patch does.\n\nSigned-off-by: Artem Bityutskiy \u003cArtem.Bityutskiy@nokia.com\u003e\nSigned-off-by: Jens Axboe \u003cjaxboe@fusionio.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eaa4a5bbe0634390fc802ebffdbad4291fa3b991",
      "old_mode": 33188,
      "old_path": "mm/backing-dev.c",
      "new_id": "c2bf86f470ed0044ab7366d5e6ea95a4aea2adf2",
      "new_mode": 33188,
      "new_path": "mm/backing-dev.c"
    }
  ]
}
