{"push_id":948236939,"size":41,"distinct_size":41,"ref":"refs/heads/wang_dedup","head":"2038ba69c5a491d81574fe2c0eb20d9b558a4734","before":"801a5175dac23eb474bf5fccda6a4af9566744e3","commits":[{"sha":"95617d69326ce386c95e33db7aeb832b45ee9f8f","author":{"email":"5459ed423adecc5a7fe2249dd619058acc25c497@suse.com","name":"Jeff Mahoney"},"message":"btrfs: cleanup, stop casting for extent_map->lookup everywhere\n\nOverloading extent_map->bdev to struct map_lookup * might have started out\nas a means to an end, but it's a pattern that's used all over the place\nnow. Let's get rid of the casting and just add a union instead.\n\nSigned-off-by: Jeff Mahoney <jeffm@suse.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/95617d69326ce386c95e33db7aeb832b45ee9f8f"},{"sha":"f32e48e925964c4f8ab917850788a87e1cef3bad","author":{"email":"5b09eece4a5b11d5d0125c0f7eca424d593874ed@linux.vnet.ibm.com","name":"Chandan Rajendra"},"message":"Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots\n\nThe following call trace is seen when btrfs/031 test is executed in a loop,\n\n[  158.661848] ------------[ cut here ]------------\n[  158.662634] WARNING: CPU: 2 PID: 890 at /home/chandan/repos/linux/fs/btrfs/ioctl.c:558 create_subvol+0x3d1/0x6ea()\n[  158.664102] BTRFS: Transaction aborted (error -2)\n[  158.664774] Modules linked in:\n[  158.665266] CPU: 2 PID: 890 Comm: btrfs Not tainted 4.4.0-rc6-g511711a #2\n[  158.666251] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011\n[  158.667392]  ffffffff81c0a6b0 ffff8806c7c4f8e8 ffffffff81431fc8 ffff8806c7c4f930\n[  158.668515]  ffff8806c7c4f920 ffffffff81051aa1 ffff880c85aff000 ffff8800bb44d000\n[  158.669647]  ffff8808863b5c98 0000000000000000 00000000fffffffe ffff8806c7c4f980\n[  158.670769] Call Trace:\n[  158.671153]  [<ffffffff81431fc8>] dump_stack+0x44/0x5c\n[  158.671884]  [<ffffffff81051aa1>] warn_slowpath_common+0x81/0xc0\n[  158.672769]  [<ffffffff81051b27>] warn_slowpath_fmt+0x47/0x50\n[  158.673620]  [<ffffffff813bc98d>] create_subvol+0x3d1/0x6ea\n[  158.674440]  [<ffffffff813777c9>] btrfs_mksubvol.isra.30+0x369/0x520\n[  158.675376]  [<ffffffff8108a4aa>] ? percpu_down_read+0x1a/0x50\n[  158.676235]  [<ffffffff81377a81>] btrfs_ioctl_snap_create_transid+0x101/0x180\n[  158.677268]  [<ffffffff81377b52>] btrfs_ioctl_snap_create+0x52/0x70\n[  158.678183]  [<ffffffff8137afb4>] btrfs_ioctl+0x474/0x2f90\n[  158.678975]  [<ffffffff81144b8e>] ? vma_merge+0xee/0x300\n[  158.679751]  [<ffffffff8115be31>] ? alloc_pages_vma+0x91/0x170\n[  158.680599]  [<ffffffff81123f62>] ? lru_cache_add_active_or_unevictable+0x22/0x70\n[  158.681686]  [<ffffffff813d99cf>] ? selinux_file_ioctl+0xff/0x1d0\n[  158.682581]  [<ffffffff8117b791>] do_vfs_ioctl+0x2c1/0x490\n[  158.683399]  [<ffffffff813d3cde>] ? security_file_ioctl+0x3e/0x60\n[  158.684297]  [<ffffffff8117b9d4>] SyS_ioctl+0x74/0x80\n[  158.685051]  [<ffffffff819b2bd7>] entry_SYSCALL_64_fastpath+0x12/0x6a\n[  158.685958] ---[ end trace 4b63312de5a2cb76 ]---\n[  158.686647] BTRFS: error (device loop0) in create_subvol:558: errno=-2 No such entry\n[  158.709508] BTRFS info (device loop0): forced readonly\n[  158.737113] BTRFS info (device loop0): disk space caching is enabled\n[  158.738096] BTRFS error (device loop0): Remounting read-write after error is not allowed\n[  158.851303] BTRFS error (device loop0): cleaner transaction attach returned -30\n\nThis occurs because,\n\nMount filesystem\nCreate subvol with ID 257\nUnmount filesystem\nMount filesystem\nDelete subvol with ID 257\n  btrfs_drop_snapshot()\n    Add root corresponding to subvol 257 into\n    btrfs_transaction->dropped_roots list\nCreate new subvol (i.e. create_subvol())\n  257 is returned as the next free objectid\n  btrfs_read_fs_root_no_name()\n    Finds the btrfs_root instance corresponding to the old subvol with ID 257\n    in btrfs_fs_info->fs_roots_radix.\n    Returns error since btrfs_root_item->refs has the value of 0.\n\nTo fix the issue the commit initializes tree root's and subvolume root's\nhighest_objectid when loading the roots from disk.\n\nSigned-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/f32e48e925964c4f8ab917850788a87e1cef3bad"},{"sha":"b7c47bbb2d1856330f71ba04c8eb03b39aca87cd","author":{"email":"bbc079c7ff821d5e36ebf4ae2f9fd3690be38a1c@jp.fujitsu.com","name":"Tsutomu Itoh"},"message":"Btrfs: fix output of compression message in btrfs_parse_options()\n\nThe compression message might not be correctly output.\nFix it.\n\n[[before fix]]\n\n# mount -o compress /dev/sdb3 /test3\n[  996.874264] BTRFS info (device sdb3): disk space caching is enabled\n[  996.874268] BTRFS: has skinny extents\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/)\n\n# mount -o remount,compress-force /dev/sdb3 /test3\n[ 1035.075017] BTRFS info (device sdb3): force zlib compression\n[ 1035.075021] BTRFS info (device sdb3): disk space caching is enabled\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress-force=zlib,space_cache,subvolid=5,subvol=/)\n\n# mount -o remount,compress /dev/sdb3 /test3\n[ 1053.679092] BTRFS info (device sdb3): disk space caching is enabled\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/)\n\n[[after fix]]\n\n# mount -o compress /dev/sdb3 /test3\n[  401.021753] BTRFS info (device sdb3): use zlib compression\n[  401.021758] BTRFS info (device sdb3): disk space caching is enabled\n[  401.021760] BTRFS: has skinny extents\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/)\n\n# mount -o remount,compress-force /dev/sdb3 /test3\n[  439.824624] BTRFS info (device sdb3): force zlib compression\n[  439.824629] BTRFS info (device sdb3): disk space caching is enabled\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress-force=zlib,space_cache,subvolid=5,subvol=/)\n\n# mount -o remount,compress /dev/sdb3 /test3\n[  459.918430] BTRFS info (device sdb3): use zlib compression\n[  459.918434] BTRFS info (device sdb3): disk space caching is enabled\n# mount | grep /test3\n/dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/)\n\nSigned-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/b7c47bbb2d1856330f71ba04c8eb03b39aca87cd"},{"sha":"8e217858eea0d63de9d818f52fa98b5f9e502e5a","author":{"email":"d12999005f6151b9468b6f2bd6d86bf9f7b59e02@163.com","name":"Geliang Tang"},"message":"btrfs: fix iterator with update error in backref.c\n\nFix the following error:\n\nfs/btrfs/backref.c:565:1-20: iterator with update on line 577\n\nFixes: a7ca422('btrfs: use list_for_each_entry* in backref.c')\nSigned-off-by: Geliang Tang <geliangtang@163.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/8e217858eea0d63de9d818f52fa98b5f9e502e5a"},{"sha":"0dc924c5f2a3c4d999e12feaccee5f970cea1315","author":{"email":"ff341aa343d564f9e53e9dcb6996be8c04859a66@oracle.com","name":"Dan Carpenter"},"message":"Btrfs: clean up an error code in btrfs_init_space_info()\n\nIf we return 1 here, then the caller treats it as an error and returns\n-EINVAL.  It causes a static checker warning to treat positive returns\nas an error.\n\nFixes: 1aba86d67f34 ('Btrfs: fix easily get into ENOSPC in mixed case')\nSigned-off-by: Dan Carpenter <dan.carpenter@oracle.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/0dc924c5f2a3c4d999e12feaccee5f970cea1315"},{"sha":"546bed631203344611f42b2af1d224d2eedb4e6b","author":{"email":"265264fed90bdf8e813a354375ec16f47ebdb1c5@linutronix.de","name":"Sebastian Andrzej Siewior"},"message":"btrfs: initialize the seq counter in struct btrfs_device\n\nI managed to trigger this:\n| INFO: trying to register non-static key.\n| the code is fine but needs lockdep annotation.\n| turning off the locking correctness validator.\n| CPU: 1 PID: 781 Comm: systemd-gpt-aut Not tainted 4.4.0-rt2+ #14\n| Hardware name: ARM-Versatile Express\n| [<80307cec>] (dump_stack)\n| [<80070e98>] (__lock_acquire)\n| [<8007184c>] (lock_acquire)\n| [<80287800>] (btrfs_ioctl)\n| [<8012a8d4>] (do_vfs_ioctl)\n| [<8012ac14>] (SyS_ioctl)\n\nso I think that btrfs_device_data_ordered_init() is not invoked behind\na macro somewhere.\n\nFixes: 7cc8e58d53cd (\"Btrfs: fix unprotected device's variants on 32bits machine\")\nSigned-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>\nReviewed-by: David Sterba <dsterba@suse.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/546bed631203344611f42b2af1d224d2eedb4e6b"},{"sha":"fb75d857a31d600cc0c37b8c7d914014f7fa3f9a","author":{"email":"d100aa70785e45ee8deab668147d941941915c21@canonical.com","name":"Colin Ian King"},"message":"btrfs: remove duplicate const specifier\n\nduplicate const is redundant so remove it\n\nSigned-off-by: Colin Ian King <colin.king@canonical.com>\nSigned-off-by: David Sterba <dsterba@suse.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/fb75d857a31d600cc0c37b8c7d914014f7fa3f9a"},{"sha":"acc308556c812485462b6b43843c3f64530dd843","author":{"email":"e2e8c5702d8ed5f565988a1cf5bb35c9ce199e5e@fb.com","name":"Chris Mason"},"message":"Merge branch 'misc-cleanups-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/acc308556c812485462b6b43843c3f64530dd843"},{"sha":"326f784281fbbdcd91bb401b2a3e32132c0f5c72","author":{"email":"e2e8c5702d8ed5f565988a1cf5bb35c9ce199e5e@fb.com","name":"Chris Mason"},"message":"Merge branch 'misc-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/326f784281fbbdcd91bb401b2a3e32132c0f5c72"},{"sha":"fedc00455ccc1f928066528da87b0c7b143de647","author":{"email":"e0fcd583df77ec6c08e6d1257619cc1216ddc994@suse.com","name":"Filipe Manana"},"message":"Btrfs: fix typo in log message when starting a balance\n\nThe recent change titled \"Btrfs: Check metadata redundancy on balance\"\n(already in linux-next) left a typo in a message for users:\nmetatdata -> metadata.\n\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/fedc00455ccc1f928066528da87b0c7b143de647"},{"sha":"c2d6cb1636d235257086f939a8194ef0bf93af6e","author":{"email":"e0fcd583df77ec6c08e6d1257619cc1216ddc994@suse.com","name":"Filipe Manana"},"message":"Btrfs: fix deadlock running delayed iputs at transaction commit time\n\nWhile running a stress test I ran into a deadlock when running the delayed\niputs at transaction time, which produced the following report and trace:\n\n[  886.399989] =============================================\n[  886.400871] [ INFO: possible recursive locking detected ]\n[  886.401663] 4.4.0-rc6-btrfs-next-18+ #1 Not tainted\n[  886.402384] ---------------------------------------------\n[  886.403182] fio/8277 is trying to acquire lock:\n[  886.403568]  (&fs_info->delayed_iput_sem){++++..}, at: [<ffffffffa0538823>] btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.403568]\n[  886.403568] but task is already holding lock:\n[  886.403568]  (&fs_info->delayed_iput_sem){++++..}, at: [<ffffffffa0538823>] btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.403568]\n[  886.403568] other info that might help us debug this:\n[  886.403568]  Possible unsafe locking scenario:\n[  886.403568]\n[  886.403568]        CPU0\n[  886.403568]        ----\n[  886.403568]   lock(&fs_info->delayed_iput_sem);\n[  886.403568]   lock(&fs_info->delayed_iput_sem);\n[  886.403568]\n[  886.403568]  *** DEADLOCK ***\n[  886.403568]\n[  886.403568]  May be due to missing lock nesting notation\n[  886.403568]\n[  886.403568] 3 locks held by fio/8277:\n[  886.403568]  #0:  (sb_writers#11){.+.+.+}, at: [<ffffffff81174c4c>] __sb_start_write+0x5f/0xb0\n[  886.403568]  #1:  (&sb->s_type->i_mutex_key#15){+.+.+.}, at: [<ffffffffa054620d>] btrfs_file_write_iter+0x73/0x408 [btrfs]\n[  886.403568]  #2:  (&fs_info->delayed_iput_sem){++++..}, at: [<ffffffffa0538823>] btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.403568]\n[  886.403568] stack backtrace:\n[  886.403568] CPU: 6 PID: 8277 Comm: fio Not tainted 4.4.0-rc6-btrfs-next-18+ #1\n[  886.403568] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014\n[  886.403568]  0000000000000000 ffff88009f80f770 ffffffff8125d4fd ffffffff82af1fc0\n[  886.403568]  ffff88009f80f830 ffffffff8108e5f9 0000000200000000 ffff88009fd92290\n[  886.403568]  0000000000000000 ffffffff82af1fc0 ffffffff829cfb01 00042b216d008804\n[  886.403568] Call Trace:\n[  886.403568]  [<ffffffff8125d4fd>] dump_stack+0x4e/0x79\n[  886.403568]  [<ffffffff8108e5f9>] __lock_acquire+0xd42/0xf0b\n[  886.403568]  [<ffffffff810c22db>] ? __module_address+0xdf/0x108\n[  886.403568]  [<ffffffff8108eb77>] lock_acquire+0x10d/0x194\n[  886.403568]  [<ffffffff8108eb77>] ? lock_acquire+0x10d/0x194\n[  886.403568]  [<ffffffffa0538823>] ? btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.489542]  [<ffffffff8148556b>] down_read+0x3e/0x4d\n[  886.489542]  [<ffffffffa0538823>] ? btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.489542]  [<ffffffffa0538823>] btrfs_run_delayed_iputs+0x36/0xbf [btrfs]\n[  886.489542]  [<ffffffffa0533953>] btrfs_commit_transaction+0x8f5/0x96e [btrfs]\n[  886.489542]  [<ffffffffa0521d7a>] flush_space+0x435/0x44a [btrfs]\n[  886.489542]  [<ffffffffa052218b>] ? reserve_metadata_bytes+0x26a/0x384 [btrfs]\n[  886.489542]  [<ffffffffa05221ae>] reserve_metadata_bytes+0x28d/0x384 [btrfs]\n[  886.489542]  [<ffffffffa052256c>] ? btrfs_block_rsv_refill+0x58/0x96 [btrfs]\n[  886.489542]  [<ffffffffa0522584>] btrfs_block_rsv_refill+0x70/0x96 [btrfs]\n[  886.489542]  [<ffffffffa053d747>] btrfs_evict_inode+0x394/0x55a [btrfs]\n[  886.489542]  [<ffffffff81188e31>] evict+0xa7/0x15c\n[  886.489542]  [<ffffffff81189878>] iput+0x1d3/0x266\n[  886.489542]  [<ffffffffa053887c>] btrfs_run_delayed_iputs+0x8f/0xbf [btrfs]\n[  886.489542]  [<ffffffffa0533953>] btrfs_commit_transaction+0x8f5/0x96e [btrfs]\n[  886.489542]  [<ffffffff81085096>] ? signal_pending_state+0x31/0x31\n[  886.489542]  [<ffffffffa0521191>] btrfs_alloc_data_chunk_ondemand+0x1d7/0x288 [btrfs]\n[  886.489542]  [<ffffffffa0521282>] btrfs_check_data_free_space+0x40/0x59 [btrfs]\n[  886.489542]  [<ffffffffa05228f5>] btrfs_delalloc_reserve_space+0x1e/0x4e [btrfs]\n[  886.489542]  [<ffffffffa053620a>] btrfs_direct_IO+0x10c/0x27e [btrfs]\n[  886.489542]  [<ffffffff8111d9a1>] generic_file_direct_write+0xb3/0x128\n[  886.489542]  [<ffffffffa05463c3>] btrfs_file_write_iter+0x229/0x408 [btrfs]\n[  886.489542]  [<ffffffff8108ae38>] ? __lock_is_held+0x38/0x50\n[  886.489542]  [<ffffffff8117279e>] __vfs_write+0x7c/0xa5\n[  886.489542]  [<ffffffff81172cda>] vfs_write+0xa0/0xe4\n[  886.489542]  [<ffffffff811734cc>] SyS_write+0x50/0x7e\n[  886.489542]  [<ffffffff814872d7>] entry_SYSCALL_64_fastpath+0x12/0x6f\n[ 1081.852335] INFO: task fio:8244 blocked for more than 120 seconds.\n[ 1081.854348]       Not tainted 4.4.0-rc6-btrfs-next-18+ #1\n[ 1081.857560] \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n[ 1081.863227] fio        D ffff880213f9bb28     0  8244   8240 0x00000000\n[ 1081.868719]  ffff880213f9bb28 00ffffff810fc6b0 ffffffff0000000a ffff88023ed55240\n[ 1081.872499]  ffff880206b5d400 ffff880213f9c000 ffff88020a4d5318 ffff880206b5d400\n[ 1081.876834]  ffffffff00000001 ffff880206b5d400 ffff880213f9bb40 ffffffff81482ba4\n[ 1081.880782] Call Trace:\n[ 1081.881793]  [<ffffffff81482ba4>] schedule+0x7f/0x97\n[ 1081.883340]  [<ffffffff81485eb5>] rwsem_down_write_failed+0x2d5/0x325\n[ 1081.895525]  [<ffffffff8108d48d>] ? trace_hardirqs_on_caller+0x16/0x1ab\n[ 1081.897419]  [<ffffffff81269723>] call_rwsem_down_write_failed+0x13/0x20\n[ 1081.899251]  [<ffffffff81269723>] ? call_rwsem_down_write_failed+0x13/0x20\n[ 1081.901063]  [<ffffffff81089fae>] ? __down_write_nested.isra.0+0x1f/0x21\n[ 1081.902365]  [<ffffffff814855bd>] down_write+0x43/0x57\n[ 1081.903846]  [<ffffffffa05211b0>] ? btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs]\n[ 1081.906078]  [<ffffffffa05211b0>] btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs]\n[ 1081.908846]  [<ffffffff8108d461>] ? mark_held_locks+0x56/0x6c\n[ 1081.910409]  [<ffffffffa0521282>] btrfs_check_data_free_space+0x40/0x59 [btrfs]\n[ 1081.912482]  [<ffffffffa05228f5>] btrfs_delalloc_reserve_space+0x1e/0x4e [btrfs]\n[ 1081.914597]  [<ffffffffa053620a>] btrfs_direct_IO+0x10c/0x27e [btrfs]\n[ 1081.919037]  [<ffffffff8111d9a1>] generic_file_direct_write+0xb3/0x128\n[ 1081.920754]  [<ffffffffa05463c3>] btrfs_file_write_iter+0x229/0x408 [btrfs]\n[ 1081.922496]  [<ffffffff8108ae38>] ? __lock_is_held+0x38/0x50\n[ 1081.923922]  [<ffffffff8117279e>] __vfs_write+0x7c/0xa5\n[ 1081.925275]  [<ffffffff81172cda>] vfs_write+0xa0/0xe4\n[ 1081.926584]  [<ffffffff811734cc>] SyS_write+0x50/0x7e\n[ 1081.927968]  [<ffffffff814872d7>] entry_SYSCALL_64_fastpath+0x12/0x6f\n[ 1081.985293] INFO: lockdep is turned off.\n[ 1081.986132] INFO: task fio:8249 blocked for more than 120 seconds.\n[ 1081.987434]       Not tainted 4.4.0-rc6-btrfs-next-18+ #1\n[ 1081.988534] \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n[ 1081.990147] fio        D ffff880218febbb8     0  8249   8240 0x00000000\n[ 1081.991626]  ffff880218febbb8 00ffffff81486b8e ffff88020000000b ffff88023ed75240\n[ 1081.993258]  ffff8802120a9a00 ffff880218fec000 ffff88020a4d5318 ffff8802120a9a00\n[ 1081.994850]  ffffffff00000001 ffff8802120a9a00 ffff880218febbd0 ffffffff81482ba4\n[ 1081.996485] Call Trace:\n[ 1081.997037]  [<ffffffff81482ba4>] schedule+0x7f/0x97\n[ 1081.998017]  [<ffffffff81485eb5>] rwsem_down_write_failed+0x2d5/0x325\n[ 1081.999241]  [<ffffffff810852a5>] ? finish_wait+0x6d/0x76\n[ 1082.000306]  [<ffffffff81269723>] call_rwsem_down_write_failed+0x13/0x20\n[ 1082.001533]  [<ffffffff81269723>] ? call_rwsem_down_write_failed+0x13/0x20\n[ 1082.002776]  [<ffffffff81089fae>] ? __down_write_nested.isra.0+0x1f/0x21\n[ 1082.003995]  [<ffffffff814855bd>] down_write+0x43/0x57\n[ 1082.005000]  [<ffffffffa05211b0>] ? btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs]\n[ 1082.007403]  [<ffffffffa05211b0>] btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs]\n[ 1082.008988]  [<ffffffffa0545064>] btrfs_fallocate+0x7c1/0xc2f [btrfs]\n[ 1082.010193]  [<ffffffff8108a1ba>] ? percpu_down_read+0x4e/0x77\n[ 1082.011280]  [<ffffffff81174c4c>] ? __sb_start_write+0x5f/0xb0\n[ 1082.012265]  [<ffffffff81174c4c>] ? __sb_start_write+0x5f/0xb0\n[ 1082.013021]  [<ffffffff811712e4>] vfs_fallocate+0x170/0x1ff\n[ 1082.013738]  [<ffffffff81181ebb>] ioctl_preallocate+0x89/0x9b\n[ 1082.014778]  [<ffffffff811822d7>] do_vfs_ioctl+0x40a/0x4ea\n[ 1082.015778]  [<ffffffff81176ea7>] ? SYSC_newfstat+0x25/0x2e\n[ 1082.016806]  [<ffffffff8118b4de>] ? __fget_light+0x4d/0x71\n[ 1082.017789]  [<ffffffff8118240e>] SyS_ioctl+0x57/0x79\n[ 1082.018706]  [<ffffffff814872d7>] entry_SYSCALL_64_fastpath+0x12/0x6f\n\nThis happens because we can recursively acquire the semaphore\nfs_info->delayed_iput_sem when attempting to allocate space to satisfy\na file write request as shown in the first trace above - when committing\na transaction we acquire (down_read) the semaphore before running the\ndelayed iputs, and when running a delayed iput() we can end up calling\nan inode's eviction handler, which in turn commits another transaction\nand attempts to acquire (down_read) again the semaphore to run more\ndelayed iput operations.\nThis results in a deadlock because if a task acquires multiple times a\nsemaphore it should invoke down_read_nested() with a different lockdep\nclass for each level of recursion.\n\nFix this by simplifying the implementation and use a mutex instead that\nis acquired by the cleaner kthread before it runs the delayed iputs\ninstead of always acquiring a semaphore before delayed references are\nrun from anywhere.\n\nFixes: d7c151717a1e (btrfs: Fix NO_SPACE bug caused by delayed-iput)\nCc: stable@vger.kernel.org   # 4.1+\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/c2d6cb1636d235257086f939a8194ef0bf93af6e"},{"sha":"319e4d0661e5323c9f9945f0f8fb5905e5fe74c3","author":{"email":"f41a7033a6382ce00d6b717e37d942dbe3c9a107@cn.fujitsu.com","name":"Qu Wenruo"},"message":"btrfs: Enhance super validation check\n\nEnhance btrfs_check_super_valid() function by the following points:\n1) Restrict sector/node size check\n   Not the old max/min valid check, but also check if it's a power of 2.\n   So some bogus number like 12K node size won't pass now.\n\n2) Super flag check\n   For now, there is still some inconsistency between kernel and\n   btrfs-progs super flags.\n   And considering btrfs-progs may add new flags for super block, this\n   check will only output warning.\n\n3) Better root alignment check\n   Now root bytenr is checked against sector size.\n\n4) Move some check into btrfs_check_super_valid().\n   Like node size vs leaf size check, and PAGESIZE vs sectorsize check.\n   And magic number check.\n\nReported-by: Vegard Nossum <vegard.nossum@oracle.com>\nSigned-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>\nReviewed-by: David Sterba <dsterba@suse.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/319e4d0661e5323c9f9945f0f8fb5905e5fe74c3"},{"sha":"f04b772bfc17f502703794f4d100d12155c1a1a9","author":{"email":"f41a7033a6382ce00d6b717e37d942dbe3c9a107@cn.fujitsu.com","name":"Qu Wenruo"},"message":"btrfs: Enhance chunk validation check\n\nEnhance chunk validation:\n1) Num_stripes\n   We already have such check but it's only in super block sys chunk\n   array.\n   Now check all on-disk chunks.\n\n2) Chunk logical\n   It should be aligned to sector size.\n   This behavior should be *DOUBLE CHECKED* for 64K sector size like\n   PPC64 or AArch64.\n   Maybe we can found some hidden bugs.\n\n3) Chunk length\n   Same as chunk logical, should be aligned to sector size.\n\n4) Stripe length\n   It should be power of 2.\n\n5) Chunk type\n   Any bit out of TYPE_MAS | PROFILE_MASK is invalid.\n\nWith all these much restrict rules, several fuzzed image reported in\nmail list should no longer cause kernel panic.\n\nReported-by: Vegard Nossum <vegard.nossum@oracle.com>\nSigned-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/f04b772bfc17f502703794f4d100d12155c1a1a9"},{"sha":"94a97dfeb61e32a213ca5519b063076c5201c5b2","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: Small cleanup for get index_srcdev loop\n\n1: Adjust condition in loop to make less TAB\n2: Move btrfs_put_bbio()'s line for combine, and makes logic clean.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/94a97dfeb61e32a213ca5519b063076c5201c5b2"},{"sha":"ad1ba2a0c453db255f04b17101db6d05c44d8467","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: Use direct way to determine raid56 write/recover mode\n\nOld code used bbio->raid_map to determine whether in raid56\nwrite/recover operation, because we didn't't have bbio->map_type.\n\nNow we have direct way for this condition, rid of using\nthe function-relative data, and make the code more readable.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/ad1ba2a0c453db255f04b17101db6d05c44d8467"},{"sha":"ee22f0c4ec428e7f16d3c5fa1d55fd7860cb304a","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: delete unused argument in btrfs_copy_from_user\n\nsize_t write_bytes is not necessary for btrfs_copy_from_user(),\ndelete it.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/ee22f0c4ec428e7f16d3c5fa1d55fd7860cb304a"},{"sha":"0bc19f9031e0c59770286f82b8561c1d35064a65","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: merge functions for wait snapshot creation\n\nwait_for_snapshot_creation() is in same group with oher two:\n btrfs_start_write_no_snapshoting()\n btrfs_end_write_no_snapshoting()\n\nRename wait_for_snapshot_creation() and move it into same place\nwith other two.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/0bc19f9031e0c59770286f82b8561c1d35064a65"},{"sha":"e1746e8381cd2af421f75557b5cae3604fc18b35","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: Fix no_space in write and rm loop\n\nI see no_space in v4.4-rc1 again in xfstests generic/102.\nIt happened randomly in some node only.\n(one of 4 phy-node, and a kvm with non-virtio block driver)\n\nBy bisect, we can found the first-bad is:\n commit bdced438acd8 (\"block: setup bi_phys_segments after splitting\")'\nBut above patch only triggered the bug by making bio operation\nfaster(or slower).\n\nMain reason is in our space_allocating code, we need to commit\npage writeback before wait it complish, this patch fixed above\nbug.\n\nBTW, there is another reason for generic/102 fail, caused by\ndisable default mixed-blockgroup, I'll fix it in xfstests.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/e1746e8381cd2af421f75557b5cae3604fc18b35"},{"sha":"bfca9a6d4b1322ba36235e8a652f05a9668ef59b","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: Fix calculation of rbio->dbitmap's size calculation\n\nCurrent code is trying to calculate rbio->dbitmap's size to make it\nalign to sizeof(long), but implement haven't achived this object,\nit is align to sizeof(char) instead.\nThis patch fixed above calculation, and use sizeof(long) instead of\nfixed \"8\" to increate compatibility.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/bfca9a6d4b1322ba36235e8a652f05a9668ef59b"},{"sha":"b7178a5f0372a51260cf6e74d828e315e43dfc86","author":{"email":"aacdd228f50c574b28b524b23f12fb9d52d6e0e3@cn.fujitsu.com","name":"Zhao Lei"},"message":"btrfs: Use unified stripe_page's index calculation\n\nWe are using different index calculation method for stripe_page in\ncurrent code:\n1: (rbio->stripe_len / PAGE_CACHE_SIZE) * stripe_index + page_index\n2: DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE) * stripe_index + page_index\n3: DIV_ROUND_UP(rbio->stripe_len * stripe_index, PAGE_CACHE_SIZE) + page_index\n...\n\nThey can get same result when stripe_len align to PAGE_CACHE_SIZE,\nthis is why current code can work, intruduce and use a common function\nfor calculation is a better choose.\n\nSigned-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>\nSigned-off-by: Chris Mason <clm@fb.com>","distinct":true,"url":"https://api.github.com/repos/adam900710/linux/commits/b7178a5f0372a51260cf6e74d828e315e43dfc86"}]}