jbd: Use WRITE_SYNC in journal checkpoint.
jbd: Use WRITE_SYNC in journal checkpoint.

In journal checkpoint, we write the buffer and wait for its finish.
But in cfq, the async queue has a very low priority, and in our test,
if there are too many sync queues and every queue is filled up with
requests, and the process will hang waiting for the log space.

So this patch tries to use WRITE_SYNC in __flush_batch so that the request will
be moved into sync queue and handled by cfq timely. We also use the new plug,
sot that all the WRITE_SYNC requests can be given as a whole when we unplug it.

Reported-by: Robin Dong <a20073400928871b47176f28bc3fec679095a720@taobao.com>
Signed-off-by: Tao Ma <85dcca6eaef7f88f8513274f73363a9b5feab3ec@taobao.com>
Signed-off-by: Jan Kara <596727c8a0ea4db3ba2ceceedccbacd3d7b371b8@suse.cz>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas