{"push_id":1099952794,"size":5,"distinct_size":0,"ref":"refs/heads/misc-4.7","head":"d1cfe8bccd8bc07687e4b2ed736f20492290f1c6","before":"26f35ec7a6e081fac28d050cd28df32111aa6e84","commits":[{"sha":"49985cfccdd308d2a08a8119bf14783b5aca409a","author":{"email":"8b81d500fde961aeb6e5c1b881cda93a1c7f3f60@oracle.com","name":"Ashish Samant"},"message":"btrfs: Fix BUG_ON condition in scrub_setup_recheck_block()\n\npagev array in scrub_block{} is of size SCRUB_MAX_PAGES_PER_BLOCK.\npage_index should be checked with the same to trigger BUG_ON().\n\nSigned-off-by: Ashish Samant <ashish.samant@oracle.com>\nReviewed-by: David Sterba <dsterba@suse.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":false,"url":"https://api.github.com/repos/kdave/btrfs-devel/commits/49985cfccdd308d2a08a8119bf14783b5aca409a"},{"sha":"1fd254e2ee049a9308f68ad90be154190640b33a","author":{"email":"81069a49b521acf79f562d472ec8c4e0d6a88433@oracle.com","name":"Anand Jain"},"message":"btrfs: fix lock dep warning move scratch super outside of chunk_mutex\n\nMove scratch super outside of the chunk lock to avoid below\nlockdep warning. The better place to scratch super is in\nthe function btrfs_rm_dev_replace_free_srcdev() just before\nfree_device, which is outside of the chunk lock as well.\n\nTo reproduce:\n  (fresh boot)\n  mkfs.btrfs -f -draid5 -mraid5 /dev/sdc /dev/sdd /dev/sde\n  mount /dev/sdc /btrfs\n  dd if=/dev/zero of=/btrfs/tf1 bs=4096 count=100\n  (get devmgt from https://github.com/asj/devmgt.git)\n  devmgt detach /dev/sde\n  dd if=/dev/zero of=/btrfs/tf1 bs=4096 count=100\n  sync\n  btrfs replace start -Brf 3 /dev/sdf /btrfs <--\n  devmgt attach host7\n\n======================================================\n[ INFO: possible circular locking dependency detected ]\n4.6.0-rc2asj+ #1 Not tainted\n---------------------------------------------------\n\nbtrfs/2174 is trying to acquire lock:\n(sb_writers){.+.+.+}, at:\n[<ffffffff812449b4>] __sb_start_write+0xb4/0xf0\n\nbut task is already holding lock:\n(&fs_info->chunk_mutex){+.+.+.}, at:\n[<ffffffffa05c5f55>] btrfs_dev_replace_finishing+0x145/0x980 [btrfs]\n\nwhich lock already depends on the new lock.\n\nChain exists of:\nsb_writers --> &fs_devs->device_list_mutex --> &fs_info->chunk_mutex\nPossible unsafe locking scenario:\nCPU0\t\t\t\tCPU1\n----\t\t\t\t----\nlock(&fs_info->chunk_mutex);\n\t\t\t\tlock(&fs_devs->device_list_mutex);\n\t\t\t\tlock(&fs_info->chunk_mutex);\nlock(sb_writers);\n\n*** DEADLOCK ***\n\n-> #0 (sb_writers){.+.+.+}:\n[<ffffffff810e6415>] __lock_acquire+0x1bc5/0x1ee0\n[<ffffffff810e707e>] lock_acquire+0xbe/0x210\n[<ffffffff810df49a>] percpu_down_read+0x4a/0xa0\n[<ffffffff812449b4>] __sb_start_write+0xb4/0xf0\n[<ffffffff81265534>] mnt_want_write+0x24/0x50\n[<ffffffff812508a2>] path_openat+0x952/0x1190\n[<ffffffff81252451>] do_filp_open+0x91/0x100\n[<ffffffff8123f5cc>] file_open_name+0xfc/0x140\n[<ffffffff8123f643>] filp_open+0x33/0x60\n[<ffffffffa0572bb6>] update_dev_time+0x16/0x40 [btrfs]\n[<ffffffffa057f60d>] btrfs_scratch_superblocks+0x5d/0xb0 [btrfs]\n[<ffffffffa057f70e>] btrfs_rm_dev_replace_remove_srcdev+0xae/0xd0 [btrfs]\n[<ffffffffa05c62c5>] btrfs_dev_replace_finishing+0x4b5/0x980 [btrfs]\n[<ffffffffa05c6ae8>] btrfs_dev_replace_start+0x358/0x530 [btrfs]\n\nSigned-off-by: Anand Jain <anand.jain@oracle.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":false,"url":"https://api.github.com/repos/kdave/btrfs-devel/commits/1fd254e2ee049a9308f68ad90be154190640b33a"},{"sha":"85891b8a9ffa730dadb9b57e191d8df8879c0e8f","author":{"email":"a2ce9d316ca04d17b520237d2846a218b8284e52@suse.cz","name":"David Sterba"},"message":"btrfs: add write protection to SET_FEATURES ioctl\n\nPerform the want_write check if we get far enough to do any writes.\n\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":false,"url":"https://api.github.com/repos/kdave/btrfs-devel/commits/85891b8a9ffa730dadb9b57e191d8df8879c0e8f"},{"sha":"c2fa09127d8610058dc8f2ff1478af4f46bacefa","author":{"email":"a2ce9d316ca04d17b520237d2846a218b8284e52@suse.cz","name":"David Sterba"},"message":"btrfs: ioctl: reorder exclusive op check in RM_DEV\n\nMove the op exclusivity check before the other code (same as in\nADD_DEV).\n\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":false,"url":"https://api.github.com/repos/kdave/btrfs-devel/commits/c2fa09127d8610058dc8f2ff1478af4f46bacefa"},{"sha":"d1cfe8bccd8bc07687e4b2ed736f20492290f1c6","author":{"email":"fdeb914dd8066ef55b6bb37d701a850e78332d12@umail.furryterror.org","name":"Zygo Blaxell"},"message":"btrfs: don't force mounts to wait for cleaner_kthread to delete one or more subvolumes\n\nDuring a mount, we start the cleaner kthread first because the transaction\nkthread wants to wake up the cleaner kthread.  We start the transaction\nkthread next because everything in btrfs wants transactions.  We do reloc\nrecovery in the thread that was doing the original mount call once the\ntransaction kthread is running.  This means that the cleaner kthread\ncould already be running when reloc recovery happens (e.g. if a snapshot\ndelete was started before a crash).\n\nRelocation does not play well with the cleaner kthread, so a mutex was\nadded in commit 5f3164813b90f7dbcb5c3ab9006906222ce471b7 \"Btrfs: fix\nrace between balance recovery and root deletion\" to prevent both from\nbeing active at the same time.\n\nIf the cleaner kthread is already holding the mutex by the time we get\nto btrfs_recover_relocation, the mount will be blocked until at least\none deleted subvolume is cleaned (possibly more if the mount process\ndoesn't get the lock right away).  During this time (which could be an\narbitrarily long time on a large/slow filesystem), the mount process is\nstuck and the filesystem is unnecessarily inaccessible.\n\nFix this by locking cleaner_mutex before we start cleaner_kthread, and\nunlocking the mutex after mount no longer requires it.  This ensures\nthat the mounting process will not be blocked by the cleaner kthread.\nThe cleaner kthread is already prepared for mutex contention and will\njust go to sleep until the mutex is available.\n\nSigned-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>\nReviewed-by: Filipe Manana <fdmanana@suse.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":false,"url":"https://api.github.com/repos/kdave/btrfs-devel/commits/d1cfe8bccd8bc07687e4b2ed736f20492290f1c6"}]}