)]}'
{
  "log": [
    {
      "commit": "72ac3c0d7921f943d92d1ef42a549fb52e56817d",
      "tree": "c8825a2b3848f201a2b67b3a2ec0aaf9669f9ed3",
      "parents": [
        "cd023e7b17fe86c530475da210b3348421c40e5f"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed May 23 14:13:11 2012 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed May 30 10:23:36 2012 -0400"
      },
      "message": "Btrfs: convert the inode bit field to use the actual bit operations\n\nMiao pointed this out while I was working on an orphan problem that messing\nwith a bitfield where different ranges are protected by different locks\ndoesn\u0027t work out right.  Turns out we\u0027ve been doing this forever where we\nhave different parts of the bit field protected by either no lock at all or\ndifferent locks which could cause all sorts of weird problems including the\nissue I was hitting.  So instead make a runtime_flags thing that we use the\nnormal bit operations on that are all atomic so we can keep having our\nno/different locking for the different flags and then make force_compress\nit\u0027s own thing so it can be treated normally.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "0c4d2d95d06e920e0c61707e62c7fffc9c57f63a",
      "tree": "5d6fa736c7fea0a0afd60eda8e6e0586df6fb606",
      "parents": [
        "a25c75d5ad04df0a7abd09585231b4021a91a358"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Apr 05 15:03:02 2012 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed May 30 10:23:27 2012 -0400"
      },
      "message": "Btrfs: use i_version instead of our own sequence\n\nWe\u0027ve been keeping around the inode sequence number in hopes that somebody\nwould use it, but nobody uses it and people actually use i_version which\nserves the same purpose, so use i_version where we used the incore inode\u0027s\nsequence number and that way the sequence is updated properly across the\nboard, and not just in file write.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "79787eaab46121d4713ed03c8fc63b9ec3eaec76",
      "tree": "ee6b17d0811ee54ab74a03aa4e0bb92769d2f12a",
      "parents": [
        "49b25e0540904be0bf558b84475c69d72e4de66e"
      ],
      "author": {
        "name": "Jeff Mahoney",
        "email": "jeffm@suse.com",
        "time": "Mon Mar 12 16:03:00 2012 +0100"
      },
      "committer": {
        "name": "David Sterba",
        "email": "dsterba@suse.cz",
        "time": "Thu Mar 22 11:52:54 2012 +0100"
      },
      "message": "btrfs: replace many BUG_ONs with proper error handling\n\n btrfs currently handles most errors with BUG_ON. This patch is a work-in-\n progress but aims to handle most errors other than internal logic\n errors and ENOMEM more gracefully.\n\n This iteration prevents most crashes but can run into lockups with\n the page lock on occasion when the timing \"works out.\"\n\nSigned-off-by: Jeff Mahoney \u003cjeffm@suse.com\u003e\n"
    },
    {
      "commit": "143bede527b054a271053f41bfaca2b57baa9408",
      "tree": "95c71d3705c73bf98e7a1547da35e70a44703c1e",
      "parents": [
        "ffd7b33944f4573a063af7a55f8a5199c8185665"
      ],
      "author": {
        "name": "Jeff Mahoney",
        "email": "jeffm@suse.com",
        "time": "Thu Mar 01 14:56:26 2012 +0100"
      },
      "committer": {
        "name": "David Sterba",
        "email": "dsterba@suse.cz",
        "time": "Thu Mar 22 01:45:34 2012 +0100"
      },
      "message": "btrfs: return void in functions without error conditions\n\nSigned-off-by: Jeff Mahoney \u003cjeffm@suse.com\u003e\n"
    },
    {
      "commit": "8c2a3ca20f6233677ac3222c6506174010eb414f",
      "tree": "88d1105c665d355b363929557ed0c5489795e348",
      "parents": [
        "90290e19820e3323ce6b9c2888eeb68bf29c278b"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Jan 10 10:31:31 2012 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Jan 16 15:29:43 2012 -0500"
      },
      "message": "Btrfs: space leak tracepoints\n\nThis in addition to a script in my btrfs-tracing tree will help track down space\nleaks when we\u0027re getting space left over in block groups on umount.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "c9a7fe9672612c0b595633d2945f52257ad92b20",
      "tree": "df251545a12fdbb895c07ec9dccde10163624b7f",
      "parents": [
        "2cfab8d74ebfbe06ce2947117945c4f45a5915ec",
        "d85c8a6f1bc083279215ff6e79b7c292bf3ec905",
        "142349f541d0bb6bc3e0d4563268105aada42b0b"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Dec 16 12:15:50 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Dec 16 12:15:50 2011 -0800"
      },
      "message": "Merge branches \u0027for-linus\u0027 and \u0027for-linus-3.2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:\n  Btrfs: unplug every once and a while\n  Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code\n  Btrfs: only set cache_generation if we setup the block group\n  Btrfs: don\u0027t panic if orphan item already exists\n  Btrfs: fix leaked space in truncate\n  Btrfs: fix how we do delalloc reservations and how we free reservations on error\n  Btrfs: deal with enospc from dirtying inodes properly\n  Btrfs: fix num_workers_starting bug and other bugs in async thread\n  BTRFS: Establish i_ops before calling d_instantiate\n  Btrfs: add a cond_resched() into the worker loop\n  Btrfs: fix ctime update of on-disk inode\n  btrfs: keep orphans for subvolume deletion\n  Btrfs: fix inaccurate available space on raid0 profile\n  Btrfs: fix wrong disk space information of the files\n  Btrfs: fix wrong i_size when truncating a file to a larger size\n  Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror\n\n* \u0027for-linus-3.2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:\n  btrfs: lower the dirty balance poll interval\n"
    },
    {
      "commit": "e755d9ab387c4c2401dce5b6f435432a829f41cb",
      "tree": "fcec42ac109be4c291e03de111603fd7086fd91a",
      "parents": [
        "ad19db71f498fd858dd84ce603efcf97e321f184"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 15 13:36:29 2011 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 15 13:36:29 2011 -0500"
      },
      "message": "Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code\n\nbtrfs_update_inode is sometimes called with a null reservation.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "c1f4246716392ec8693c23cffb969bd73c1b0910",
      "tree": "6160ac2507b28cf7625be79dd539a286c9fe4e43",
      "parents": [
        "fe10e6f4b24ef8ca12cb4d2368deb4861ab1861b",
        "8965593e41dd2d0e2a2f1e6f245336005ea94a2c"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 11 23:47:06 2011 -0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 11 23:47:06 2011 -0200"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:\n  btrfs: rename the option to nospace_cache\n  Btrfs: handle bio_add_page failure gracefully in scrub\n  Btrfs: fix deadlock caused by the race between relocation\n  Btrfs: only map pages if we know we need them when reading the space cache\n  Btrfs: fix orphan backref nodes\n  Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}\n  Btrfs: fix unreleased path in btrfs_orphan_cleanup()\n  Btrfs: fix no reserved space for writing out inode cache\n  Btrfs: fix nocow when deleting the item\n  Btrfs: tweak the delayed inode reservations again\n  Btrfs: rework error handling in btrfs_mount()\n  Btrfs: close devices on all error paths in open_ctree()\n  Btrfs: avoid null dereference and leaks when bailing from open_ctree()\n  Btrfs: fix subvol_name leak on error in btrfs_mount()\n  Btrfs: fix memory leak in btrfs_parse_early_options()\n  Btrfs: fix our reservations for updating an inode when completing io\n  Btrfs: fix oops on NULL trans handle in btrfs_truncate\n  btrfs: fix double-free \u0027tree_root\u0027 in \u0027btrfs_mount()\u0027\n"
    },
    {
      "commit": "2115133f8b9a8dbdb217d14080814df07ce90479",
      "tree": "3b2f3d6839cdb1f6495ae10dd548f7fbfee70266",
      "parents": [
        "7fd2ae21a42d178982679b86086661292b4afe4a"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Nov 10 20:39:08 2011 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Nov 10 20:39:08 2011 -0500"
      },
      "message": "Btrfs: tweak the delayed inode reservations again\n\nJosef sent along an incremental to the inode reservation\ncode to make sure we try and fall back to directly updating\nthe inode item if things go horribly wrong.\n\nThis reworks that patch slightly, adding a fallback function\nthat will always try to update the inode item directly without\ngoing through the delayed_inode code.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "7fd2ae21a42d178982679b86086661292b4afe4a",
      "tree": "236c22d807ca5f2419a1b0394bd1092aab730cde",
      "parents": [
        "917c16b2b69fc2eeb432eabca73258f08c58361e"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Nov 08 15:47:34 2011 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Nov 08 15:47:34 2011 -0500"
      },
      "message": "Btrfs: fix our reservations for updating an inode when completing io\n\nPeople have been reporting ENOSPC crashes in finish_ordered_io.  This is because\nwe try to steal from the delalloc block rsv to satisfy a reservation to update\nthe inode.  The problem with this is we don\u0027t explicitly save space for updating\nthe inode when doing delalloc.  This is kind of a problem and we\u0027ve gotten away\nwith this because way back when we just stole from the delalloc reserve without\nany questions, and this worked out fine because generally speaking the leaf had\nbeen modified either by the mtime update when we did the original write or\nbecause we just updated the leaf when we inserted the file extent item, only on\nrare occasions had the leaf not actually been modified, and that was still ok\nbecause we\u0027d just use a block or two out of the over-reservation that is\ndelalloc.\n\nThen came the delayed inode stuff.  This is amazing, except it wants a full\nreservation for updating the inode since it may do it at some point down the\nroad after we\u0027ve written the blocks and we have to recow everything again.  This\nworked out because the delayed inode stuff just stole from the global reserve,\nthat is until recently when I changed that because it caused other problems.\n\nSo here we are, we\u0027re doing everything right and being screwed for it.  So take\nan extra reservation for the inode at delalloc reservation time and carry it\nthrough the life of the delalloc reservation.  If we need it we can steal it in\nthe delayed inode stuff.  If we have already stolen it try and do a normal\nmetadata reservation.  If that fails try to steal from the delalloc reservation.\nIf _that_ fails we\u0027ll get a WARN_ON() so I can start thinking of a better way to\nsolve this and in the meantime we\u0027ll steal from the global reserve.\n\nWith this patch I ran xfstests 13 in a loop for a couple of hours and didn\u0027t see\nany problems.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "6a6662ced4153f6dbcfc40d7225c3cc45416039c",
      "tree": "77ad5d577333f02cd854e44827a407dd0388d4eb",
      "parents": [
        "32aaeffbd4a7457bf2f7448b33b5946ff2a960eb",
        "7c7e82a77fe3d89ae50824aa7c897454675eb4c4"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 20:03:41 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 20:03:41 2011 -0800"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (114 commits)\n  Btrfs: check for a null fs root when writing to the backup root log\n  Btrfs: fix race during transaction joins\n  Btrfs: fix a potential btrfs_bio leak on scrub fixups\n  Btrfs: rename btrfs_bio multi -\u003e bbio for consistency\n  Btrfs: stop leaking btrfs_bios on readahead\n  Btrfs: stop the readahead threads on failed mount\n  Btrfs: fix extent_buffer leak in the metadata IO error handling\n  Btrfs: fix the new inspection ioctls for 32 bit compat\n  Btrfs: fix delayed insertion reservation\n  Btrfs: ClearPageError during writepage and clean_tree_block\n  Btrfs: be smarter about committing the transaction in reserve_metadata_bytes\n  Btrfs: make a delayed_block_rsv for the delayed item insertion\n  Btrfs: add a log of past tree roots\n  btrfs: separate superblock items out of fs_info\n  Btrfs: use the global reserve when truncating the free space cache inode\n  Btrfs: release metadata from global reserve if we have to fallback for unlink\n  Btrfs: make sure to flush queued bios if write_cache_pages waits\n  Btrfs: fix extent pinning bugs in the tree log\n  Btrfs: make sure btrfs_remove_free_space doesn\u0027t leak EAGAIN\n  Btrfs: don\u0027t wait as long for more batches during SSD log commit\n  ...\n"
    },
    {
      "commit": "c06a0e120a4e381a1c291c1fce3c6155c5791cae",
      "tree": "a9d1c44610b37c701d25e439b005dacfa0f823c1",
      "parents": [
        "bf0da8c183a15656eee63c54f334c3794320872a"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Nov 04 19:56:02 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Nov 06 03:04:20 2011 -0500"
      },
      "message": "Btrfs: fix delayed insertion reservation\n\nWe all keep getting those stupid warnings from use_block_rsv when running\nstress.sh, and it\u0027s because the delayed insertion stuff is being stupid.  It\u0027s\nnot the delayed insertion stuffs fault, it\u0027s all just stupid.  When marking an\ninode dirty for oh say updating the time on it, we just do a\nbtrfs_join_transaction, which doesn\u0027t reserve any space.  This is stupid because\nwe\u0027re going to have to have space reserve to make this change, but we do it\nbecause it\u0027s fast because chances are we\u0027re going to call it over and over again\nand it doesn\u0027t matter.  Well thanks to the delayed insertion stuff this is\nmostly the case, so we do actually need to make this reservation.  So if\ntrans-\u003ebytes_reserved is 0 then try to do a normal reservation.  If not return\nENOSPC which will make the btrfs_dirty_inode start a proper transaction which\nwill let it do the whole ENOSPC dance and reserve enough space for the delayed\ninsertion to steal the reservation from the transaction.\n\nThe other stupid thing we do is not reserve space for the inode when writing to\nthe thing.  Usually this is ok since we have to update the time so we\u0027d have\nalready done all this work before we get to the endio stuff, so it doesn\u0027t\nmatter.  But this is stupid because we could write the data after the\ntransaction commits where we changed the mtime of the inode so we have to cow\nall the way down to the inode anyway.  This used to be masked by the delalloc\nreservation stuff, but because we delay the update it doesn\u0027t get masked in this\ncase.  So again the delayed insertion stuff bites us in the ass.  So if our\ntrans-\u003eblock_rsv is delalloc, just steal the reservation from the delalloc\nreserve.  Hopefully this won\u0027t bite us in the ass, but I\u0027ve said that before.\n\nWith this patch stress.sh no longer spits out those stupid warnings (famous last\nwords).  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "6d668dda0caec537fbf28c4d91e6d18181af3cff",
      "tree": "bfc4afce43435e0dc354e58150745fcf2c6072f0",
      "parents": [
        "af31f5e5b84b5bf2bcec464153a5130b170b2770"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Nov 03 22:54:25 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Nov 06 03:04:18 2011 -0500"
      },
      "message": "Btrfs: make a delayed_block_rsv for the delayed item insertion\n\nI\u0027ve been hitting warnings in use_block_rsv when running the delayed insertion\nstuff.  It\u0027s because we will readjust global block rsv based on what is in use,\nwhich means we could end up discarding reservations that are for the delayed\ninsertion stuff.  So instead create a seperate block rsv for the delayed\ninsertion stuff.  This will also make it easier to debug problems with the\ndelayed insertion reservations since we will know that only the delayed\ninsertion code touches this block_rsv.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "bfe8684869601dacfcb2cd69ef8cfd9045f62170",
      "tree": "4e213aaa766b26f43f0f9ec7998a7745239d9377",
      "parents": [
        "6d6b77f163c7eabedbba00ed2abb7d4a570bff76"
      ],
      "author": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@suse.cz",
        "time": "Fri Oct 28 14:13:29 2011 +0200"
      },
      "committer": {
        "name": "Christoph Hellwig",
        "email": "hch@serles.lst.de",
        "time": "Wed Nov 02 12:53:43 2011 +0100"
      },
      "message": "filesystems: add set_nlink()\n\nReplace remaining direct i_nlink updates with a new set_nlink()\nupdater function.\n\nSigned-off-by: Miklos Szeredi \u003cmszeredi@suse.cz\u003e\nTested-by: Toshiyuki Okajima \u003ctoshi.okajima@jp.fujitsu.com\u003e\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\n"
    },
    {
      "commit": "bd681513fa6f2ff29aa391f01e413a2d1c59fd77",
      "tree": "bb10ec6ef876b4d7a553cbe54976ec49a0d10b21",
      "parents": [
        "81317fdeddcef259b6ecf7b5c0d04caa167c6b54"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat Jul 16 15:23:14 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Jul 27 12:46:46 2011 -0400"
      },
      "message": "Btrfs: switch the btrfs tree locks to reader/writer\n\nThe btrfs metadata btree is the source of significant\nlock contention, especially in the root node.   This\ncommit changes our locking to use a reader/writer\nlock.\n\nThe lock is built on top of rw spinlocks, and it\nextends the lock tracking to remember if we have a\nread lock or a write lock when we go to blocking.  Atomics\ncount the number of blocking readers or writers at any\ngiven time.\n\nIt removes all of the adaptive spinning from the old code\nand uses only the spinning/blocking hints inside of btrfs\nto decide when it should continue spinning.\n\nIn read heavy workloads this is dramatically faster.  In write\nheavy workloads we\u0027re still faster because of less contention\non the root node lock.\n\nWe suffer slightly in dbench because we schedule more often\nduring write locks, but all other benchmarks so far are improved.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "2f7e33d432d097a2a7f467b031bf18be91cb3d49",
      "tree": "a1729a436b3c9921390e23cae35e5b837653dfe4",
      "parents": [
        "9b90f5135320bc74dc6c9a8c74d69fd4821d9282"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Thu Jun 23 07:27:13 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Jun 27 11:34:27 2011 -0400"
      },
      "message": "btrfs: fix inconsonant inode information\n\nWhen iputting the inode, We may leave the delayed nodes if they have some\ndelayed items that have not been dealt with. So when the inode is read again,\nwe must look up the relative delayed node, and use the information in it to\ninitialize the inode. Or we will get inconsonant inode information, it may\ncause that the same directory index number is allocated again, and hit the\nfollowing oops:\n\n[ 5447.554187] err add delayed dir index item(name: pglog_0.965_0) into the\ninsertion tree of the delayed node(root id: 262, inode id: 258, errno: -17)\n[ 5447.569766] ------------[ cut here ]------------\n[ 5447.575361] kernel BUG at fs/btrfs/delayed-inode.c:1301!\n[SNIP]\n[ 5447.790721] Call Trace:\n[ 5447.793191]  [\u003cffffffffa0641c4e\u003e] btrfs_insert_dir_item+0x189/0x1bb [btrfs]\n[ 5447.800156]  [\u003cffffffffa0651a45\u003e] btrfs_add_link+0x12b/0x191 [btrfs]\n[ 5447.806517]  [\u003cffffffffa0651adc\u003e] btrfs_add_nondir+0x31/0x58 [btrfs]\n[ 5447.812876]  [\u003cffffffffa0651d6a\u003e] btrfs_create+0xf9/0x197 [btrfs]\n[ 5447.818961]  [\u003cffffffff8111f840\u003e] vfs_create+0x72/0x92\n[ 5447.824090]  [\u003cffffffff8111fa8c\u003e] do_last+0x22c/0x40b\n[ 5447.829133]  [\u003cffffffff8112076a\u003e] path_openat+0xc0/0x2ef\n[ 5447.834438]  [\u003cffffffff810c58e2\u003e] ? __perf_event_task_sched_out+0x24/0x44\n[ 5447.841216]  [\u003cffffffff8103ecdd\u003e] ? perf_event_task_sched_out+0x59/0x67\n[ 5447.847846]  [\u003cffffffff81121a79\u003e] do_filp_open+0x3d/0x87\n[ 5447.853156]  [\u003cffffffff811e126c\u003e] ? strncpy_from_user+0x43/0x4d\n[ 5447.859072]  [\u003cffffffff8111f1f5\u003e] ? getname_flags+0x2e/0x80\n[ 5447.864636]  [\u003cffffffff8111f179\u003e] ? do_getname+0x14b/0x173\n[ 5447.870112]  [\u003cffffffff8111f1b7\u003e] ? audit_getname+0x16/0x26\n[ 5447.875682]  [\u003cffffffff8112b1ab\u003e] ? spin_lock+0xe/0x10\n[ 5447.880882]  [\u003cffffffff81112d39\u003e] do_sys_open+0x69/0xae\n[ 5447.886153]  [\u003cffffffff81112db1\u003e] sys_open+0x20/0x22\n[ 5447.891114]  [\u003cffffffff813b9aab\u003e] system_call_fastpath+0x16/0x1b\n\nFix it by reusing the old delayed node.\n\nReported-by: Jim Schutt \u003cjaschut@sandia.gov\u003e\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nTested-by: Jim Schutt \u003cjaschut@sandia.gov\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "e999376f094162aa425ae749aa1df95ab928d010",
      "tree": "080d4a2a20d8d7e7ea8b36f63150827b970da715",
      "parents": [
        "35a30d7ce54e087d8025a725d4e5a2fdee723a9f"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jun 17 16:14:09 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jun 17 16:38:47 2011 -0400"
      },
      "message": "Btrfs: avoid delayed metadata items during commits\n\nSnapshot creation has two phases.  One is the initial snapshot setup,\nand the second is done during commit, while nobody is allowed to modify\nthe root we are snapshotting.\n\nThe delayed metadata insertion code can break that rule, it does a\ndelayed inode update on the inode of the parent of the snapshot,\nand delayed directory item insertion.\n\nThis makes sure to run the pending delayed operations before we\nrecord the snapshot root, which avoids corruptions.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "19fd294957e426bfdd8e19085096467ec18df5c4",
      "tree": "47c3ee705ac9d591d2f9497d3dfc3d1426a881a2",
      "parents": [
        "9fe6a50fb764f508dd2de47a66e62e51388791fb"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Wed Jun 15 10:47:30 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jun 17 14:54:18 2011 -0400"
      },
      "message": "btrfs: fix wrong reservation when doing delayed inode operations\n\nWe have migrated the space for the delayed inode items from\ntrans_block_rsv to global_block_rsv, but we forgot to set trans-\u003eblock_rsv to\nglobal_block_rsv when we doing delayed inode operations, and the following Oops\nhappened:\n\n[ 9792.654889] ------------[ cut here ]------------\n[ 9792.654898] WARNING: at fs/btrfs/extent-tree.c:5681\nbtrfs_alloc_free_block+0xca/0x27c [btrfs]()\n[ 9792.654899] Hardware name: To Be Filled By O.E.M.\n[ 9792.654900] Modules linked in: btrfs zlib_deflate libcrc32c\nip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables\narc4 rt61pci rt2x00pci rt2x00lib snd_hda_codec_hdmi mac80211\nsnd_hda_codec_realtek cfg80211 snd_hda_intel edac_core snd_seq rfkill\npcspkr serio_raw snd_hda_codec eeprom_93cx6 edac_mce_amd sp5100_tco\ni2c_piix4 k10temp snd_hwdep snd_seq_device snd_pcm floppy r8169 xhci_hcd\nmii snd_timer snd soundcore snd_page_alloc ipv6 firewire_ohci pata_acpi\nata_generic firewire_core pata_via crc_itu_t radeon ttm drm_kms_helper\ndrm i2c_algo_bit i2c_core [last unloaded: scsi_wait_scan]\n[ 9792.654919] Pid: 2762, comm: rm Tainted: G        W   2.6.39+ #1\n[ 9792.654920] Call Trace:\n[ 9792.654922]  [\u003cffffffff81053c4a\u003e] warn_slowpath_common+0x83/0x9b\n[ 9792.654925]  [\u003cffffffff81053c7c\u003e] warn_slowpath_null+0x1a/0x1c\n[ 9792.654933]  [\u003cffffffffa038e747\u003e] btrfs_alloc_free_block+0xca/0x27c [btrfs]\n[ 9792.654945]  [\u003cffffffffa03b8562\u003e] ? map_extent_buffer+0x6e/0xa8 [btrfs]\n[ 9792.654953]  [\u003cffffffffa038189b\u003e] __btrfs_cow_block+0xfc/0x30c [btrfs]\n[ 9792.654963]  [\u003cffffffffa0396aa6\u003e] ? btrfs_buffer_uptodate+0x47/0x58 [btrfs]\n[ 9792.654970]  [\u003cffffffffa0382e48\u003e] ? read_block_for_search+0x94/0x368 [btrfs]\n[ 9792.654978]  [\u003cffffffffa0381ba9\u003e] btrfs_cow_block+0xfe/0x146 [btrfs]\n[ 9792.654986]  [\u003cffffffffa03848b0\u003e] btrfs_search_slot+0x14d/0x4b6 [btrfs]\n[ 9792.654997]  [\u003cffffffffa03b8562\u003e] ? map_extent_buffer+0x6e/0xa8 [btrfs]\n[ 9792.655022]  [\u003cffffffffa03938e8\u003e] btrfs_lookup_inode+0x2f/0x8f [btrfs]\n[ 9792.655025]  [\u003cffffffff8147afac\u003e] ? _cond_resched+0xe/0x22\n[ 9792.655027]  [\u003cffffffff8147b892\u003e] ? mutex_lock+0x29/0x50\n[ 9792.655039]  [\u003cffffffffa03d41b1\u003e] btrfs_update_delayed_inode+0x72/0x137 [btrfs]\n[ 9792.655051]  [\u003cffffffffa03d4ea2\u003e] btrfs_run_delayed_items+0x90/0xdb [btrfs]\n[ 9792.655062]  [\u003cffffffffa039a69b\u003e] btrfs_commit_transaction+0x228/0x654 [btrfs]\n[ 9792.655064]  [\u003cffffffff8106e8da\u003e] ? remove_wait_queue+0x3a/0x3a\n[ 9792.655075]  [\u003cffffffffa03a2fa5\u003e] btrfs_evict_inode+0x14d/0x202 [btrfs]\n[ 9792.655077]  [\u003cffffffff81132bd6\u003e] evict+0x71/0x111\n[ 9792.655079]  [\u003cffffffff81132de0\u003e] iput+0x12a/0x132\n[ 9792.655081]  [\u003cffffffff8112aa3a\u003e] do_unlinkat+0x106/0x155\n[ 9792.655083]  [\u003cffffffff81127b83\u003e] ? path_put+0x1f/0x23\n[ 9792.655085]  [\u003cffffffff8109c53c\u003e] ? audit_syscall_entry+0x145/0x171\n[ 9792.655087]  [\u003cffffffff81128410\u003e] ? putname+0x34/0x36\n[ 9792.655090]  [\u003cffffffff8112b441\u003e] sys_unlinkat+0x29/0x2b\n[ 9792.655092]  [\u003cffffffff81482c42\u003e] system_call_fastpath+0x16/0x1b\n[ 9792.655093] ---[ end trace 02b696eb02b3f768 ]---\n\nThis patch fix it by setting the reservation of the transaction handle to the\ncorrect one.\n\nReported-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "aa0467d8d2a00e75b2bb6a56a4ee6d70c5d1928f",
      "tree": "0139c403353d9e1ab771fc7c9049e5c334329d17",
      "parents": [
        "7841cb2898f66a73062c64d0ef5733dde7279e46"
      ],
      "author": {
        "name": "David Sterba",
        "email": "dsterba@suse.cz",
        "time": "Fri Jun 03 16:29:08 2011 +0200"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat Jun 04 08:11:38 2011 -0400"
      },
      "message": "btrfs: fix uninitialized variable warning\n\nWith Linus\u0027 tree, today\u0027s linux-next build (powercp ppc64_defconfig)\nproduced this warning:\n\nfs/btrfs/delayed-inode.c: In function \u0027btrfs_delayed_update_inode\u0027:\nfs/btrfs/delayed-inode.c:1598:6: warning: \u0027ret\u0027 may be used\nuninitialized in this function\n\nIntroduced by commit 16cdcec736cd (\"btrfs: implement delayed inode items\noperation\").\n\nThis fixes a bug in btrfs_update_inode(): if the returned value from\nbtrfs_delayed_update_inode is a nonzero garbage, inode stat data are not\nupdated and several call paths may hit a BUG_ON or fail with strange\ncode.\n\nReported-by: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nSigned-off-by: David Sterba \u003cdsterba@suse.cz\u003e\n"
    },
    {
      "commit": "17aca1c987cff89dc4279371857035da902c8854",
      "tree": "f63df32137d07ec9876f46542884b68a83e0a48c",
      "parents": [
        "1bc8779349d6278e2713a1ff94418c2a6746a791"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jun 03 01:13:45 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat Jun 04 08:03:43 2011 -0400"
      },
      "message": "Btrfs: fix uninit variable in the delayed inode code\n\nThe nitems counter needs to start at zero\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "ff5714cca971848963b87d6b477c16ca8abbaa54",
      "tree": "17ee34b9b5e00804df4059503f82f6f1d94383a9",
      "parents": [
        "174ba50915b08dcfd07c8b5fb795b46a165fa09a",
        "d90c732122a1f6d0efe388a8a204f67f144b2eb3"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat May 28 07:00:39 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat May 28 07:00:39 2011 -0400"
      },
      "message": "Merge branch \u0027for-chris\u0027 of\ngit://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into for-linus\n\nConflicts:\n\tfs/btrfs/disk-io.c\n\tfs/btrfs/extent-tree.c\n\tfs/btrfs/free-space-cache.c\n\tfs/btrfs/inode.c\n\tfs/btrfs/transaction.c\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "945d8962ceee6bb273365d0bdf42f763225b290f",
      "tree": "43f5617022c7c947c3c63664e49eb9575ab82f2f",
      "parents": [
        "0d0ca30f180906224be6279788f2b202cfd959d8",
        "4ea028859bbdad34b84c9951fbb832ae10c6a96c"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun May 22 12:33:42 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun May 22 12:33:42 2011 -0400"
      },
      "message": "Merge branch \u0027cleanups\u0027 of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers\n\nConflicts:\n\tfs/btrfs/extent-tree.c\n\tfs/btrfs/free-space-cache.c\n\tfs/btrfs/inode.c\n\tfs/btrfs/tree-log.c\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "0d0ca30f180906224be6279788f2b202cfd959d8",
      "tree": "a0e35c968410f3f08f2a215ed5b4d6449d8bd11f",
      "parents": [
        "dcc6d073225b6b732a52477c91bd4edc9b4d5502"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun May 22 07:11:22 2011 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun May 22 07:11:22 2011 -0400"
      },
      "message": "Btrfs: update the delayed inode code to use the btrfs_ino helper.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "16cdcec736cd214350cdb591bf1091f8beedefa0",
      "tree": "5598d4561660c4d7a1d4de8b3703d6dd3cc7f9e7",
      "parents": [
        "61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Fri Apr 22 18:12:22 2011 +0800"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sat May 21 09:30:56 2011 -0400"
      },
      "message": "btrfs: implement delayed inode items operation\n\nChangelog V5 -\u003e V6:\n- Fix oom when the memory load is high, by storing the delayed nodes into the\n  root\u0027s radix tree, and letting btrfs inodes go.\n\nChangelog V4 -\u003e V5:\n- Fix the race on adding the delayed node to the inode, which is spotted by\n  Chris Mason.\n- Merge Chris Mason\u0027s incremental patch into this patch.\n- Fix deadlock between readdir() and memory fault, which is reported by\n  Itaru Kitayama.\n\nChangelog V3 -\u003e V4:\n- Fix nested lock, which is reported by Itaru Kitayama, by updating space cache\n  inode in time.\n\nChangelog V2 -\u003e V3:\n- Fix the race between the delayed worker and the task which does delayed items\n  balance, which is reported by Tsutomu Itoh.\n- Modify the patch address David Sterba\u0027s comment.\n- Fix the bug of the cpu recursion spinlock, reported by Chris Mason\n\nChangelog V1 -\u003e V2:\n- break up the global rb-tree, use a list to manage the delayed nodes,\n  which is created for every directory and file, and used to manage the\n  delayed directory name index items and the delayed inode item.\n- introduce a worker to deal with the delayed nodes.\n\nCompare with Ext3/4, the performance of file creation and deletion on btrfs\nis very poor. the reason is that btrfs must do a lot of b+ tree insertions,\nsuch as inode item, directory name item, directory name index and so on.\n\nIf we can do some delayed b+ tree insertion or deletion, we can improve the\nperformance, so we made this patch which implemented delayed directory name\nindex insertion/deletion and delayed inode update.\n\nImplementation:\n- introduce a delayed root object into the filesystem, that use two lists to\n  manage the delayed nodes which are created for every file/directory.\n  One is used to manage all the delayed nodes that have delayed items. And the\n  other is used to manage the delayed nodes which is waiting to be dealt with\n  by the work thread.\n- Every delayed node has two rb-tree, one is used to manage the directory name\n  index which is going to be inserted into b+ tree, and the other is used to\n  manage the directory name index which is going to be deleted from b+ tree.\n- introduce a worker to deal with the delayed operation. This worker is used\n  to deal with the works of the delayed directory name index items insertion\n  and deletion and the delayed inode update.\n  When the delayed items is beyond the lower limit, we create works for some\n  delayed nodes and insert them into the work queue of the worker, and then\n  go back.\n  When the delayed items is beyond the upper bound, we create works for all\n  the delayed nodes that haven\u0027t been dealt with, and insert them into the work\n  queue of the worker, and then wait for that the untreated items is below some\n  threshold value.\n- When we want to insert a directory name index into b+ tree, we just add the\n  information into the delayed inserting rb-tree.\n  And then we check the number of the delayed items and do delayed items\n  balance. (The balance policy is above.)\n- When we want to delete a directory name index from the b+ tree, we search it\n  in the inserting rb-tree at first. If we look it up, just drop it. If not,\n  add the key of it into the delayed deleting rb-tree.\n  Similar to the delayed inserting rb-tree, we also check the number of the\n  delayed items and do delayed items balance.\n  (The same to inserting manipulation)\n- When we want to update the metadata of some inode, we cached the data of the\n  inode into the delayed node. the worker will flush it into the b+ tree after\n  dealing with the delayed insertion and deletion.\n- We will move the delayed node to the tail of the list after we access the\n  delayed node, By this way, we can cache more delayed items and merge more\n  inode updates.\n- If we want to commit transaction, we will deal with all the delayed node.\n- the delayed node will be freed when we free the btrfs inode.\n- Before we log the inode items, we commit all the directory name index items\n  and the delayed inode update.\n\nI did a quick test by the benchmark tool[1] and found we can improve the\nperformance of file creation by ~15%, and file deletion by ~20%.\n\nBefore applying this patch:\nCreate files:\n        Total files: 50000\n        Total time: 1.096108\n        Average time: 0.000022\nDelete files:\n        Total files: 50000\n        Total time: 1.510403\n        Average time: 0.000030\n\nAfter applying this patch:\nCreate files:\n        Total files: 50000\n        Total time: 0.932899\n        Average time: 0.000019\nDelete files:\n        Total files: 50000\n        Total time: 1.215732\n        Average time: 0.000024\n\n[1] http://marc.info/?l\u003dlinux-btrfs\u0026m\u003d128212635122920\u0026q\u003dp3\n\nMany thanks for Kitayama-san\u0027s help!\n\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nReviewed-by: David Sterba \u003cdave@jikos.cz\u003e\nTested-by: Tsutomu Itoh \u003ct-itoh@jp.fujitsu.com\u003e\nTested-by: Itaru Kitayama \u003ckitayama@cl.bb4u.ne.jp\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    }
  ]
}
