)]}'
{
  "commit": "fb235dc06fac9eaa4408ade9c8b20d45d63c89b7",
  "tree": "2bd827b257ac580b31097fa13a98bab3a0162c9e",
  "parents": [
    "15b34517a6368c607ae7fd51c24cdc69efcd47fc"
  ],
  "author": {
    "name": "Qu Wenruo",
    "email": "quwenruo@cn.fujitsu.com",
    "time": "Wed Feb 15 10:43:03 2017 +0800"
  },
  "committer": {
    "name": "David Sterba",
    "email": "dsterba@suse.com",
    "time": "Fri Feb 17 12:03:55 2017 +0100"
  },
  "message": "btrfs: qgroup: Move half of the qgroup accounting time out of commit trans\n\nJust as Filipe pointed out, the most time consuming parts of qgroup are\nbtrfs_qgroup_account_extents() and\nbtrfs_qgroup_prepare_account_extents().\nWhich both call btrfs_find_all_roots() to get old_roots and new_roots\nulist.\n\nWhat makes things worse is, we\u0027re calling that expensive\nbtrfs_find_all_roots() at transaction committing time with\nTRANS_STATE_COMMIT_DOING, which will blocks all incoming transaction.\n\nSuch behavior is necessary for @new_roots search as current\nbtrfs_find_all_roots() can\u0027t do it correctly so we do call it just\nbefore switch commit roots.\n\nHowever for @old_roots search, it\u0027s not necessary as such search is\nbased on commit_root, so it will always be correct and we can move it\nout of transaction committing.\n\nThis patch moves the @old_roots search part out of\ncommit_transaction(), so in theory we can half the time qgroup time\nconsumption at commit_transaction().\n\nBut please note that, this won\u0027t speedup qgroup overall, the total time\nconsumption is still the same, just reduce the performance stall.\n\nCc: Filipe Manana \u003cfdmanana@suse.com\u003e\nSigned-off-by: Qu Wenruo \u003cquwenruo@cn.fujitsu.com\u003e\nReviewed-by: Filipe Manana \u003cfdmanana@suse.com\u003e\nSigned-off-by: David Sterba \u003cdsterba@suse.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a1b9ef2dfc4a9e55ee13bdcf0c67af2e73d21472",
      "old_mode": 33188,
      "old_path": "fs/btrfs/delayed-ref.c",
      "new_id": "6eb80952efb3310ae55de9c2e234319abe14465a",
      "new_mode": 33188,
      "new_path": "fs/btrfs/delayed-ref.c"
    },
    {
      "type": "modify",
      "old_id": "a48bf546fc91d197ea49393b54c801688678ffcc",
      "old_mode": 33188,
      "old_path": "fs/btrfs/qgroup.c",
      "new_id": "a5da750c1087fdc118e3ba696962260a9a761fc6",
      "new_mode": 33188,
      "new_path": "fs/btrfs/qgroup.c"
    },
    {
      "type": "modify",
      "old_id": "ee95f456a61f115b8d2cca21da12278c45a788f4",
      "old_mode": 33188,
      "old_path": "fs/btrfs/qgroup.h",
      "new_id": "26932a8a19930bc48ff14ad3c154a7326ce3a111",
      "new_mode": 33188,
      "new_path": "fs/btrfs/qgroup.h"
    }
  ]
}
