)]}'
{
  "log": [
    {
      "commit": "4660ba63f1c4e07c20a435e084f12ba48a82bd2b",
      "tree": "494973a1dd4102eede20298f478574801af31b86",
      "parents": [
        "958ede7f1b72b29cd0d29ec88ee2bcb4c87dab61",
        "ec29ed5b407d618a8128f5942aade9e1758aa14b"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 25 14:03:39 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 25 14:03:39 2011 -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 fiemap bugs with delalloc\n  Btrfs: set FMODE_EXCL in btrfs_device-\u003emode\n  Btrfs: make btrfs_rm_device() fail gracefully\n  Btrfs: Avoid accessing unmapped kernel address\n  Btrfs: Fix BTRFS_IOC_SUBVOL_SETFLAGS ioctl\n  Btrfs: allow balance to explicitly allocate chunks as it relocates\n  Btrfs: put ENOSPC debugging under a mount option\n"
    },
    {
      "commit": "c87f08ca44e83b2c8d28f63f9c33f3a270a04bbe",
      "tree": "05cebe37380861a89faaea50c1ccb360ffb0f975",
      "parents": [
        "91435650c233b93e0da389db74f4b2c11c5ad2d4"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Feb 16 13:57:04 2011 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Feb 16 15:28:47 2011 -0500"
      },
      "message": "Btrfs: allow balance to explicitly allocate chunks as it relocates\n\nBtrfs device shrinking and balancing ends up reallocating all the blocks\nin order to allow COW to move them to new destinations.  It is somewhat\nawkward in terms of ENOSPC because most of the enospc code is built\naround the idea that some operation on a reference counted tree triggers\nallocations in the non-reference counted trees.\n\nThis commit changes the balancing code to deal with enospc by trying to\nallocate a new chunk.  If that allocation succeeds, we go ahead and\nretry whatever failed due to enospc.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "91435650c233b93e0da389db74f4b2c11c5ad2d4",
      "tree": "c4f8fef1348a0ac188dca47020d86b206ed5d41f",
      "parents": [
        "c26a920373a983b52223eed5a13b97404d8b4158"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Feb 16 13:10:41 2011 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Wed Feb 16 15:28:36 2011 -0500"
      },
      "message": "Btrfs: put ENOSPC debugging under a mount option\n\nENOSPC in btrfs is getting to the point where the extra debugging isn\u0027t\nrequired.  I\u0027ve put it under mount -o enospc_debug just in case someone\nis having difficult problems.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "007a14af2649c9ac77f38cd23469518ffb8b355a",
      "tree": "d6bc4477c11d7c8fd892f059acf0fc1ed547ba52",
      "parents": [
        "261cd298a8c363d7985e3482946edb4bfedacf98",
        "c26a920373a983b52223eed5a13b97404d8b4158"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Feb 15 08:00:35 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Feb 15 08:00:35 2011 -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: check return value of alloc_extent_map()\n  Btrfs - Fix memory leak in btrfs_init_new_device()\n  btrfs: prevent heap corruption in btrfs_ioctl_space_info()\n  Btrfs: Fix balance panic\n  Btrfs: don\u0027t release pages when we can\u0027t clear the uptodate bits\n  Btrfs: fix page-\u003eprivate races\n"
    },
    {
      "commit": "c26a920373a983b52223eed5a13b97404d8b4158",
      "tree": "a7f76fe1b0cecbc712f0b152ff537805f126b113",
      "parents": [
        "67100f255dba284bcbb5ce795355dad1cff35658"
      ],
      "author": {
        "name": "Tsutomu Itoh",
        "email": "t-itoh@jp.fujitsu.com",
        "time": "Mon Feb 14 00:45:29 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Feb 14 16:21:37 2011 -0500"
      },
      "message": "Btrfs: check return value of alloc_extent_map()\n\nI add the check on the return value of alloc_extent_map() to several places.\nIn addition, alloc_extent_map() returns only the address or NULL.\nTherefore, check by IS_ERR() is unnecessary. So, I remove IS_ERR() checking.\n\nSigned-off-by: Tsutomu Itoh \u003ct-itoh@jp.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "cb5520f02c010e3cb974b9ac06f30aafa2eebc38",
      "tree": "8342407cebb6420f04f46694b8d812552a14cb49",
      "parents": [
        "eee4da2cef8e2dc2b15066e9ebb5b2ff63396eb3",
        "3a90983dbdcb2f4f48c0d771d8e5b4d88f27fae6"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Feb 07 14:06:18 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Feb 07 14:06:18 2011 -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: (33 commits)\n  Btrfs: Fix page count calculation\n  btrfs: Drop __exit attribute on btrfs_exit_compress\n  btrfs: cleanup error handling in btrfs_unlink_inode()\n  Btrfs: exclude super blocks when we read in block groups\n  Btrfs: make sure search_bitmap finds something in remove_from_bitmap\n  btrfs: fix return value check of btrfs_start_transaction()\n  btrfs: checking NULL or not in some functions\n  Btrfs: avoid uninit variable warnings in ordered-data.c\n  Btrfs: catch errors from btrfs_sync_log\n  Btrfs: make shrink_delalloc a little friendlier\n  Btrfs: handle no memory properly in prepare_pages\n  Btrfs: do error checking in btrfs_del_csums\n  Btrfs: use the global block reserve if we cannot reserve space\n  Btrfs: do not release more reserved bytes to the global_block_rsv than we need\n  Btrfs: fix check_path_shared so it returns the right value\n  btrfs: check return value of btrfs_start_ioctl_transaction() properly\n  btrfs: fix return value check of btrfs_join_transaction()\n  fs/btrfs/inode.c: Add missing IS_ERR test\n  btrfs: fix missing break in switch phrase\n  btrfs: fix several uncheck memory allocations\n  ...\n"
    },
    {
      "commit": "3c14874acc71180553fb5aba528e3cf57c5b958b",
      "tree": "6fe93b4c4d0048cbabf6b7887f33020fd89f46b1",
      "parents": [
        "13dbc08987f25d9dba488a34b44b43e3844b027c"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Feb 02 15:53:47 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Feb 06 07:17:44 2011 -0500"
      },
      "message": "Btrfs: exclude super blocks when we read in block groups\n\nThis has been resulting in a BUT_ON(ret) after btrfs_reserve_extent in\nbtrfs_cow_file_range.  The reason is we don\u0027t actually calculate the bytes_super\nfor a block group until we go to cache it, which means that the space_info can\nhand out reservations for space that it doesn\u0027t actually have, and we can run\nout of data space.  This is also a problem if you are using space caching since\nwe don\u0027t ever calculate bytes_super for the block groups.  So instead everytime\nwe read a block group call exclude_super_stripes, which calculates the\nbytes_super for the block group so it can be left out of the space_info.  Then\nwhenever caching completes we just call free_excluded_extents so that the super\nexcluded extents are freed up.  Also if we are unmounting and we hit any block\ngroups that haven\u0027t been cached we still need to call free_excluded_extents to\nmake sure things are cleaned up properly.  Thanks,\n\nReported-by: Arne Jansen \u003csensille@gmx.net\u003e\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "98d5dc13e7e74b77ca3b4c3cbded9f48d2dbbbb7",
      "tree": "8e75f67b28b5b0d909483a06bb5258e0ba0c9789",
      "parents": [
        "5df67083488ccbad925f583b698ab38f8629a016"
      ],
      "author": {
        "name": "Tsutomu Itoh",
        "email": "t-itoh@jp.fujitsu.com",
        "time": "Thu Jan 20 06:19:37 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Feb 01 07:17:27 2011 -0500"
      },
      "message": "btrfs: fix return value check of btrfs_start_transaction()\n\nThe error check of btrfs_start_transaction() is added, and the mistake\nof the error check on several places is corrected.\n\nSigned-off-by: Tsutomu Itoh \u003ct-itoh@jp.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "5df67083488ccbad925f583b698ab38f8629a016",
      "tree": "ec428f27f1b72c4d8e284831d4bef8894b2b8457",
      "parents": [
        "c87fb6fdcaf7560940b31a0c78c3e6370e3433cf"
      ],
      "author": {
        "name": "Tsutomu Itoh",
        "email": "t-itoh@jp.fujitsu.com",
        "time": "Tue Feb 01 09:17:35 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Feb 01 07:16:37 2011 -0500"
      },
      "message": "btrfs: checking NULL or not in some functions\n\nBecause NULL is returned when the memory allocation fails,\nit is checked whether it is NULL.\n\nSigned-off-by: Tsutomu Itoh \u003ct-itoh@jp.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "b1953bcec95c189b1eea690a08e89646d7750bda",
      "tree": "be7906f6568daecc6196433053ff0ea785b3d175",
      "parents": [
        "7adf5dfbb3af65a00e20b3ead224c3a1b40e4ec4"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Fri Jan 21 21:10:01 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Jan 31 16:27:28 2011 -0500"
      },
      "message": "Btrfs: make shrink_delalloc a little friendlier\n\nXfstests 224 will just sit there and spin for ever until eventually we give up\nflushing delalloc and exit.  On my box this took several hours.  I could not\ninterrupt this process either, even though we use INTERRUPTIBLE.  So do 2 things\n\n1) Keep us from looping over and over again without reclaiming anything\n2) If we get interrupted exit the loop\n\nI tested this and the test now exits in a reasonable amount of time, and can be\ninterrupted with ctrl+c.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "68a82277b8619e6d0f2738b1d9b160b627e81e92",
      "tree": "91d0f86f009cbbd8bf16643e41fb090a08e859a7",
      "parents": [
        "e9e22899de661af94cb9995885fd04e4c738838b"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jan 24 21:43:20 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jan 28 16:40:37 2011 -0500"
      },
      "message": "Btrfs: use the global block reserve if we cannot reserve space\n\nWe call use_block_rsv right before we make an allocation in order to make sure\nwe have enough space.  Now normally people have called btrfs_start_transaction()\nwith the appropriate amount of space that we need, so we just use some of that\npre-reserved space and move along happily.  The problem is where people use\nbtrfs_join_transaction(), which doesn\u0027t actually reserve any space.  So we try\nand reserve space here, but we cannot flush delalloc, so this forces us to\nreturn -ENOSPC when in reality we have plenty of space.  The most common symptom\nis seeing a bunch of \"couldn\u0027t dirty inode\" messages in syslog.  With\nxfstests 224 we end up falling back to start_transaction and then doing all the\nflush delalloc stuff which causes to hang for a very long time.\n\nSo instead steal from the global reserve, which is what this is meant for\nanyway.  With this patch and the other 2 I have sent xfstests 224 now passes\nsuccessfully.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "e9e22899de661af94cb9995885fd04e4c738838b",
      "tree": "3932040f0c5416e6ecbf508fa5d99b50eefbbc18",
      "parents": [
        "dedefd7215d3ec451291ca393e5c8e4c1882c8c6"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Mon Jan 24 21:43:19 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jan 28 16:40:37 2011 -0500"
      },
      "message": "Btrfs: do not release more reserved bytes to the global_block_rsv than we need\n\nWhen we do btrfs_block_rsv_release, if global_block_rsv is not full we will\nrelease all the extra bytes to global_block_rsv, even if it\u0027s only a little\nshort of the amount of space that we need to reserve.  This causes us to starve\nourselves of reservable space during the transaction which will force us to\nshrink delalloc bytes and commit the transaction more often than we should.  So\ninstead just add the amount of bytes we need to add to the global reserve so\nreserved \u003d\u003d size, and then add the rest back into the space_info for general\nuse.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "3612b49598c303cfb22a4b609427f829828e2427",
      "tree": "d0e9eabb176777ab80af5d78eab0555044172370",
      "parents": [
        "34d19bada00f4825588b338a8ee193820f9ceeb0"
      ],
      "author": {
        "name": "Tsutomu Itoh",
        "email": "t-itoh@jp.fujitsu.com",
        "time": "Tue Jan 25 02:51:38 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Jan 28 16:40:37 2011 -0500"
      },
      "message": "btrfs: fix return value check of btrfs_join_transaction()\n\nThe error check of btrfs_join_transaction()/btrfs_join_transaction_nolock()\nis added, and the mistake of the error check in several places is\ncorrected.\n\nFor more stable Btrfs, I think that we should reduce BUG_ON().\nBut, I think that long time is necessary for this.\nSo, I propose this patch as a short-term solution.\n\nWith this patch:\n - To more stable Btrfs, the part that should be corrected is clarified.\n - The panic isn\u0027t done by the NULL pointer reference etc. (even if\n   BUG_ON() is increased temporarily)\n - The error code is returned in the place where the error can be easily\n   returned.\n\nAs a long-term plan:\n - BUG_ON() is reduced by using the forced-readonly framework, etc.\n\nSigned-off-by: Tsutomu Itoh \u003ct-itoh@jp.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "eee2a817df7c5a6e569f353f8be78cc1b3604bb6",
      "tree": "f721beb4712c732702d3383d3c6a52da8b5bbb20",
      "parents": [
        "83896fb5e51594281720d145164f866ba769abd5",
        "acce952b0263825da32cf10489413dec78053347"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:43:43 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:43:43 2011 -0800"
      },
      "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: (25 commits)\n  Btrfs: forced readonly mounts on errors\n  btrfs: Require CAP_SYS_ADMIN for filesystem rebalance\n  Btrfs: don\u0027t warn if we get ENOSPC in btrfs_block_rsv_check\n  btrfs: Fix memory leak in btrfs_read_fs_root_no_radix()\n  btrfs: check NULL or not\n  btrfs: Don\u0027t pass NULL ptr to func that may deref it.\n  btrfs: mount failure return value fix\n  btrfs: Mem leak in btrfs_get_acl()\n  btrfs: fix wrong free space information of btrfs\n  btrfs: make the chunk allocator utilize the devices better\n  btrfs: restructure find_free_dev_extent()\n  btrfs: fix wrong calculation of stripe size\n  btrfs: try to reclaim some space when chunk allocation fails\n  btrfs: fix wrong data space statistics\n  fs/btrfs: Fix build of ctree\n  Btrfs: fix off by one while setting block groups readonly\n  Btrfs: Add BTRFS_IOC_SUBVOL_GETFLAGS/SETFLAGS ioctls\n  Btrfs: Add readonly snapshots support\n  Btrfs: Refactor btrfs_ioctl_snap_create()\n  btrfs: Extract duplicate decompress code\n  ...\n"
    },
    {
      "commit": "acce952b0263825da32cf10489413dec78053347",
      "tree": "d934881f247484d7b6917bebc40828600bb6b76c",
      "parents": [
        "6f88a4403def422bd8e276ddf6863d6ac71435d2"
      ],
      "author": {
        "name": "liubo",
        "email": "liubo2009@cn.fujitsu.com",
        "time": "Thu Jan 06 19:30:25 2011 +0800"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Mon Jan 17 15:13:08 2011 -0500"
      },
      "message": "Btrfs: forced readonly mounts on errors\n\nThis patch comes from \"Forced readonly mounts on errors\" ideas.\n\nAs we know, this is the first step in being more fault tolerant of disk\ncorruptions instead of just using BUG() statements.\n\nThe major content:\n- add a framework for generating errors that should result in filesystems\n  going readonly.\n- keep FS state in disk super block.\n- make sure that all of resource will be freed and released at umount time.\n- make sure that fter FS is forced readonly on error, there will be no more\n  disk change before FS is corrected. For this, we should stop write operation.\n\nAfter this patch is applied, the conversion from BUG() to such a framework can\nhappen incrementally.\n\nSigned-off-by: Liu Bo \u003cliubo2009@cn.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "f690efb1aa2a961dd6655529c1797fcac60ad6d9",
      "tree": "29b2faa25ff19a3c374b6bb60eb4507657c6dfa9",
      "parents": [
        "5e540f7715b8cd83b8e60beaaa525b125cc122de"
      ],
      "author": {
        "name": "Josef Bacik",
        "email": "josef@redhat.com",
        "time": "Wed Jan 12 21:04:22 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Jan 16 11:30:20 2011 -0500"
      },
      "message": "Btrfs: don\u0027t warn if we get ENOSPC in btrfs_block_rsv_check\n\nIf we run low on space we could get a bunch of warnings out of\nbtrfs_block_rsv_check, but this is mostly just called via the transaction code\nto see if we need to end the transaction, it expects to see failures, so let\u0027s\nnot WARN and freak everybody out for no reason.  Thanks,\n\nSigned-off-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "6d07bcec969af335d4e35b3921131b7929bd634e",
      "tree": "2d1e0bb5f69bdf9dafa2862b6cad965184d67c84",
      "parents": [
        "b2117a39fa96cf4814e7cab8c11494149ba6f29d"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Wed Jan 05 10:07:31 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Jan 16 11:30:19 2011 -0500"
      },
      "message": "btrfs: fix wrong free space information of btrfs\n\nWhen we store data by raid profile in btrfs with two or more different size\ndisks, df command shows there is some free space in the filesystem, but the\nuser can not write any data in fact, df command shows the wrong free space\ninformation of btrfs.\n\n # mkfs.btrfs -d raid1 /dev/sda9 /dev/sda10\n # btrfs-show\n Label: none  uuid: a95cd49e-6e33-45b8-8741-a36153ce4b64\n \tTotal devices 2 FS bytes used 28.00KB\n \tdevid    1 size 5.01GB used 2.03GB path /dev/sda9\n \tdevid    2 size 10.00GB used 2.01GB path /dev/sda10\n # btrfs device scan /dev/sda9 /dev/sda10\n # mount /dev/sda9 /mnt\n # dd if\u003d/dev/zero of\u003dtmpfile0 bs\u003d4K count\u003d9999999999\n   (fill the filesystem)\n # sync\n # df -TH\n Filesystem\tType\tSize\tUsed\tAvail\tUse%\tMounted on\n /dev/sda9\tbtrfs\t17G\t8.6G\t5.4G\t62%\t/mnt\n # btrfs-show\n Label: none  uuid: a95cd49e-6e33-45b8-8741-a36153ce4b64\n \tTotal devices 2 FS bytes used 3.99GB\n \tdevid    1 size 5.01GB used 5.01GB path /dev/sda9\n \tdevid    2 size 10.00GB used 4.99GB path /dev/sda10\n\nIt is because btrfs cannot allocate chunks when one of the pairing disks has\nno space, the free space on the other disks can not be used for ever, and should\nbe subtracted from the total space, but btrfs doesn\u0027t subtract this space from\nthe total. It is strange to the user.\n\nThis patch fixes it by calcing the free space that can be used to allocate\nchunks.\n\nImplementation:\n1. get all the devices free space, and align them by stripe length.\n2. sort the devices by the free space.\n3. check the free space of the devices,\n   3.1. if it is not zero, and then check the number of the devices that has\n        more free space than this device,\n        if the number of the devices is beyond the min stripe number, the free\n        space can be used, and add into total free space.\n        if the number of the devices is below the min stripe number, we can not\n        use the free space, the check ends.\n   3.2. if the free space is zero, check the next devices, goto 3.1\n\nThis implementation is just likely fake chunk allocation.\n\nAfter appling this patch, df can show correct space information:\n # df -TH\n Filesystem\tType\tSize\tUsed\tAvail\tUse%\tMounted on\n /dev/sda9\tbtrfs\t17G\t8.6G\t0\t100%\t/mnt\n\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "7bfc837df935d850fe996dfe92ef48975cd4170a",
      "tree": "8ca5f83c0c43e505b872368877504fa95c6276ab",
      "parents": [
        "1974a3b42d8cf7a9c74f1e0310c593023617037a"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Wed Jan 05 10:07:26 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Jan 16 11:30:19 2011 -0500"
      },
      "message": "btrfs: restructure find_free_dev_extent()\n\n- make it return the start position and length of the max free space when it can\n  not find a suitable free space.\n- make it more readability\n\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "d52a5b5f1fa40804f681cf9868d4a8f90661bdf3",
      "tree": "93ae0faf84163748353d1edb6c5247483762f2df",
      "parents": [
        "299a08b1c34f9397797946a0fa215c5fd145c5cf"
      ],
      "author": {
        "name": "Miao Xie",
        "email": "miaox@cn.fujitsu.com",
        "time": "Wed Jan 05 10:07:18 2011 +0000"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Sun Jan 16 11:30:19 2011 -0500"
      },
      "message": "btrfs: try to reclaim some space when chunk allocation fails\n\nWe cannot write data into files when when there is tiny space in the filesystem.\n\nReproduce steps:\n # mkfs.btrfs /dev/sda1\n # mount /dev/sda1 /mnt\n # dd if\u003d/dev/zero of\u003d/mnt/tmpfile0 bs\u003d4K count\u003d1\n # dd if\u003d/dev/zero of\u003d/mnt/tmpfile1 bs\u003d4K count\u003d99999999999999\n   (fill the filesystem)\n # umount /mnt\n # mount /dev/sda1 /mnt\n # rm -f /mnt/tmpfile0\n # dd if\u003d/dev/zero of\u003d/mnt/tmpfile0 bs\u003d4K count\u003d1\n   (failed with nospec)\n\nBut if we do the last step again, we can write data successfully. The reason of\nthe problem is that btrfs didn\u0027t try to commit the current transaction and\nreclaim some space when chunk allocation failed.\n\nThis patch fixes it by committing the current transaction to reclaim some\nspace when chunk allocation fails.\n\nSigned-off-by: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nReviewed-by: Josef Bacik \u003cjosef@redhat.com\u003e\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "commit": "65e5341b9a0c39767ae1fecc727d70eda0dd6d83",
      "tree": "09f54177bfb8c93b2320d84317705bec6dcc42a6",
      "parents": [
        "83a50de97fe96aca82389e061862ed760ece2283"
      ],
      "author": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Fri Dec 24 06:41:52 2010 -0500"
      },
      "committer": {
        "name": "Chris Mason",
        "email": "chris.mason@oracle.com",
        "time": "Tue Jan 04 16:41:39 2011 -0500"
      },
      "message": "Btrfs: fix off by one while setting block groups readonly\n\nWhen we read in block groups, we\u0027ll set non-redundant groups\nreadonly if we find a raid1, DUP or raid10 group.  But the\nro code has an off by one bug in the math around testing to\nmake sure out accounting doesn\u0027t go wrong.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n"
    },
    {
      "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"
    }
  ],
  "next": "f61408b81cd040a594dc0b65171230c4d5cc917d"
}
