Btrfs: fix wrong super generation mismatch when scrubbing supers
Btrfs: fix wrong super generation mismatch when scrubbing supers

We came a race condition when scrubbing superblocks, the story is:

In commiting transaction, we will update @last_trans_commited after
writting superblocks, if scrubber start after writting superblocks
and before updating @last_trans_commited, generation mismatch happens!

We fix this by checking @scrub_pause_req, and we won't start a srubber
until commiting transaction is finished.(after btrfs_scrub_continue()
finished.)

Reported-by: Sebastian Ochmann <1316b21850659a597f097beedd8df453d4ce080f@informatik.uni-bonn.de>
Signed-off-by: Wang Shilong <a6ffe7a539d70ea74089829fdeeb6c8d6acce33c@cn.fujitsu.com>
Reviewed-by: Miao Xie <d7fac3f7b328449401fe64671e732ac315caee28@cn.fujitsu.com>
Signed-off-by: Josef Bacik <631dfb3d07694fdcf26abc7aac2c6c2b641f8bde@fb.com>
Signed-off-by: Chris Mason <e2e8c5702d8ed5f565988a1cf5bb35c9ce199e5e@fb.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs