)]}'
{
  "log": [
    {
      "commit": "e13cf63f2bbd38721af557f0205da994ea068427",
      "tree": "26d0d779fadd58814eea18ab2b16370a8565c837",
      "parents": [
        "073f21ae1319348f4f8630003b7901e3be254327",
        "83a50de97fe96aca82389e061862ed760ece2283"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 14 11:08:13 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 14 11:08:13 2010 -0800"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: prevent RAID level downgrades when space is low\n  Btrfs: account for missing devices in RAID allocation profiles\n  Btrfs: EIO when we fail to read tree roots\n  Btrfs: fix compiler warnings\n  Btrfs: Make async snapshot ioctl more generic\n  Btrfs: pwrite blocked when writing from the mmaped buffer of the same page\n  Btrfs: Fix a crash when mounting a subvolume\n  Btrfs: fix sync subvol/snapshot creation\n  Btrfs: Fix page leak in compressed writeback path\n  Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots\n  Btrfs: fixup return code for btrfs_del_orphan_item\n  Btrfs: do not do fast caching if we are allocating blocks for tree_root\n  Btrfs: deal with space cache errors better\n  Btrfs: fix use after free in O_DIRECT\n"
    },
    {
      "commit": "83a50de97fe96aca82389e061862ed760ece2283",
      "tree": "95421594f180c32cca1ff7f6881f4cf272cf2b5c",
      "parents": [
        "cd02dca56442e1504fd6bc5b96f7f1870162b266"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Dec 13 15:06:46 2010 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Dec 13 20:07:01 2010 -0500"
      },
      "message": "Btrfs: prevent RAID level downgrades when space is low\n\nThe extent allocator has code that allows us to fill\nallocations from any available block group, even if it doesn\u0027t\nmatch the raid level we\u0027ve requested.\n\nThis was put in because adding a new drive to a filesystem\nmade with the default mkfs options actually upgrades the metadata from\nsingle spindle dup to full RAID1.\n\nBut, the code also allows us to allocate from a raid0 chunk when we\nreally want a raid1 or raid10 chunk.  This can cause big trouble because\nmkfs creates a small (4MB) raid0 chunk for data and metadata which then\ngoes unused for raid1/raid10 installs.\n\nThe allocator will happily wander in and allocate from that chunk when\nthings get tight, which is not correct.\n\nThe fix here is to make sure that we provide duplication when the\ncaller has asked for it.  It does all the dups to be any raid level,\nwhich preserves the dup-\u003eraid1 upgrade abilities.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "cd02dca56442e1504fd6bc5b96f7f1870162b266",
      "tree": "1a38d99fc581974ba6d8136c42ca81f3b1216ea3",
      "parents": [
        "68433b73b104bff388aac376631d32abbbd872b0"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Dec 13 14:56:23 2010 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Dec 13 20:06:52 2010 -0500"
      },
      "message": "Btrfs: account for missing devices in RAID allocation profiles\n\nWhen we mount in RAID degraded mode without adding a new device to\nreplace the failed one, we can end up using the wrong RAID flags for\nallocations.\n\nThis results in strange combinations of block groups (raid1 in a raid10\nfilesystem) and corruptions when we try to allocate blocks from single\nspindle chunks on drives that are actually missing.\n\nThe first device has two small 4MB chunks in it that mkfs creates and\nthese are usually unused in a raid1 or raid10 setup.  But, in -o degraded,\nthe allocator will fall back to these because the mask of desired raid groups\nisn\u0027t correct.\n\nThe fix here is to count the missing devices as we build up the list\nof devices in the system.  This count is used when picking the\nraid level to make sure we continue using the same levels that were\nin place before we lost a drive.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "84cd948cb11041f205242de457e680b9bb872a36",
      "tree": "479ac0dc057044a8b399c8c32f1c78641bd33740",
      "parents": [
        "7e1fea731da8c1b5fcf5d8e157befd389b030760"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Dec 08 12:24:01 2010 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Dec 10 16:29:04 2010 -0500"
      },
      "message": "Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots\n\nNot being able to delete an orphan item isn\u0027t a horrible thing.  The worst that\nhappens is the next time around we try and do the orphan cleanup and we can\u0027t\nfind the referenced object and just delete the item and move on.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "b8399dee478db7939cd0d6fda8ecacddf2facd03",
      "tree": "418a67d8d2de13739f3b14518917c8aaadafe3b8",
      "parents": [
        "2b20982e3154266106573beac2a4d4ba57a2789a"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Dec 08 09:15:11 2010 -0500"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Dec 09 13:57:13 2010 -0500"
      },
      "message": "Btrfs: do not do fast caching if we are allocating blocks for tree_root\n\nSince the fast caching uses normal tree locking, we can possibly deadlock if we\nget to the caching via a btrfs_search_slot() on the tree_root.  So just check to\nsee if the root we are on is the tree root, and just don\u0027t do the fast caching.\n\nReported-by: Sage Weil \u003csage@newdream.net\u003e\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "2b20982e3154266106573beac2a4d4ba57a2789a",
      "tree": "13539703ccb713385b4c7ff7eac508bb8f3b1e18",
      "parents": [
        "955256f2c3e25c94ad373c43fbc38d2ac8af2a71"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Dec 03 13:17:53 2010 -0500"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Dec 09 13:57:12 2010 -0500"
      },
      "message": "Btrfs: deal with space cache errors better\n\nCurrently if the space cache inode generation number doesn\u0027t match the\ngeneration number in the space cache header we will just fail to load the space\ncache, but we won\u0027t mark the space cache as an error, so we\u0027ll keep getting that\nerror each time somebody tries to cache that block group until we actually clear\nthe thing.  Fix this by marking the space cache as having an error so we only\nget the message once.  This patch also makes it so that we don\u0027t try and setup\nspace cache for a block group that isn\u0027t cached, since we won\u0027t be able to write\nit out anyway.  None of these problems are actual problems, they are just\nannoying and sub-optimal.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "aa3fc52546b847f590d86a093afd863ff9081628",
      "tree": "9d8b35a700287ae19fb3baa0e9f2c93462795d11",
      "parents": [
        "555bdaefd52c386e79f98591810ceb8bab780398",
        "5a92bc88cef279261d3f138e25850c122df67045"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Nov 29 14:11:08 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Nov 29 14:11:08 2010 -0800"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (24 commits)\n  Btrfs: don\u0027t use migrate page without CONFIG_MIGRATION\n  Btrfs: deal with DIO bios that span more than one ordered extent\n  Btrfs: setup blank root and fs_info for mount time\n  Btrfs: fix fiemap\n  Btrfs - fix race between btrfs_get_sb() and umount\n  Btrfs: update inode ctime when using links\n  Btrfs: make sure new inode size is ok in fallocate\n  Btrfs: fix typo in fallocate to make it honor actual size\n  Btrfs: avoid NULL pointer deref in try_release_extent_buffer\n  Btrfs: make btrfs_add_nondir take parent inode as an argument\n  Btrfs: hold i_mutex when calling btrfs_log_dentry_safe\n  Btrfs: use dget_parent where we can UPDATED\n  Btrfs: fix more ESTALE problems with NFS\n  Btrfs: handle NFS lookups properly\n  btrfs: make 1-bit signed fileds unsigned\n  btrfs: Show device attr correctly for symlinks\n  btrfs: Set file size correctly in file clone\n  btrfs: Check if dest_offset is block-size aligned before cloning file\n  Btrfs: handle the space_cache option properly\n  btrfs: Fix early enospc because \u0027unused\u0027 calculated with wrong sign.\n  ...\n"
    },
    {
      "commit": "6f33434850ed87dc5e56b60ebbad3d3cf405f296",
      "tree": "e70433c2c1fe59180bb8a92341f73931eff7ddb0",
      "parents": [
        "e65e1535542931e51189832264cd282e5899e4b9"
      ],
      "author": {
        "name": "Arne Jansen",
        "email": "sensille@gmx.net",
        "time": "Fri Nov 12 23:17:56 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Nov 21 22:26:04 2010 -0500"
      },
      "message": "btrfs: Fix early enospc because \u0027unused\u0027 calculated with wrong sign.\n\n\u0027unused\u0027 calculated with wrong sign in reserve_metadata_bytes().\nThis might have lead to unwanted over-reservations.\n\nSigned-off-by: Arne Jansen \u003csensille@gmx.net\u003e\nReviewed-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "925d169f5b86fe57e2f5264ea574cce9a89b719d",
      "tree": "241d3156b427c6398bd3fc5efa9108635d0e189b",
      "parents": [
        "cdf01dd5443d0befc8c6a32cb2e3d2f568fd2558",
        "6418c96107a2b399848bb8cfc6e29f11ca74fb94"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Oct 30 09:05:48 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Oct 30 09:05:48 2010 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (39 commits)\n  Btrfs: deal with errors from updating the tree log\n  Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed\n  Btrfs: make SNAP_DESTROY async\n  Btrfs: add SNAP_CREATE_ASYNC ioctl\n  Btrfs: add START_SYNC, WAIT_SYNC ioctls\n  Btrfs: async transaction commit\n  Btrfs: fix deadlock in btrfs_commit_transaction\n  Btrfs: fix lockdep warning on clone ioctl\n  Btrfs: fix clone ioctl where range is adjacent to extent\n  Btrfs: fix delalloc checks in clone ioctl\n  Btrfs: drop unused variable in block_alloc_rsv\n  Btrfs: cleanup warnings from gcc 4.6 (nonbugs)\n  Btrfs: Fix variables set but not read (bugs found by gcc 4.6)\n  Btrfs: Use ERR_CAST helpers\n  Btrfs: use memdup_user helpers\n  Btrfs: fix raid code for removing missing drives\n  Btrfs: Switch the extent buffer rbtree into a radix tree\n  Btrfs: restructure try_release_extent_buffer()\n  Btrfs: use the flusher threads for delalloc throttling\n  Btrfs: tune the chunk allocation to 5% of the FS as metadata\n  ...\n\nFix up trivial conflicts in fs/btrfs/super.c and fs/fs-writeback.c, and\nremove use of INIT_RCU_HEAD in fs/btrfs/extent_io.c (that init macro was\nuseless and removed in commit 5e8067adfdba: \"rcu head remove init\")\n"
    },
    {
      "commit": "d8e39c457bc1ca2a7304bc086c7b0f0c10854921",
      "tree": "da2f37292b8021dfe90aa9803ee85f9f95acedf5",
      "parents": [
        "559af8211433b8c0b20e6c43c61409cb9c9c2996"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 15:17:41 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 15:17:41 2010 -0400"
      },
      "message": "Btrfs: drop unused variable in block_alloc_rsv\n\nThe alloc_target variable is not really used.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "559af8211433b8c0b20e6c43c61409cb9c9c2996",
      "tree": "702ebd4c4f5b610daa36f65d814a518356a9a46b",
      "parents": [
        "411fc6bcef54f828a5458f4730c68abdf13c6bf0"
      ],
      "author": {
        "name": "Andi Kleen",
        "email": "andi@firstfloor.org",
        "time": "Fri Oct 29 15:14:37 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 15:14:37 2010 -0400"
      },
      "message": "Btrfs: cleanup warnings from gcc 4.6 (nonbugs)\n\nThese are all the cases where a variable is set, but not read which are\nnot bugs as far as I can see, but simply leftovers.\n\nStill needs more review.\n\nFound by gcc 4.6\u0027s new warnings\n\nSigned-off-by: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Chris Mason \u003cchris.mason@oracle.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "bf9022e06af553553bc8f4e21ce36147ca6eae68",
      "tree": "e33d9a25fc5ec8e03c1f0d5a4775c865e0520811",
      "parents": [
        "e5bc2458293b2af6c0b94435965c68cc70974b56"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Oct 26 13:40:45 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 11:25:36 2010 -0400"
      },
      "message": "Btrfs: use the flusher threads for delalloc throttling\n\nWe have a fairly complex set of loops around walking our list of\ndelalloc inodes when we find metadata delalloc space running low.\nIt doesn\u0027t work very well, can use large amounts of CPU and doesn\u0027t\ndo very efficient writeback.\n\nThis switches us to kick the bdi flusher threads instead.  All dirty\ndata in btrfs is accounted as delalloc data, so this is very similar\nin terms of what it writes, but we\u0027re able to just kick off the IO\nand wait for progress.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "e5bc2458293b2af6c0b94435965c68cc70974b56",
      "tree": "d4b79f61f2ff236b080583345b4dfd617b0fca07",
      "parents": [
        "3259f8bed2f0f57c2fdcdac1b510c3fa319ef97e"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Oct 26 13:37:56 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 11:25:35 2010 -0400"
      },
      "message": "Btrfs: tune the chunk allocation to 5% of the FS as metadata\n\nAn earlier commit tried to keep us from allocating too many\nempty metadata chunks.  It was somewhat too restrictive and could\nlead to ENOSPC errors on empty filesystems.\n\nThis increases the limits to about 5% of the FS size, allowing more\nmetadata chunks to be preallocated.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "6b5b817f103450444f3f658a498f435d92a197e5",
      "tree": "2896588127c4dd6c2867ef09e7e3cdd83391f8ae",
      "parents": [
        "8216ef866df1119fd5a72372b8b29bce49c18590",
        "e9bb7f10d3617304ef94ff7aa8fefbce3078f08b"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:27:49 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:27:49 2010 -0400"
      },
      "message": "Merge branch \u0027bug-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work\n\nConflicts:\n\tfs/btrfs/extent-tree.c\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "8216ef866df1119fd5a72372b8b29bce49c18590",
      "tree": "8536ec3e5a308639eeef15ac7d6cb55b655fa0fb",
      "parents": [
        "88c2ba3b069f1e0f4694124d02985fa7620a19f1"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Oct 28 16:55:47 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:37 2010 -0400"
      },
      "message": "Btrfs: let the user know space caching is enabled\n\nIf you mount -o space_cache, the option will be persistent across mounts, but to\nmake sure the user knows that they did this, emit a message telling them if they\ndidn\u0027t mount with -o space_cache but the feature is still used.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "88c2ba3b069f1e0f4694124d02985fa7620a19f1",
      "tree": "e41859aca299e14e2658d75e2bf1ef2aea9ab077",
      "parents": [
        "67377734fd24c32cbdfeb697c2e2bd7fed519e75"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Sep 21 14:21:34 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:36 2010 -0400"
      },
      "message": "Btrfs: Add a clear_cache mount option\n\nIf something goes wrong with the free space cache we need a way to make sure\nit\u0027s not loaded on mount and that it\u0027s cleared for everybody.  When you pass the\nclear_cache option it will make it so all block groups are setup to be cleared,\nwhich keeps them from being loaded and then they will be truncated when the\ntransaction is committed.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "67377734fd24c32cbdfeb697c2e2bd7fed519e75",
      "tree": "5b295333ab943d24b190bd3fef2486dfffa7de47",
      "parents": [
        "dde5abee12327d59f968bbfc8151e1b04082a2c4"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Sep 16 16:19:09 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:36 2010 -0400"
      },
      "message": "Btrfs: add support for mixed data+metadata block groups\n\nThere are just a few things that need to be fixed in the kernel to support mixed\ndata+metadata block groups.  Mostly we just need to make sure that if we are\nusing mixed block groups that we continue to allocate mixed block groups as we\nneed them.  Also we need to make sure __find_space_info will find our space info\nif we search for DATA or METADATA only.  Tested this with xfstests and it works\nnicely.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "dde5abee12327d59f968bbfc8151e1b04082a2c4",
      "tree": "eba52b161a83f77c902ecb365ad661d317499717",
      "parents": [
        "9d66e233c7042da27ec699453770f41e567a0442"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Sep 16 16:17:03 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:35 2010 -0400"
      },
      "message": "Btrfs: check cache-\u003ecaching_ctl before returning if caching has started\n\nWith the free space disk caching we can mark the block group as started with the\ncaching, but we don\u0027t have a caching ctl.  This can race with anybody else who\ntries to get the caching ctl before we cache (this is very hard to do btw).  So\ninstead check to see if cache-\u003ecaching_ctl is set, and if not return NULL.\nThanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "9d66e233c7042da27ec699453770f41e567a0442",
      "tree": "27fd70c6c07cb96a48123bdec07e9c2feed90f13",
      "parents": [
        "0cb59c9953171e9adf6da8142a5c85ceb77bb60d"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Aug 25 16:54:15 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:35 2010 -0400"
      },
      "message": "Btrfs: load free space cache if it exists\n\nThis patch actually loads the free space cache if it exists.  The only thing\nthat really changes here is that we need to cache the block group if we\u0027re going\nto remove an extent from it.  Previously we did not do this since the caching\nkthread would pick it up.  With the on disk cache we don\u0027t have this luxury so\nwe need to make sure we read the on disk cache in first, and then remove the\nextent, that way when the extent is unpinned the free space is added to the\nblock group.  This has been tested with all sorts of things.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "0cb59c9953171e9adf6da8142a5c85ceb77bb60d",
      "tree": "f72af47fa18815491814290a1b4907082bd9316d",
      "parents": [
        "0af3d00bad38d3bb9912a60928ad0669f17bdb76"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Jul 02 12:14:14 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 29 09:26:29 2010 -0400"
      },
      "message": "Btrfs: write out free space cache\n\nThis is a simple bit, just dump the free space cache out to our preallocated\ninode when we\u0027re writing out dirty block groups.  There are a bunch of changes\nin inode.c in order to account for special cases.  Mostly when we\u0027re doing the\nwriteout we\u0027re holding trans_mutex, so we need to use the nolock transacation\nfunctions.  Also we can\u0027t do asynchronous completions since the async thread\ncould be blocked on already completed IO waiting for the transaction lock.  This\nhas been tested with xfstests and btrfs filesystem balance, as well as my ENOSPC\ntests.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "0af3d00bad38d3bb9912a60928ad0669f17bdb76",
      "tree": "abbf4c773138a33dcde483ac60f016c4b5e55dcc",
      "parents": [
        "f6f94e2ab1b33f0082ac22d71f66385a60d8157f"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jun 21 14:48:16 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Oct 28 15:59:09 2010 -0400"
      },
      "message": "Btrfs: create special free space cache inode\n\nIn order to save free space cache, we need an inode to hold the data, and we\nneed a special item to point at the right inode for the right block group.  So\nfirst, create a special item that will point to the right inode, and the number\nof extent entries we will have and the number of bitmaps we will have.  We\ntruncate and pre-allocate space everytime to make sure it\u0027s uptodate.\n\nThis feature will be turned on as soon as you mount with -o space_cache, however\nit is safe to boot into old kernels, they will just generate the cache the old\nfashion way.  When you boot back into a newer kernel we will notice that we\nmodified and not the cache and automatically discard the cache.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "e9bb7f10d3617304ef94ff7aa8fefbce3078f08b",
      "tree": "0e56ad5bd8b4914aa82103d72531f8c95b35ce80",
      "parents": [
        "382279336f428c80f344edfc30d53797e3e76146"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Oct 26 12:55:03 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Oct 26 12:55:03 2010 -0400"
      },
      "message": "Btrfs: remove warn_on from use_block_rsv\n\nBecause btrfs_dirty_inode does a btrfs_join_transaction, it doesn\u0027t actually\nreserve space.  It does this so we can try and dirty the inode quickly without\nhaving to deal with the ENOSPC problems.  But if it does get back ENOSPC it\nhandles it properly.  The problem is use_block_rsv does a WARN_ON whenever this\ncase happens, even tho btrfs_dirty_inode takes it into account and actually\nexpects to get -ENOSPC if things are particularly tight.  So instead just remove\nthe warning.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "382279336f428c80f344edfc30d53797e3e76146",
      "tree": "91b1acbc1f60430742ace0b9155c4a014b7dbbaf",
      "parents": [
        "0e78340f3c1fc603e8016c8ac304766bcc65506e"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Oct 26 12:52:53 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Oct 26 12:52:53 2010 -0400"
      },
      "message": "Btrfs: set trans to null in reserve_metadata_bytes if we commit the transaction\n\nbtrfs_commit_transaction will free our trans, but because we pass trans to\nshrink_delalloc we could possibly have a use after free situation.  So instead\nif we commit the transaction, set trans to null and set committed to true so we\ndon\u0027t keep trying to commit a transaction.  This fixes a panic I could reproduce\nat will.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "8bb8ab2e93f9c3c9453e13be0f37d344a32a3a6d",
      "tree": "619600c7458a3af18555f189d53efc4c092b9280",
      "parents": [
        "14ed0ca6e8236f2d264c4a8faec9e3a2b3d04377"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 15 16:52:49 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:55:01 2010 -0400"
      },
      "message": "Btrfs: rework how we reserve metadata bytes\n\nWith multi-threaded writes we were getting ENOSPC early because somebody would\ncome in, start flushing delalloc because they couldn\u0027t make their reservation,\nand in the meantime other threads would come in and use the space that was\ngetting freed up, so when the original thread went to check to see if they had\nspace they didn\u0027t and they\u0027d return ENOSPC.  So instead if we have some free\nspace but not enough for our reservation, take the reservation and then start\ndoing the flushing.  The only time we don\u0027t take reservations is when we\u0027ve\nalready overcommitted our space, that way we don\u0027t have people who come late to\nthe party way overcommitting ourselves.  This also moves all of the retrying and\nflushing code into reserve_metdata_bytes so it\u0027s all uniform.  This keeps my\nfs_mark test from returning -ENOSPC as soon as it starts and actually lets me\nfill up the disk.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "14ed0ca6e8236f2d264c4a8faec9e3a2b3d04377",
      "tree": "1477718d4ab61c258c2a514afec5bfc36e89acf7",
      "parents": [
        "0019f10db6f596f3e14a19f9bd7059a1b85b0853"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 15 15:23:48 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:55:00 2010 -0400"
      },
      "message": "Btrfs: don\u0027t allocate chunks as aggressively\n\nBecause the ENOSPC code over reserves super aggressively we end up allocating\nchunks way more often than we should.  For example with my fs_mark tests on a\n2gb fs I can end up reserved 1gb just for metadata, when only 34mb of that is\nbeing used.  So instead check to see if the amount of space actually used is\nless than 30% of the total space, and if so don\u0027t allocate a chunk, but only if\nwe have at least 256mb of free space to make sure we don\u0027t put too much pressure\non free space.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "0019f10db6f596f3e14a19f9bd7059a1b85b0853",
      "tree": "9f295bc2e335a6890ea29bc0830bda43903671d9",
      "parents": [
        "6d48755d02b150de7f47e7b4753202f2fc9f990f"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 15 15:18:40 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:54:58 2010 -0400"
      },
      "message": "Btrfs: re-work delalloc flushing\n\nCurrently we try and flush delalloc, but we only do that in a sort of weak way,\nwhich works fine in most cases but if we\u0027re under heavy pressure we need to be\nable to wait for flushing to happen.  Also instead of checking the bytes\nreserved in the block_rsv, check the space info since it is more accurate.  The\nsync option will be used in a future patch.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "6d48755d02b150de7f47e7b4753202f2fc9f990f",
      "tree": "82bfa3265acbec93df92c9e0a5dced4e9b224208",
      "parents": [
        "89a55897a2fbbceb94480952784004bf23911d38"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 15 15:13:32 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:54:56 2010 -0400"
      },
      "message": "Btrfs: fix reservation code for mixed block groups\n\nThe global reservation stuff tries to add together DATA and METADATA used in\norder to figure out how much to reserve for everything, but this doesn\u0027t work\nright for mixed block groups.  Instead if we have mixed block groups just set\ndata used to 0.  Also with mixed block groups we will use bytes_may_use for\nkeeping track of delalloc bytes, so we need to take that into account in our\nreservation calculations.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "89a55897a2fbbceb94480952784004bf23911d38",
      "tree": "e62ea1ced4c7941ab53e7aa7047ce8f0af0add9f",
      "parents": [
        "bf5fc093c5b625e4259203f1cee7ca73488a5620"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Oct 14 14:52:27 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:54:55 2010 -0400"
      },
      "message": "Btrfs: fix df regression\n\nThe new ENOSPC stuff breaks out the raid types which breaks the way we were\nreporting df to the system.  This fixes it back so that Available is the total\nspace available to data and used is the actual bytes used by the filesystem.\nThis means that Available is Total - data used - all of the metadata space.\nThanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "a1f765061e1491d5ec467429d0d6adfd9df2f6d9",
      "tree": "0263688d261b69aedf2dad690ac1d93f875eec78",
      "parents": [
        "9fe6206f400646a2322096b56c59891d530e8d51"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Sep 16 14:29:55 2010 -0400"
      },
      "committer": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Oct 22 15:54:51 2010 -0400"
      },
      "message": "Btrfs: stop trying to shrink delalloc if there are no inodes to reclaim\n\nIn very severe ENOSPC cases we can run out of inodes to do delalloc on, which\nmeans we\u0027ll just keep looping trying to shrink delalloc.  Instead, if we fail to\nshrink delalloc 3 times in a row break out since we\u0027re not likely to make any\nprogress.  Tested this with a 100mb fs an xfstests test 13.  Before the patch it\nwould hang the box, with the patch we get -ENOSPC like we should.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\n"
    },
    {
      "commit": "dd3932eddf428571762596e17b65f5dc92ca361b",
      "tree": "57cec5ae2f862037f78b7e993323d77955bb6463",
      "parents": [
        "8786fb70ccb36c7cff64680bb80c46d3a09d44db"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Thu Sep 16 20:51:46 2010 +0200"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "jaxboe@fusionio.com",
        "time": "Thu Sep 16 20:52:58 2010 +0200"
      },
      "message": "block: remove BLKDEV_IFL_WAIT\n\nAll the blkdev_issue_* helpers can only sanely be used for synchronous\ncaller.  To issue cache flushes or barriers asynchronously the caller needs\nto set up a bio by itself with a completion callback to move the asynchronous\nstate machine ahead.  So drop the BLKDEV_IFL_WAIT flag that is always\nspecified when calling blkdev_issue_* and also remove the now unused flags\nargument to blkdev_issue_flush and blkdev_issue_zeroout.  For\nblkdev_issue_discard we need to keep it for the secure discard flag, which\ngains a more descriptive name and loses the bitops vs flag confusion.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Jens Axboe \u003cjaxboe@fusionio.com\u003e\n"
    },
    {
      "commit": "c3b9a62c8f932f32a733d6b628f61f3f28345727",
      "tree": "623a150079db7883444cc404ffcc1e0af4b80b7a",
      "parents": [
        "80f6c29d8a758650d5c9eac05074b4b3e8c266df"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@infradead.org",
        "time": "Wed Aug 18 05:29:12 2010 -0400"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "jaxboe@fusionio.com",
        "time": "Fri Sep 10 12:35:39 2010 +0200"
      },
      "message": "btrfs: replace barriers with explicit flush / FUA usage\n\nSwitch to the WRITE_FLUSH_FUA flag for log writes, remove the EOPNOTSUPP\ndetection for barriers and stop setting the barrier flag for discards.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nAcked-by: Chris Mason \u003cchris.mason@oracle.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Jens Axboe \u003cjaxboe@fusionio.com\u003e\n"
    },
    {
      "commit": "b25b550bb153626df6a48eb8583e923e3dfcf64a",
      "tree": "baca9843877b8b3a254cde92ac2a9072014b5621",
      "parents": [
        "eda054770e5cd0e9ee1568dfcbcf39f9ade4f545",
        "6f902af400b2499c80865c62a06fbbd15cf804fd"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jun 11 14:18:47 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jun 11 14:18:47 2010 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: The file argument for fsync() is never null\n  Btrfs: handle ERR_PTR from posix_acl_from_xattr()\n  Btrfs: avoid BUG when dropping root and reference in same transaction\n  Btrfs: prohibit a operation of changing acl\u0027s mask when noacl mount option used\n  Btrfs: should add a permission check for setfacl\n  Btrfs: btrfs_lookup_dir_item() can return ERR_PTR\n  Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs\n  Btrfs: unwind after btrfs_start_transaction() errors\n  Btrfs: btrfs_iget() returns ERR_PTR\n  Btrfs: handle kzalloc() failure in open_ctree()\n  Btrfs: handle error returns from btrfs_lookup_dir_item()\n  Btrfs: Fix BUG_ON for fs converted from extN\n  Btrfs: Fix null dereference in relocation.c\n  Btrfs: fix remap_file_pages error\n  Btrfs: uninitialized data is check_path_shared()\n  Btrfs: fix fallocate regression\n  Btrfs: fix loop device on top of btrfs\n"
    },
    {
      "commit": "3bf84a5a834d13e7c5c3e8e5b5c6b26012118dd8",
      "tree": "7cc6e70cb2cc175163472141b1ca2dfc4c72eddd",
      "parents": [
        "046f264f6b3b2cf7e5a1769fc92335d8a9316282"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Mon May 31 09:04:46 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jun 11 15:48:35 2010 -0400"
      },
      "message": "Btrfs: Fix BUG_ON for fs converted from extN\n\nTree blocks can live in data block groups in FS converted from extN.\nSo it\u0027s easy to trigger the BUG_ON.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "105a048a4f35f7a74c7cc20b36dd83658b6ec232",
      "tree": "043b1110cda0042ba35d8aae59382bb094d0af3f",
      "parents": [
        "00b9b0af5887fed54e899e3b7f5c2ccf5e739def",
        "9aeead73782c4b8e2a91def36dbf95db28605c95"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 10:43:44 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 10:43:44 2010 -0700"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (27 commits)\n  Btrfs: add more error checking to btrfs_dirty_inode\n  Btrfs: allow unaligned DIO\n  Btrfs: drop verbose enospc printk\n  Btrfs: Fix block generation verification race\n  Btrfs: fix preallocation and nodatacow checks in O_DIRECT\n  Btrfs: avoid ENOSPC errors in btrfs_dirty_inode\n  Btrfs: move O_DIRECT space reservation to btrfs_direct_IO\n  Btrfs: rework O_DIRECT enospc handling\n  Btrfs: use async helpers for DIO write checksumming\n  Btrfs: don\u0027t walk around with task-\u003estate !\u003d TASK_RUNNING\n  Btrfs: do aio_write instead of write\n  Btrfs: add basic DIO read/write support\n  direct-io: do not merge logically non-contiguous requests\n  direct-io: add a hook for the fs to provide its own submit_bio function\n  fs: allow short direct-io reads to be completed via buffered IO\n  Btrfs: Metadata ENOSPC handling for balance\n  Btrfs: Pre-allocate space for data relocation\n  Btrfs: Metadata ENOSPC handling for tree log\n  Btrfs: Metadata reservation for orphan inodes\n  Btrfs: Introduce global metadata reservation\n  ...\n"
    },
    {
      "commit": "933b585f70d524f1b6f0f6867bedb11d3dd82d3b",
      "tree": "f871988129967de5dabb20ae612ea7c22cc4c770",
      "parents": [
        "5bdd3536cbbe2ecd94ecc14410c6b1b31da16381"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed May 26 11:31:00 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed May 26 21:35:34 2010 -0400"
      },
      "message": "Btrfs: drop verbose enospc printk\n\nLess printk is good printk.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "3fd0a5585eb98e074fb9934549c8d85c49756c0d",
      "tree": "3e7ff9bd9678a5eea62818a2f4a50e19dda91a81",
      "parents": [
        "efa56464562991b8c24f965199888806bd8c4b38"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:49:59 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:54 2010 -0400"
      },
      "message": "Btrfs: Metadata ENOSPC handling for balance\n\nThis patch adds metadata ENOSPC handling for the balance code.\nIt is consisted by following major changes:\n\n1. Avoid COW tree leave in the phrase of merging tree.\n\n2. Handle interaction with snapshot creation.\n\n3. make the backref cache can live across transactions.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "d68fc57b7e3245cfacf2e3b47acfed1946a11786",
      "tree": "c2572fcd935017440c8370c8a12ceb49a7fc4f1f",
      "parents": [
        "8929ecfa50f266163832eeacfbc3642ed5eb83b6"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:49:58 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:52 2010 -0400"
      },
      "message": "Btrfs: Metadata reservation for orphan inodes\n\nreserve metadata space for handling orphan inodes\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "8929ecfa50f266163832eeacfbc3642ed5eb83b6",
      "tree": "e0177748af36d49d5f652cff0e421a8268cf7194",
      "parents": [
        "0ca1f7ceb1991099ed5273885ebcf4323948c72e"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:49:58 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:52 2010 -0400"
      },
      "message": "Btrfs: Introduce global metadata reservation\n\nReserve metadata space for extent tree, checksum tree and root tree\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "0ca1f7ceb1991099ed5273885ebcf4323948c72e",
      "tree": "10758d6a55c529aced177da3f6bf45cf26361913",
      "parents": [
        "a22285a6a32390195235171b89d157ed1a1fe932"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:48:47 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:51 2010 -0400"
      },
      "message": "Btrfs: Update metadata reservation for delayed allocation\n\nIntroduce metadata reservation context for delayed allocation\nand update various related functions.\n\nThis patch also introduces EXTENT_FIRST_DELALLOC control bit for\nset/clear_extent_bit. It tells set/clear_bit_hook whether they\nare processing the first extent_state with EXTENT_DELALLOC bit\nset. This change is important if set/clear_extent_bit involves\nmultiple extent_state.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "a22285a6a32390195235171b89d157ed1a1fe932",
      "tree": "3fabc88a029e1af4f2fdcc708e7b62ef3cf3703a",
      "parents": [
        "f0486c68e4bd9a06a5904d3eeb3a0d73a83befb8"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:48:46 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:50 2010 -0400"
      },
      "message": "Btrfs: Integrate metadata reservation with start_transaction\n\nBesides simplify the code, this change makes sure all metadata\nreservation for normal metadata operations are released after\ncommitting transaction.\n\nChanges since V1:\n\nAdd code that check if unlink and rmdir will free space.\n\nAdd ENOSPC handling for clone ioctl.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "f0486c68e4bd9a06a5904d3eeb3a0d73a83befb8",
      "tree": "509428ef400ef45e875a3c448b63b86cbea36aea",
      "parents": [
        "2ead6ae770d9f9dec9f4286bf0fd9001b4388c4b"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:46:25 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:50 2010 -0400"
      },
      "message": "Btrfs: Introduce contexts for metadata reservation\n\nIntroducing metadata reseravtion contexts has two major advantages.\nFirst, it makes metadata reseravtion more traceable. Second, it can\nreclaim freed space and re-add them to the itself after transaction\ncommitted.\n\nBesides add btrfs_block_rsv structure and related helper functions,\nThis patch contains following changes:\n\nMove code that decides if freed tree block should be pinned into\nbtrfs_free_tree_block().\n\nMake space accounting more accurate, mainly for handling read only\nblock groups.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "5da9d01b66458b180a6bee0e637a1d0a3effc622",
      "tree": "47eca61c0ad07ddc791cb7677c548d663fbac818",
      "parents": [
        "424499dbd0c4d88742bf581b5714b27fb44b9fef"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:46:25 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:48 2010 -0400"
      },
      "message": "Btrfs: Shrink delay allocated space in a synchronized\n\nShrink delayed allocation space in a synchronized manner is more\ncontrollable than flushing all delay allocated space in an async\nthread.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "424499dbd0c4d88742bf581b5714b27fb44b9fef",
      "tree": "f46a76c8f23c7045b18b31a9206d0b22f324aad1",
      "parents": [
        "b742bb82f1676d50103ade0ba89bfb79debabe73"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:46:25 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:48 2010 -0400"
      },
      "message": "Btrfs: Kill allocate_wait in space_info\n\nWe already have fs_info-\u003echunk_mutex to avoid concurrent\nchunk creation.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "b742bb82f1676d50103ade0ba89bfb79debabe73",
      "tree": "ceac53988a3c158571fb91d54e3027403363fb47",
      "parents": [
        "e40152ee1e1c7a63f4777791863215e3faa37a86"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sun May 16 10:46:24 2010 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue May 25 10:34:47 2010 -0400"
      },
      "message": "Btrfs: Link block groups of different raid types\n\nThe size of reserved space is stored in space_info. If block groups\nof different raid types are linked to separate space_info, changing\nallocation profile will corrupt reserved space accounting.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "fbd9b09a177a481eda256447c881f014f29034fe",
      "tree": "ef7e213045382f82a1e3e3cf134d196a1045dd7a",
      "parents": [
        "6b4517a7913a09d3259bb1d21c9cb300f12294bd"
      ],
      "author": {
        "name": "Dmitry Monakhov",
        "email": "dmonakhov@openvz.org",
        "time": "Wed Apr 28 17:55:06 2010 +0400"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "jens.axboe@oracle.com",
        "time": "Wed Apr 28 19:47:36 2010 +0200"
      },
      "message": "blkdev: generalize flags for blkdev_issue_fn functions\n\nThe patch just convert all blkdev_issue_xxx function to common\nset of flags. Wait/allocation semantics preserved.\n\nSigned-off-by: Dmitry Monakhov \u003cdmonakhov@openvz.org\u003e\nSigned-off-by: Jens Axboe \u003cjens.axboe@oracle.com\u003e\n"
    },
    {
      "commit": "d6cf853d4d73c268fc8920ac4e812ee26a12847c",
      "tree": "c909145638eb5c4897ea7e424759eb9b564ebe18",
      "parents": [
        "6a945f38be5f2c198853069a336c887a51d1a238",
        "9f680ce04ea19dabbbafe01b57b61930a9b70741"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 12 18:37:04 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 12 18:37:04 2010 -0700"
      },
      "message": "Merge branch \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: make sure the chunk allocator doesn\u0027t create zero length chunks\n  Btrfs: fix data enospc check overflow\n"
    },
    {
      "commit": "795d580baec0d5386b83a8b557df47c20810e86b",
      "tree": "d0387c37562e9e27a4f43cf7ae425319cbdad359",
      "parents": [
        "449cedf099b23a250e7d61982e35555ccb871182",
        "109f6aef5fc436f355ad027f4d97bd696df2049a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 05 13:21:15 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 05 13:21:15 2010 -0700"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: add check for changed leaves in setup_leaf_for_split\n  Btrfs: create snapshot references in same commit as snapshot\n  Btrfs: fix small race with delalloc flushing waitqueue\u0027s\n  Btrfs: use add_to_page_cache_lru, use __page_cache_alloc\n  Btrfs: fix chunk allocate size calculation\n  Btrfs: kill max_extent mount option\n  Btrfs: fail to mount if we have problems reading the block groups\n  Btrfs: check btrfs_get_extent return for IS_ERR()\n  Btrfs: handle kmalloc() failure in inode lookup ioctl\n  Btrfs: dereferencing freed memory\n  Btrfs: Simplify num_stripes\u0027s calculation logical for __btrfs_alloc_chunk()\n  Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree()\n  Btrfs: Remove unnecessary finish_wait() in wait_current_trans()\n  Btrfs: add NULL check for do_walk_down()\n  Btrfs: remove duplicate include in ioctl.c\n\nFix trivial conflict in fs/btrfs/compression.c due to slab.h include\ncleanups.\n"
    },
    {
      "commit": "ab6e24103cbd215e922938a4f58c75194761a60e",
      "tree": "d54479feddd7fe625888dd62084621d4d0871c4b",
      "parents": [
        "109f6aef5fc436f355ad027f4d97bd696df2049a"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Mar 19 14:38:13 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Apr 05 16:04:50 2010 -0400"
      },
      "message": "Btrfs: fix data enospc check overflow\n\nBecause we account for reserved space we get from the allocator before we\nactually account for allocating delalloc space, we can have a small window where\nthe amount of \"used\" space in a space_info is more than the total amount of\nspace in the space_info.  This will cause a overflow in our check, so it will\nseem like we have _tons_ of free space, and we\u0027ll allow reservations to occur\nthat will end up larger than the amount of space we have.  I\u0027ve seen users\nreport ENOSPC panic\u0027s in cow_file_range a few times recently, so I tried to\nreproduce this problem and found I could reproduce it if I ran one of my tests\nin a loop for like 20 minutes.  With this patch my test ran all night without\nissues.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "b5cb160084fad438c513d0952849e597ffe9e3d9",
      "tree": "91a5a1352cc803695b2ae3b3217c82d423ca5edf",
      "parents": [
        "28ecb60906e86e74e9ad4ac7e0218d8631e73a94"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Mar 12 19:28:18 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Apr 05 14:42:00 2010 -0400"
      },
      "message": "Btrfs: fix small race with delalloc flushing waitqueue\u0027s\n\nEverytime we start a new flushing thread, we init the waitqueue if there isn\u0027t a\nflushing thread running.  The problem with this is we check\nspace_info-\u003eflushing, which we clear right before doing a wake_up on the\nflushing waitqueue, which causes problems if we init the waitqueue in the middle\nof clearing the flushing flagh and calling wake_up.  This is hard to hit, but\nthe code is wrong anyway, so init the flushing/allocating waitqueue when\ncreating the space info and let it be.  I haven\u0027t seen the panic since I\u0027ve been\nusing this patch.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "287a0ab91d25ca982f895a76402e5893b47ed7a6",
      "tree": "fcbe35daef2b4cbdc2bfc0c6026e7c45faef0245",
      "parents": [
        "1b1d1f6625e517a08640ddb4b8f8a0e025243fe3"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Mar 19 18:07:23 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Mar 30 21:19:09 2010 -0400"
      },
      "message": "Btrfs: kill max_extent mount option\n\nAs Yan pointed out, theres not much reason for all this complicated math to\naccount for file extents being split up into max_extent chunks, since they are\nlikely to all end up in the same leaf anyway.  Since there isn\u0027t much reason to\nuse max_extent, just remove the option altogether so we have one less thing we\nneed to test.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "1b1d1f6625e517a08640ddb4b8f8a0e025243fe3",
      "tree": "d662fe7e7d9ddec1214982b3dcd955228e18562f",
      "parents": [
        "6cf8bfbf5e88edfb09a2bf0631a067060f534592"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Mar 19 20:49:55 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Mar 30 21:19:09 2010 -0400"
      },
      "message": "Btrfs: fail to mount if we have problems reading the block groups\n\nWe don\u0027t actually check the return value of btrfs_read_block_groups, so we can\npossibly succeed to mount, but then fail to say read the superblock xattr for\nselinux which will cause the vfs code to deactivate the super.\n\nThis is a problem because in find_free_extent we just assume that we\nwill find the right space_info for the allocation we want.  But if we\nfailed to read the block groups, we won\u0027t have setup any space_info\u0027s,\nand we\u0027ll hit a NULL pointer deref in find_free_extent.\n\nThis patch fixes that problem by checking the return value of\nbtrfs_read_block_groups, and failing out properly.  I\u0027ve also added a\ncheck in find_free_extent so if for some reason we don\u0027t find an\nappropriate space_info, we just return -ENOSPC.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "90d2c51dbb4db05c040bc7db264bb7ab35e35455",
      "tree": "d97b50f0a064366aecce9671b8e1791263999e59",
      "parents": [
        "2f3014fc2ab1e25c36531e19164c48182c168995"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Thu Mar 25 12:37:12 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Mar 30 21:19:08 2010 -0400"
      },
      "message": "Btrfs: add NULL check for do_walk_down()\n\nbtrfs_find_create_tree_block() may return NULL, so we must check the returned\nvalue, or we will access a NULL pointer.\n\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "5a0e3ad6af8660be21ca98a971cd00f331318c05",
      "tree": "5bfb7be11a03176a87296a43ac6647975c00a1d1",
      "parents": [
        "ed391f4ebf8f701d3566423ce8f17e614cde9806"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 24 17:04:11 2010 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 30 22:02:32 2010 +0900"
      },
      "message": "include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h\n\npercpu.h is included by sched.h and module.h and thus ends up being\nincluded when building most .c files.  percpu.h includes slab.h which\nin turn includes gfp.h making everything defined by the two files\nuniversally available and complicating inclusion dependencies.\n\npercpu.h -\u003e slab.h dependency is about to be removed.  Prepare for\nthis change by updating users of gfp and slab facilities include those\nheaders directly instead of assuming availability.  As this conversion\nneeds to touch large number of source files, the following script is\nused as the basis of conversion.\n\n  http://userweb.kernel.org/~tj/misc/slabh-sweep.py\n\nThe script does the followings.\n\n* Scan files for gfp and slab usages and update includes such that\n  only the necessary includes are there.  ie. if only gfp is used,\n  gfp.h, if slab is used, slab.h.\n\n* When the script inserts a new include, it looks at the include\n  blocks and try to put the new include such that its order conforms\n  to its surrounding.  It\u0027s put in the include block which contains\n  core kernel includes, in the same order that the rest are ordered -\n  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there\n  doesn\u0027t seem to be any matching order.\n\n* If the script can\u0027t find a place to put a new include (mostly\n  because the file doesn\u0027t have fitting include block), it prints out\n  an error message indicating which .h file needs to be added to the\n  file.\n\nThe conversion was done in the following steps.\n\n1. The initial automatic conversion of all .c files updated slightly\n   over 4000 files, deleting around 700 includes and adding ~480 gfp.h\n   and ~3000 slab.h inclusions.  The script emitted errors for ~400\n   files.\n\n2. Each error was manually checked.  Some didn\u0027t need the inclusion,\n   some needed manual addition while adding it to implementation .h or\n   embedding .c file was more appropriate for others.  This step added\n   inclusions to around 150 files.\n\n3. The script was run again and the output was compared to the edits\n   from #2 to make sure no file was left behind.\n\n4. Several build tests were done and a couple of problems were fixed.\n   e.g. lib/decompress_*.c used malloc/free() wrappers around slab\n   APIs requiring slab.h to be added manually.\n\n5. The script was run on all .h files but without automatically\n   editing them as sprinkling gfp.h and slab.h inclusions around .h\n   files could easily lead to inclusion dependency hell.  Most gfp.h\n   inclusion directives were ignored as stuff from gfp.h was usually\n   wildly available and often used in preprocessor macros.  Each\n   slab.h inclusion directive was examined and added manually as\n   necessary.\n\n6. percpu.h was updated not to include slab.h.\n\n7. Build test were done on the following configurations and failures\n   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my\n   distributed build env didn\u0027t work with gcov compiles) and a few\n   more options had to be turned off depending on archs to make things\n   build (like ipr on powerpc/64 which failed due to missing writeq).\n\n   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.\n   * powerpc and powerpc64 SMP allmodconfig\n   * sparc and sparc64 SMP allmodconfig\n   * ia64 SMP allmodconfig\n   * s390 SMP allmodconfig\n   * alpha SMP allmodconfig\n   * um on x86_64 SMP allmodconfig\n\n8. percpu.h modifications were reverted so that it could be applied as\n   a separate patch and serve as bisection point.\n\nGiven the fact that I had only a couple of failures from tests on step\n6, I\u0027m fairly confident about the coverage of this conversion patch.\nIf there is a breakage, it\u0027s likely to be something in one of the arch\nheaders which should be easily discoverable easily on most builds of\nthe specific arch.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nGuess-its-ok-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\n"
    },
    {
      "commit": "2ac55d41b5d6bf49e76bc85db5431240617e2f8f",
      "tree": "ee8e2a716ef0b50388ef5e4a86387ec0499bca89",
      "parents": [
        "5a1a3df1f6c86926cfe8657e6f9b4b4c2f467d60"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Feb 03 19:33:23 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Mar 15 11:00:13 2010 -0400"
      },
      "message": "Btrfs: cache the extent state everywhere we possibly can V2\n\nThis patch just goes through and fixes everybody that does\n\nlock_extent()\nblah\nunlock_extent()\n\nto use\n\nlock_extent_bits()\nblah\nunlock_extent_cached()\n\nand pass around a extent_state so we only have to do the searches once per\nfunction.  This gives me about a 3 mb/s boots on my random write test.  I have\nnot converted some things, like the relocation and ioctl\u0027s, since they aren\u0027t\nheavily used and the relocation stuff is in the middle of being re-written.  I\nalso changed the clear_extent_bit() to only unset the cached state if we are\nclearing EXTENT_LOCKED and related stuff, so we can do things like this\n\nlock_extent_bits()\nclear delalloc bits\nunlock_extent_cached()\n\nwithout losing our cached state.  I tested this thoroughly and turned on\nLEAK_DEBUG to make sure we weren\u0027t leaking extent states, everything worked out\nfine.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "7a7965f83e89f0be506a96769938a721e4e5ae50",
      "tree": "be4ffe67af162c6c7cfd0780c507fd5f2d522635",
      "parents": [
        "d7ce5843bb28ada6845ab2ae8510ba3f12d33154"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Mon Feb 01 02:41:17 2010 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Feb 04 11:31:45 2010 -0500"
      },
      "message": "Btrfs: Fix oopsen when dropping empty tree.\n\nWhen dropping a empty tree, walk_down_tree() skips checking\nextent information for the tree root. This will triggers a\nBUG_ON in walk_up_proc().\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "11dfe35a0108097f2df1f042c485fa7f758c2cdf",
      "tree": "83d5af6992db15ee61bc0c960626c378a2f5b436",
      "parents": [
        "a9cc71a60c29a09174bee2fcef8f924c529fd4b7"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Nov 13 20:12:59 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Jan 17 20:40:30 2010 -0500"
      },
      "message": "Btrfs: fix possible panic on unmount\n\nWe can race with the unmount of an fs and the stopping of a kthread where we\nwill free the block group before we\u0027re done using it.  The reason for this is\nbecause we do not hold a reference on the block group while its caching, since\nthe allocator drops its reference once it exits or moves on to the next block\ngroup.  This patch fixes the problem by taking a reference to the block group\nbefore we start caching and dropping it when we\u0027re done to make sure all\naccesses to the block group are safe.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "83d3c9696fed237a3d96fce18299e2fcf112109f",
      "tree": "cafe54ba7801332c54adab5b1af3e0865bc32386",
      "parents": [
        "20a5239a5d0f340e29827a6a2d28a138001c44b8"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Dec 07 21:45:59 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 17 12:33:38 2009 -0500"
      },
      "message": "Btrfs: make metadata chunks smaller\n\nThis patch makes us a bit less zealous about making sure we have enough free\nmetadata space by pearing down the size of new metadata chunks to 256mb instead\nof 1gb.  Also, we used to try an allocate metadata chunks when allocating data,\nbut that sort of thing is done elsewhere now so we can just remove it.  With my\n-ENOSPC test I used to have 3gb reserved for metadata out of 75gb, now I have\n1.7gb.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "06b2331f8333ec6edf41662757ce8882cc1747d5",
      "tree": "9b8316a84e2cb5fa5ed4d16cdbfecd965ed7870c",
      "parents": [
        "86b9f2eca5e0984145e3c7698a7cd6dd65c2a93f"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Nov 26 09:31:11 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 17 12:33:36 2009 -0500"
      },
      "message": "Btrfs: don\u0027t add extent 0 to the free space cache v2\n\nIf block group 0 is completely free, btrfs_read_block_groups will\nadd extent [0, BTRFS_SUPER_INFO_OFFSET) to the free space cache.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "86b9f2eca5e0984145e3c7698a7cd6dd65c2a93f",
      "tree": "75dd0a52848b6f5396023f811f1a602f62b9d34e",
      "parents": [
        "55ef68990029fcd8d04d42fc184aa7fb18cf309e"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Nov 12 09:36:50 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 17 12:33:35 2009 -0500"
      },
      "message": "Btrfs: Fix per root used space accounting\n\nThe bytes_used field in root item was originally planned to\ntrace the amount of used data and tree blocks. But it never\nworked right since we can\u0027t trace freeing of data accurately.\nThis patch changes it to only trace the amount of tree blocks.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "24bbcf0442ee04660a5a030efdbb6d03f1c275cb",
      "tree": "aa57d77d29cc5150b272cc3f6465f10262fcbaac",
      "parents": [
        "f34f57a3ab4e73304d78c125682f1a53cd3975f2"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Nov 12 09:36:34 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Dec 17 12:33:35 2009 -0500"
      },
      "message": "Btrfs: Add delayed iput\n\niput() can trigger new transactions if we are dropping the\nfinal reference, so calling it in btrfs_commit_transaction\nmay end up deadlock. This patch adds delayed iput to avoid\nthe issue.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "8cef4e160d74920ad1725f58c89fd75ec4c4ac38",
      "tree": "c1592369c7085e75d67a1709438a4f56351b2348",
      "parents": [
        "22763c5cf3690a681551162c15d34d935308c8d7"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Nov 12 09:33:26 2009 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Dec 15 21:24:25 2009 -0500"
      },
      "message": "Btrfs: Avoid superfluous tree-log writeout\n\nWe allow two log transactions at a time, but use same flag\nto mark dirty tree-log btree blocks. So we may flush dirty\nblocks belonging to newer log transaction when committing a\nlog transaction. This patch fixes the issue by using two\nflags to mark dirty tree-log btree blocks.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "aa021baa3295fa6e3f367d80f8955dd5176656eb",
      "tree": "13da8275b1957399bc4fa19ec7cc313d48694e31",
      "parents": [
        "404291ac9e72d118fcadeb939a69b2caa0a0e9ca",
        "a6dbd429d8dd3382bbd9594b8d2ec74843a260d9"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 11 13:38:59 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 11 13:38:59 2009 -0800"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: fix panic when trying to destroy a newly allocated\n  Btrfs: allow more metadata chunk preallocation\n  Btrfs: fallback on uncompressed io if compressed io fails\n  Btrfs: find ideal block group for caching\n  Btrfs: avoid null deref in unpin_extent_cache()\n  Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root\n  Btrfs: fix some metadata enospc issues\n  Btrfs: fix how we set max_size for free space clusters\n  Btrfs: cleanup transaction starting and fix journal_info usage\n  Btrfs: fix data allocation hint start\n"
    },
    {
      "commit": "33b258086441dd07e00133c79fcd8cbc6a76d737",
      "tree": "beab74a12b7650576dbe2f97301f0905699d4292",
      "parents": [
        "f5a84ee3cdd88d96b7bcede10af58598ad8d52a7"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Nov 11 10:16:57 2009 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Nov 11 14:20:20 2009 -0500"
      },
      "message": "Btrfs: allow more metadata chunk preallocation\n\nOn an FS where all of the space has not been allocated into chunks yet,\nthe enospc can return enospc just because the existing metadata chunks\nare full.\n\nWe get around this by allowing more metadata chunks to be allocated up\nto a certain limit, and finding the right limit is a little fuzzy.  The\nproblem is the reservations for delalloc would preallocate way too much\nof the FS as metadata.  We need to start saying no and just force some\nIO to happen.\n\nBut we also need to let a reasonable amount of the FS become metadata.\nThis bumps the hard limit up, later releases will have a better system.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "ccf0e72537a9f68611ca575121afd08e2b4d0fb0",
      "tree": "d2fd54693847b6ed1307ed1eb5d3f87b95e31538",
      "parents": [
        "4eb3991c5def39bcf553c14ebe2618fcb47b627f"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Nov 10 21:23:48 2009 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Nov 11 14:20:19 2009 -0500"
      },
      "message": "Btrfs: find ideal block group for caching\n\nThis patch changes a few things.  Hopefully the comments are helpfull, but\nI\u0027ll try and be as verbose here.\n\nProblem:\n\nMy fedora box was taking 1 minute and 21 seconds to boot with btrfs as root.\nPart of this problem was we pick the first block group we can find and start\ncaching it, even if it may not have enough free space.  The other problem is\nwe only search for cached block groups the first time around, which we won\u0027t\nfind any cached block groups because this is a newly mounted fs, so we end up\ncaching several block groups during bootup, which with alot of fragmentation\ntakes around 30-45 seconds to complete, which bogs down the system.  So\n\nSolution:\n\n1) Don\u0027t cache block groups willy-nilly at first.  Instead try and figure out\nwhich block group has the most free, and therefore will take the least amount\nof time to cache.\n\n2) Don\u0027t be so picky about cached block groups.  The other problem is once\nwe\u0027ve filled up a cluster, if the block group isn\u0027t finished caching the next\ntime we try and do the allocation we\u0027ll completely ignore the cluster and\nstart searching from the beginning of the space, which makes us cache more\nblock groups, which slows us down even more.  So instead of skipping block\ngroups that are not finished caching when we have a hint, only skip the block\ngroup if it hasn\u0027t started caching yet.\n\nThere is one other tweak in here.  Before if we allocated a chunk and still\ncouldn\u0027t find new space, we\u0027d end up switching the space info to force another\nchunk allocation.  This could make us end up with way too many chunks, so keep\ntrack of this particular case.\n\nWith this patch and my previous cluster fixes my fedora box now boots in 43\nseconds, and according to the bootchart is not held up by our block group\ncaching at all.\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "dcbeb0bec5f2695c3ff53f174efb8e03c209f3f3",
      "tree": "30d223a3a3c7470c657284ef030657bd1753d4d3",
      "parents": [
        "2b650df2cea96e487f2fd9ecaa68e533ea9b5ed7",
        "444528b3e614f7f2391488d9bca8e0b872db909b"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 15 15:06:37 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 15 15:06:37 2009 -0700"
      },
      "message": "Merge branch \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: always pin metadata in discard mode\n  Btrfs: enable discard support\n  Btrfs: add -o discard option\n  Btrfs: properly wait log writers during log sync\n  Btrfs: fix possible ENOSPC problems with truncate\n  Btrfs: fix btrfs acl #ifdef checks\n  Btrfs: streamline tree-log btree block writeout\n  Btrfs: avoid tree log commit when there are no changes\n  Btrfs: only write one super copy during fsync\n"
    },
    {
      "commit": "444528b3e614f7f2391488d9bca8e0b872db909b",
      "tree": "5326be87610ed3fc7a14d0f28e96e5e22207cf5f",
      "parents": [
        "0634857488ec6e28fa22920cd0bee3c2ac07ccfd"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Oct 14 09:38:28 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Oct 14 10:32:50 2009 -0400"
      },
      "message": "Btrfs: always pin metadata in discard mode\n\nWe have an optimization in btrfs to allow blocks to be\nimmediately freed if they were allocated in this transaction and never\nwritten.  Otherwise they are pinned and freed when the transaction\ncommits.\n\nThis isn\u0027t optimal for discard mode because immediately freeing\nthem means immediately discarding them.  It is better to give the\nblock to the pinning code and letting the (slow) discard happen later.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "0634857488ec6e28fa22920cd0bee3c2ac07ccfd",
      "tree": "6cfa348aea76f39b658d3a36ab51807a4ac7bcf7",
      "parents": [
        "e244a0aeb6a599c19a7c802cda6e2d67c847b154"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Wed Oct 14 09:24:59 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Oct 14 10:32:49 2009 -0400"
      },
      "message": "Btrfs: enable discard support\n\nThe discard support code in btrfs currently is guarded by ifdefs for\nBIO_RW_DISCARD, which is never defines as it\u0027s the name of an enum\nmemeber.  Just remove the useless ifdefs to actually enable the code.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "e244a0aeb6a599c19a7c802cda6e2d67c847b154",
      "tree": "392d8d48c4e6676a552230135ad448d522007ece",
      "parents": [
        "86df7eb921a009515285e7171363fa57dd2d7d31"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@lst.de",
        "time": "Wed Oct 14 09:24:59 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Oct 14 10:32:49 2009 -0400"
      },
      "message": "Btrfs: add -o discard option\n\nEnable discard by default is not a good idea given the the trim speed\nof SSD prototypes we\u0027ve seen, and the carecteristics for many high-end\narrays.  Turn of discards by default and require the -o discard option\nto enable them on.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "474a503d4bf77ae0cbe484dd0842a2648c0b1c28",
      "tree": "70e3e4023209e741546491a58622bd45fb13e308",
      "parents": [
        "d43c36dc6b357fa1806800f18aa30123c747a6d1",
        "ac6889cbb254be1ffea376bea4a96ce9be0e0ed0"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Oct 11 11:23:13 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Oct 11 11:23:13 2009 -0700"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:\n  Btrfs: fix file clone ioctl for bookend extents\n  Btrfs: fix uninit compiler warning in cow_file_range_nocow\n  Btrfs: constify dentry_operations\n  Btrfs: optimize back reference update during btrfs_drop_snapshot\n  Btrfs: remove negative dentry when deleting subvolumne\n  Btrfs: optimize fsync for the single writer case\n  Btrfs: async delalloc flushing under space pressure\n  Btrfs: release delalloc reservations on extent item insertion\n  Btrfs: delay clearing EXTENT_DELALLOC for compressed extents\n  Btrfs: cleanup extent_clear_unlock_delalloc flags\n  Btrfs: fix possible softlockup in the allocator\n  Btrfs: fix deadlock on async thread startup\n"
    },
    {
      "commit": "94fcca9f8999e7828d5f4dc181daa39cad2af38a",
      "tree": "68842517a4d10d080bc4f70abae19e480d2ac049",
      "parents": [
        "efefb1438be269897585934fc6c05deb4dfa01ce"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Fri Oct 09 09:25:16 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Oct 09 09:25:16 2009 -0400"
      },
      "message": "Btrfs: optimize back reference update during btrfs_drop_snapshot\n\nThis patch reading level 0 tree blocks that already use full backrefs.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "e3ccfa989752c083ceb23c823a84f7ce3a081e61",
      "tree": "197558cbee7b773b8270cd861f882a37beacd2ed",
      "parents": [
        "32c00aff718bb54a214b39146bdd9ac01511cd25"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Oct 07 20:44:34 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Oct 08 15:21:23 2009 -0400"
      },
      "message": "Btrfs: async delalloc flushing under space pressure\n\nThis patch moves the delalloc flushing that occurs when we are under space\npressure off to a async thread pool.  This helps since we only free up\nmetadata space when we actually insert the extent item, which means it takes\nquite a while for space to be free\u0027ed up if we wait on all ordered extents.\nHowever, if space is freed up due to inline extents being inserted, we can\nwake people who are waiting up early, and they can finish their work.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "32c00aff718bb54a214b39146bdd9ac01511cd25",
      "tree": "c094ee494723a9ebc9d83cb95607f06351665639",
      "parents": [
        "a3429ab70b04363c6190964e82f04f44f3e34cf0"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Thu Oct 08 13:34:05 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Oct 08 15:21:10 2009 -0400"
      },
      "message": "Btrfs: release delalloc reservations on extent item insertion\n\nThis patch fixes an issue with the delalloc metadata space reservation\ncode.  The problem is we used to free the reservation as soon as we\nallocated the delalloc region.  The problem with this is if we are not\ninserting an inline extent, we don\u0027t actually insert the extent item until\nafter the ordered extent is written out.  This patch does 3 things,\n\n1) It moves the reservation clearing stuff into the ordered code, so when\nwe remove the ordered extent we remove the reservation.\n2) It adds a EXTENT_DO_ACCOUNTING flag that gets passed when we clear\ndelalloc bits in the cases where we want to clear the metadata reservation\nwhen we clear the delalloc extent, in the case that we do an inline extent\nor we invalidate the page.\n3) It adds another waitqueue to the space info so that when we start a fs\nwide delalloc flush, anybody else who also hits that area will simply wait\nfor the flush to finish and then try to make their allocation.\n\nThis has been tested thoroughly to make sure we did not regress on\nperformance.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "1cdda9b81ac0e6ee986f034fa02f221679e1c11a",
      "tree": "ae9394e50bc2418e8c3054de12ed44962d6f261a",
      "parents": [
        "61d92c328c16419fc96dc50dd16f8b8c695409ec"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Tue Oct 06 10:04:28 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Oct 06 10:04:28 2009 -0400"
      },
      "message": "Btrfs: fix possible softlockup in the allocator\n\nLike the cluster allocating stuff, we can lockup the box with the normal\nallocation path.  This happens when we\n\n1) Start to cache a block group that is severely fragmented, but has a decent\namount of free space.\n2) Start to commit a transaction\n3) Have the commit try and empty out some of the delalloc inodes with extents\nthat are relatively large.\n\nThe inodes will not be able to make the allocations because they will ask for\nallocations larger than a contiguous area in the free space cache.  So we will\nwait for more progress to be made on the block group, but since we\u0027re in a\ncommit the caching kthread won\u0027t make any more progress and it already has\nenough free space that wait_block_group_cache_progress will just return.  So,\nif we wait and fail to make the allocation the next time around, just loop and\ngo to the next block group.  This keeps us from getting stuck in a softlockup.\nThanks,\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "25472b880c69c0daa485c4f80a6550437ed1149f",
      "tree": "d12bc091e8991513db0d2891111ba773eb5c52e2",
      "parents": [
        "17d857be649a21ca90008c6dc425d849fa83db5c",
        "ab93dbecfba72bbc04b7036343d180aaff1b61a3"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Oct 01 12:58:13 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Oct 01 12:58:13 2009 -0400"
      },
      "message": "Merge branch \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable into for-linus\n"
    },
    {
      "commit": "dd7e0b7b02ccff73b87032e20fc5b4f2c1cfcc14",
      "tree": "2168da63d84f05106b2aa8eb8f5cdc8859f1e176",
      "parents": [
        "1ab86aedbc7845a946b4ba4edf37762629970708"
      ],
      "author": {
        "name": "Sage Weil",
        "email": "sage@newdream.net",
        "time": "Tue Sep 29 18:38:44 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Sep 29 19:50:07 2009 -0400"
      },
      "message": "Btrfs: fix deadlock with free space handling and user transactions\n\nIf an ioctl-initiated transaction is open, we can\u0027t force a commit during\nthe free space checks in order to free up pinned extents or else we\ndeadlock.  Just ENOSPC instead.\n\nA more satisfying solution that reserves space for the entire user\ntransaction up front is forthcoming...\n\nSigned-off-by: Sage Weil \u003csage@newdream.net\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "9ed74f2dba6ebf9f30b80554290bfc73cc3ef083",
      "tree": "763d58a4a11ceca26dcdaedefb1fd662c4e2fa8b",
      "parents": [
        "c65ddb52dc412c9b67681b1aa16cd1bac8434e24"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Sep 11 16:12:44 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 28 16:29:42 2009 -0400"
      },
      "message": "Btrfs: proper -ENOSPC handling\n\nAt the start of a transaction we do a btrfs_reserve_metadata_space() and\nspecify how many items we plan on modifying.  Then once we\u0027ve done our\nmodifications and such, just call btrfs_unreserve_metadata_space() for\nthe same number of items we reserved.\n\nFor keeping track of metadata needed for data I\u0027ve had to add an extent_io op\nfor when we merge extents.  This lets us track space properly when we are doing\nsequential writes, so we don\u0027t end up reserving way more metadata space than\nwhat we need.\n\nThe only place where the metadata space accounting is not done is in the\nrelocation code.  This is because Yan is going to be reworking that code in the\nnear future, so running btrfs-vol -b could still possibly result in a ENOSPC\nrelated panic.  This patch also turns off the metadata_ratio stuff in order to\nallow users to more efficiently use their disk space.\n\nThis patch makes it so we track how much metadata we need for an inode\u0027s\ndelayed allocation extents by tracking how many extents are currently\nwaiting for allocation.  It introduces two new callbacks for the\nextent_io tree\u0027s, merge_extent_hook and split_extent_hook.  These help\nus keep track of when we merge delalloc extents together and split them\nup.  Reservations are handled prior to any actually dirty\u0027ing occurs,\nand then we unreserve after we dirty.\n\nbtrfs_unreserve_metadata_for_delalloc() will make the appropriate\nunreservations as needed based on the number of reservations we\ncurrently have and the number of extents we currently have.  Doing the\nreservation outside of doing any of the actual dirty\u0027ing lets us do\nthings like filemap_flush() the inode to try and force delalloc to\nhappen, or as a last resort actually start allocation on all delalloc\ninodes in the fs.  This has survived dbench, fs_mark and an fsx torture\ntest.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "54bcf382daf08c1396edb8b81e650b58930ccaef",
      "tree": "64b941f09489b5c9ee63e4ad43d736bfce911b21",
      "parents": [
        "94a8d5caba74211ec76dac80fc6e2d5c391530df",
        "c65ddb52dc412c9b67681b1aa16cd1bac8434e24"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Sep 24 10:00:58 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Sep 24 10:00:58 2009 -0400"
      },
      "message": "Merge branch \u0027master\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable into for-linus\n\nConflicts:\n\tfs/btrfs/super.c\n"
    },
    {
      "commit": "7ce618db9878689f87897b673fa3329070860fc7",
      "tree": "a149e88a2f28c2fd5ad515f7351af9832540fedb",
      "parents": [
        "33b4d47f5e24b986f486d7de9a2df915ad1fdfbc"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Sep 22 14:48:44 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Sep 22 14:48:44 2009 -0400"
      },
      "message": "Btrfs: fix early enospc during balancing\n\nWe now do extra checks before a balance to make sure\nthere is room for the balance to take place.  One of\nthe checks was testing to see if we were trying to\nbalance away the last block group of a given type.\n\nIf there is no space available for new chunks, we\nshould not try and balance away the last block group\nof a give type.  But, the code wasn\u0027t checking for\navailable chunk space, and so it was exiting too soon.\n\nThe fix here is to combine some of the checks and make\nsure we try to allocate new chunks when we\u0027re balancing\nthe last block group.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "33b4d47f5e24b986f486d7de9a2df915ad1fdfbc",
      "tree": "198fb5c7d48bfd9e4010eb253e9e7573172a7680",
      "parents": [
        "1b2da372b0324b5c604fc8790e70a7efbeacb0b6"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Sep 22 14:45:50 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Sep 22 14:45:50 2009 -0400"
      },
      "message": "Btrfs: deal with NULL space info\n\nAfter a balance it is briefly possible for the space info\nfield in the inode to be NULL.  This adds some checks\nto make sure things properly deal with the NULL value.\n\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "1b2da372b0324b5c604fc8790e70a7efbeacb0b6",
      "tree": "13d7ba24660c865efd184a25b7b0ac8830a6d7f1",
      "parents": [
        "25891f796d8d30f2b86b1e84d78721b44d573d70"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Sep 11 16:11:20 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 19:23:50 2009 -0400"
      },
      "message": "Btrfs: account for space used by the super mirrors\n\nAs we get closer to proper -ENOSPC handling in btrfs, we need more accurate\nspace accounting for the space info\u0027s.  Currently we exclude the free space for\nthe super mirrors, but the space they take up isn\u0027t accounted for in any of the\ncounters.  This patch introduces bytes_super, which keeps track of the amount\nof bytes used for a super mirror in the block group cache and space info.  This\nmakes sure that our free space caclucations will be completely accurate.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "f61408b81cd040a594dc0b65171230c4d5cc917d",
      "tree": "0fe8757007b75ecbdb369b9f2d9750696d822092",
      "parents": [
        "f019f4264ae8c0169332592bcee419ee90e7c827"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Sep 11 16:11:20 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 19:23:49 2009 -0400"
      },
      "message": "Btrfs: remove dead code\n\nThis patch removes a bunch of dead code from the snapshot removal stuff.  It\nwas confusing me when doing the metadata ENOSPC stuff so I killed it.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "0a24325e6d8cfb150eba0aa279615ef27b5f6aec",
      "tree": "f0ca16ab43d87d526a1f918c7e960711256fd47f",
      "parents": [
        "ba1bf4818baf68d914ef9e3b06fbea6acb674fe4"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Sep 11 16:11:20 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 19:23:49 2009 -0400"
      },
      "message": "Btrfs: don\u0027t keep retrying a block group if we fail to allocate a cluster\n\nThe box can get locked up in the allocator if we happen upon a block group\nunder these conditions:\n\n1) During a commit, so caching threads cannot make progress\n2) Our block group currently is in the middle of being cached\n3) Our block group currently has plenty of free space in it\n4) Our block group is so fragmented that it ends up having no free space chunks\nlarger than min_bytes calculated by btrfs_find_space_cluster.\n\nWhat happens is we try and do btrfs_find_space_cluster, which fails because it\nis unable to find enough free space chunks that are large than min_bytes and\nare close enough together.  Since the block group is not cached we do a\nwait_block_group_cache_progress, which waits for the number of bytes we need,\nexcept the block group already has _plenty_ of free space, its just severely\nfragmented, so we loop and try again, ad infinitum.  This patch keeps us from\nwaiting on the block group to finish caching if we failed to find a free space\ncluster before.  It also makes sure that we don\u0027t even try to find a free space\ncluster if we are on our last loop in the allocator, since we will have tried\neverything at this point at it is futile.\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "ba1bf4818baf68d914ef9e3b06fbea6acb674fe4",
      "tree": "1068d6ce508333a75668181bfe0e42956d4d8780",
      "parents": [
        "1fb58a6051cd904a9f8e0344b22e31921d6b5a4d"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Sep 11 16:11:19 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 19:23:48 2009 -0400"
      },
      "message": "Btrfs: make balance code choose more wisely when relocating\n\nCurrently, we can panic the box if the first block group we go to move is of a\ntype where there is no space left to move those extents.  For example, if we\nfill the disk up with data, and then we try to balance and we have no room to\nmove the data nor room to allocate new chunks, we will panic.  Change this by\nchecking to see if we have room to move this chunk around, and if not, return\n-ENOSPC and move on to the next chunk.  This will make sure we remove block\ngroups that are moveable, like if we have alot of empty metadata block groups,\nand then that way we make room to be able to balance our data chunks as well.\nTested this with an fs that would panic on btrfs-vol -b normally, but no longer\npanics with this patch.\n\nV1-\u003eV2:\n-actually search for a free extent on the device to make sure we can allocate a\nchunk if need be.\n\n-fix btrfs_shrink_device to make sure we actually try to relocate all the\nchunks, and then if we can\u0027t return -ENOSPC so if we are doing a btrfs-vol -r\nwe don\u0027t remove the device with data still on it.\n\n-check to make sure the block group we are going to relocate isn\u0027t the last one\nin that particular space\n\n-fix a bug in btrfs_shrink_device where we would change the device\u0027s size and\nnot fix it if we fail to do our relocate\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "76dda93c6ae2c1dc3e6cde34569d6aca26b0c918",
      "tree": "f5ca46ec89d4ae2c762952d5f35e2c6f95ac046a",
      "parents": [
        "4df27c4d5cc1dda54ed7d0a8389347f2df359cf9"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Mon Sep 21 16:00:26 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 16:00:26 2009 -0400"
      },
      "message": "Btrfs: add snapshot/subvolume destroy ioctl\n\nThis patch adds snapshot/subvolume destroy ioctl.  A subvolume that isn\u0027t being\nused and doesn\u0027t contains links to other subvolumes can be destroyed.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "1c4850e21df8b441164d910bc611ef46a01d5d75",
      "tree": "aeccbf3495421d1343bbe08cb824ac1ae6764e43",
      "parents": [
        "b917b7c3be50435fa8257591b964934e917f2d45"
      ],
      "author": {
        "name": "Yan, Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Mon Sep 21 15:55:59 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Sep 21 15:55:59 2009 -0400"
      },
      "message": "Btrfs: speed up snapshot dropping\n\nThis patch contains two changes to avoid unnecessary tree block reads during\nsnapshot dropping.\n\nFirst, check tree block\u0027s reference count and flags before reading the tree\nblock. if reference count \u003e 1 and there is no need to update backrefs, we can\navoid reading the tree block.\n\nSecond, save when snapshot was created in root_key.offset. we can compare block\npointer\u0027s generation with snapshot\u0027s creation generation during updating\nbackrefs. If a given block was created before snapshot was created, the\nsnapshot can\u0027t be the tree block\u0027s owner. So we can avoid reading the block.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "11833d66be94b514652466802100378046c16b72",
      "tree": "2b00b36d0aa42e9e10cecf3bf723eb70a607afec",
      "parents": [
        "6e74057c4686dc12ea767b4bdc50a63876056e1c"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Fri Sep 11 16:11:19 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Sep 17 15:47:36 2009 -0400"
      },
      "message": "Btrfs: improve async block group caching\n\nThis patch gets rid of two limitations of async block group caching.\nThe old code delays handling pinned extents when block group is in\ncaching. To allocate logged file extents, the old code need wait\nuntil block group is fully cached. To get rid of the limitations,\nThis patch introduces a data structure to track the progress of\ncaching. Base on the caching progress, we know which extents should\nbe added to the free space cache when handling the pinned extents.\nThe logged file extents are also handled in a similar way.\n\nThis patch also changes how pinned extents are tracked. The old\ncode uses one tree to track pinned extents, and copy the pinned\nextents tree at transaction commit time. This patch makes it use\ntwo trees to track pinned extents. One tree for extents that are\npinned in the running transaction, one tree for extents that can\nbe unpinned. At transaction commit time, we swap the two trees.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "746cd1e7e4a555ddaee53b19a46e05c9c61eaf09",
      "tree": "d129194669e0122113a5cc86003a4a7711450284",
      "parents": [
        "3d2257f157c2324acbc0fa0fa54e8626a987edd2"
      ],
      "author": {
        "name": "Christoph Hellwig",
        "email": "hch@infradead.org",
        "time": "Sat Sep 12 07:35:43 2009 +0200"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "jens.axboe@oracle.com",
        "time": "Mon Sep 14 08:24:53 2009 +0200"
      },
      "message": "block: use blkdev_issue_discard in blk_ioctl_discard\n\nblk_ioctl_discard duplicates large amounts of code from blkdev_issue_discard,\nthe only difference between the two is that blkdev_issue_discard needs to\nsend a barrier discard request and blk_ioctl_discard a non-barrier one,\nand blk_ioctl_discard needs to wait on the request.  To facilitates this\nadd a flags argument to blkdev_issue_discard to control both aspects of the\nbehaviour.  This will be very useful later on for using the waiting\nfuncitonality for other callers.\n\nBased on an earlier patch from Matthew Wilcox \u003cmatthew@wil.cx\u003e.\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Jens Axboe \u003cjens.axboe@oracle.com\u003e\n"
    },
    {
      "commit": "890871be854b5f5e43e7ba2475f706209906cc24",
      "tree": "9d087adf7a28bb910992d07d93ea2a992e394110",
      "parents": [
        "57fd5a5ff8b48b99e90b22fc143082aba755c6c0"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Sep 02 16:24:52 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Sep 11 13:31:05 2009 -0400"
      },
      "message": "Btrfs: switch extent_map to a rw lock\n\nThere are two main users of the extent_map tree.  The\nfirst is regular file inodes, where it is evenly spread\nbetween readers and writers.\n\nThe second is the chunk allocation tree, which maps blocks from\nlogical addresses to phyiscal ones, and it is 99.99% reads.\n\nThe mapping tree is a point of lock contention during heavy IO\nworkloads, so this commit switches things to a rw lock.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "013f1b12f4fc479f697acae2f31bad220162cd03",
      "tree": "b51225aa32f249de352840b31b49eb9799fdafe8",
      "parents": [
        "6606bb97e146a387932efee263745b7240a11193"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 31 14:57:55 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 31 14:57:55 2009 -0400"
      },
      "message": "Btrfs: make sure the async caching thread advances the key\n\nThe async caching thread can end up looping forever if a given\nsearch puts it at the last key in a leaf.  It will end up calling\nbtrfs_next_leaf and then checking if it needs to politely drop\nthe read semaphore.\n\nMost of the time this looping isn\u0027t noticed because it is able to\nmake progress the next time around.  But, during log replay,\nwe wait on the async caching thread to finish, and the async thread\nis waiting on the commit, and no progress is really made.\n\nThe fix used here is to copy the key out of the next leaf,\nthat way our search lands there properly.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "f36f3042eae238bdaefe7c79310afe573bfc3622",
      "tree": "83ea0e271dedeef36423509be7f4189b838d14b5",
      "parents": [
        "276e680d192a67d222fcea51af37b056feffb665"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jul 30 10:04:48 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jul 30 10:14:46 2009 -0400"
      },
      "message": "Btrfs: be more polite in the async caching threads\n\nThe semaphore used by the async caching threads can prevent a\ntransaction commit, which can make the FS appear to stall.  This\nreleases the semaphore more often when a transaction commit is\nin progress.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "276e680d192a67d222fcea51af37b056feffb665",
      "tree": "137bae016c30f24e7fafcbc8073e3411b732eb31",
      "parents": [
        "f25784b35f590c81d5fb8245a8cd45e1afb6f1b2"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Jul 30 09:40:40 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jul 30 09:40:40 2009 -0400"
      },
      "message": "Btrfs: preserve commit_root for async caching\n\nThe async block group caching code uses the commit_root pointer\nto get a stable version of the extent allocation tree for scanning.\nThis copy of the tree root isn\u0027t going to change and it significantly\nreduces the complexity of the scanning code.\n\nDuring a commit, we have a loop where we update the extent allocation\ntree root.  We need to loop because updating the root pointer in\nthe tree of tree roots may allocate blocks which may change the\nextent allocation tree.\n\nRight now the commit_root pointer is changed inside this loop.  It\nis more correct to change the commit_root pointer only after all the\nlooping is done.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "f25784b35f590c81d5fb8245a8cd45e1afb6f1b2",
      "tree": "71306747041b6e4a5eaccc5028c770fed29b3f87",
      "parents": [
        "68b38550ddbea13d296184bf69edff387618b1d3"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Tue Jul 28 08:41:57 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Jul 28 08:41:57 2009 -0400"
      },
      "message": "Btrfs: Fix async caching interaction with unmount\n\n- don\u0027t stop the caching thread until btrfs_commit_super return.\n\n- if caching is interrupted by umount, set last to (u64)-1.\n  otherwise the un-scanned range of block group will be considered\n  as free extent.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "68b38550ddbea13d296184bf69edff387618b1d3",
      "tree": "c0c3901b77f273ac08c39c641586884f41a90b84",
      "parents": [
        "631c07c8d12bcc6ce4a0fbfbd64ea843d78e2b10"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jul 27 13:57:01 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Jul 27 13:57:01 2009 -0400"
      },
      "message": "Btrfs: change how we unpin extents\n\nWe are racy with async block caching and unpinning extents.  This patch makes\nthings much less complicated by only unpinning the extent if the block group is\ncached.  We check the block_group-\u003ecached var under the block_group-\u003elock spin\nlock.  If it is set to BTRFS_CACHE_FINISHED then we update the pinned counters,\nand unpin the extent and add the free space back.  If it is not set to this, we\nstart the caching of the block group so the next time we unpin extents we can\nunpin the extent.  This keeps us from racing with the async caching threads,\nlets us kill the fs wide async thread counter, and keeps us from having to set\nDELALLOC bits for every extent we hit if there are caching kthreads going.\n\nOne thing that needed to be changed was btrfs_free_super_mirror_extents.  Now\ninstead of just looking for LOCKED extents, we also look for DIRTY extents,\nsince we could have left some extents pinned in the previous transaction that\nwill never get freed now that we are unmounting, which would cause us to leak\nmemory.  So btrfs_free_super_mirror_extents has been changed to\nbtrfs_free_pinned_extents, and it will clear the extents locked for the super\nmirror, and any remaining pinned extents that may be present.  Thank you,\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "283bb1979fa8580c4037d8df251449368c292a3b",
      "tree": "4207fcd1e595cfb4074b719fd22e70277e72464f",
      "parents": [
        "ebecd3d9d2adba144c15f1d35c78e0c26ead1bfd"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 24 16:30:55 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 24 16:30:55 2009 -0400"
      },
      "message": "Btrfs: clear all space_info-\u003efull after removing a block group\n\nBtrfs allocates individual extents from block groups, and each\nblock group has a specific type.  It may hold metadata, data\nmirrored or striped etc.\n\nWhen we balance space (btrfs-vol -b) or remove a drive (btrfs-vol -r)\nwe free block groups.  Once a block group is freed, the space it was\nusing on the device may be available for use by new block groups.\n\nbtrfs_remove_block_group was clearing the flag that said\n\u0027our devices are full, don\u0027t even try to allocate new block groups\u0027,\nbut it was only clearing that flag for a specific type of block group.\n\nThis commit clears the full flag for all of the types of block groups,\nmaking it much more likely that we\u0027ll be able to balance space when\nthe drive is close to full.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "817d52f8dba26d0295c26035531c30ce5f1e3c3e",
      "tree": "5230153e86323de48e7e1440352d1b74d2d9961d",
      "parents": [
        "963030817060e4f109be1993b9ae8f81dbf5e11a"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jul 13 21:29:25 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 24 09:23:39 2009 -0400"
      },
      "message": "Btrfs: async block group caching\n\nThis patch moves the caching of the block group off to a kthread in order to\nallow people to allocate sooner.  Instead of blocking up behind the caching\nmutex, we instead kick of the caching kthread, and then attempt to make an\nallocation.  If we cannot, we wait on the block groups caching waitqueue, which\nthe caching kthread will wake the waiting threads up everytime it finds 2 meg\nworth of space, and then again when its finished caching.  This is how I tested\nthe speedup from this\n\nmkfs the disk\nmount the disk\nfill the disk up with fs_mark\nunmount the disk\nmount the disk\ntime touch /mnt/foo\n\nWithout my changes this took 11 seconds on my box, with these changes it now\ntakes 1 second.\n\nAnother change thats been put in place is we lock the super mirror\u0027s in the\npinned extent map in order to keep us from adding that stuff as free space when\ncaching the block group.  This doesn\u0027t really change anything else as far as the\npinned extent map is concerned, since for actual pinned extents we use\nEXTENT_DIRTY, but it does mean that when we unmount we have to go in and unlock\nthose extents to keep from leaking memory.\n\nI\u0027ve also added a check where when we are reading block groups from disk, if the\namount of space used \u003d\u003d the size of the block group, we go ahead and mark the\nblock group as cached.  This drastically reduces the amount of time it takes to\ncache the block groups.  Using the same test as above, except doing a dd to a\nfile and then unmounting, it used to take 33 seconds to umount, now it takes 3\nseconds.\n\nThis version uses the commit_root in the caching kthread, and then keeps track\nof how many async caching threads are running at any given time so if one of the\nasync threads is still running as we cross transactions we can wait until its\nfinished before handling the pinned extents.  Thank you,\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "963030817060e4f109be1993b9ae8f81dbf5e11a",
      "tree": "7d81121b7e68d3d5b3317afba53d36bc1bf8221a",
      "parents": [
        "83121942b28daffc9526b14b7843d8cdbd3db641"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jul 13 21:29:25 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jul 24 09:23:30 2009 -0400"
      },
      "message": "Btrfs: use hybrid extents+bitmap rb tree for free space\n\nCurrently btrfs has a problem where it can use a ridiculous amount of RAM simply\ntracking free space.  As free space gets fragmented, we end up with thousands of\nentries on an rb-tree per block group, which usually spans 1 gig of area.  Since\nwe currently don\u0027t ever flush free space cache back to disk this gets to be a\nbit unweildly on large fs\u0027s with lots of fragmentation.\n\nThis patch solves this problem by using PAGE_SIZE bitmaps for parts of the free\nspace cache.  Initially we calculate a threshold of extent entries we can\nhandle, which is however many extent entries we can cram into 16k of ram.  The\nmaximum amount of RAM that should ever be used to track 1 gigabyte of diskspace\nwill be 32k of RAM, which scales much better than we did before.\n\nOnce we pass the extent threshold, we start adding bitmaps and using those\ninstead for tracking the free space.  This patch also makes it so that any free\nspace thats less than 4 * sectorsize we go ahead and put into a bitmap.  This is\nnice since we try and allocate out of the front of a block group, so if the\nfront of a block group is heavily fragmented and then has a huge chunk of free\nspace at the end, we go ahead and add the fragmented areas to bitmaps and use a\nnormal extent entry to track the big chunk at the back of the block group.\n\nI\u0027ve also taken the opportunity to revamp how we search for free space.\nPreviously we indexed free space via an offset indexed rb tree and a bytes\nindexed rb tree.  I\u0027ve dropped the bytes indexed rb tree and use only the offset\nindexed rb tree.  This cuts the number of tree operations we were doing\npreviously down by half, and gives us a little bit of a better allocation\npattern since we will always start from a specific offset and search forward\nfrom there, instead of searching for the size we need and try and get it as\nclose as possible to the offset we want.\n\nI\u0027ve given this a healthy amount of testing pre-new format stuff, as well as\npost-new format stuff.  I\u0027ve booted up my fedora box which is installed on btrfs\nwith this patch and ran with it for a few days without issues.  I\u0027ve not seen\nany performance regressions in any of my tests.\n\nSince the last patch Yan Zheng fixed a problem where we could have overlapping\nentries, so updating their offset inline would cause problems.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjbacik@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "4a8c9a62d7f7f058eed4b8a6f2c890a887778093",
      "tree": "d3d099197e5ddc94f737dbad273810b902b05307",
      "parents": [
        "33c66f430bfa3a033e70470e4c93f967156b696d"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Wed Jul 22 10:07:05 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Jul 22 10:07:05 2009 -0400"
      },
      "message": "Btrfs: make sure all dirty blocks are written at commit time\n\nWrite dirty block groups may allocate new block, and so may add new delayed\nback ref. btrfs_run_delayed_refs may make some block groups dirty.\n\ncommit_cowonly_roots does not handle the recursion properly, and some dirty\nblocks can be left unwritten at commit time. This patch moves\nbtrfs_run_delayed_refs into the loop that writes dirty block groups, and makes\nthe code not break out of the loop until there are no dirty block groups or\ndelayed back refs.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "68f5a38c3ea4ae9cc7a40f86ff6d6d031583d93a",
      "tree": "bc409be7ea8e4da6fa6b9d6d97d0af715aa982f9",
      "parents": [
        "9b627e9bf49ebfeb060dfae0435bdba06cf27cb8"
      ],
      "author": {
        "name": "Hu Tao",
        "email": "cnhutao@gmail.com",
        "time": "Thu Jul 02 13:55:45 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jul 02 13:55:45 2009 -0400"
      },
      "message": "Btrfs: fix error message formatting\n\nMake an error msg look nicer by inserting a space between number and word.\n\nSigned-off-by: Hu Tao \u003chu.taoo@gmail.com\u003e\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "2c47e605a91dde6b0514f689645e7ab336c8592a",
      "tree": "d541e61440f06f37d17e2d14cbaa78fc0cd41ff2",
      "parents": [
        "a970b0a16cc416a509d5ae8b1d70978664e6f4fe"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Sat Jun 27 21:07:35 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jul 02 13:41:17 2009 -0400"
      },
      "message": "Btrfs: update backrefs while dropping snapshot\n\nThe new backref format has restriction on type of backref item.  If a tree\nblock isn\u0027t referenced by its owner tree, full backrefs must be used for the\npointers in it. When a tree block loses its owner tree\u0027s reference, backrefs\nfor the pointers in it should be updated to full backrefs. Current\nbtrfs_drop_snapshot misses the code that updates backrefs, so it\u0027s unsafe for\ngeneral use.\n\nThis patch adds backrefs update code to btrfs_drop_snapshot.  It isn\u0027t a\nproblem in the restricted form btrfs_drop_snapshot is used today, but for\ngeneral snapshot deletion this update is required.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "85d4198e40c289dd623cecd16601fa613559bed7",
      "tree": "8f76a9567063bded47b69f2f39d557307cdf5b54",
      "parents": [
        "fd0fb038d5a308c7faddd1701be5e70aaffec98b"
      ],
      "author": {
        "name": "Yan Zheng",
        "email": "zheng.yan@oracle.com",
        "time": "Thu Jun 11 08:51:10 2009 -0400"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Thu Jun 11 08:51:34 2009 -0400"
      },
      "message": "Btrfs: check duplicate backrefs for both data and metadata\n\nlookup_inline_extent_backref only checks for duplicate backref for data\nextents. It assumes backrefs for tree block never conflict.\n\nThis patch makes lookup_inline_extent_backref check for duplicate backrefs\nfor both data and tree block, so that we can detect potential bug earlier.\nThis is a safety check, strictly speaking it is not required.\n\nSigned-off-by: Yan Zheng \u003czheng.yan@oracle.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    }
  ],
  "next": "163e783e6a8b1e8bcb4c9084d438091386b589df"
}
