md/raid1: handle flush request correctly
authorShaohua Li <shli@fb.com>
Tue, 21 Feb 2017 18:56:19 +0000 (10:56 -0800)
committerShaohua Li <shli@fb.com>
Thu, 23 Feb 2017 19:59:43 +0000 (11:59 -0800)
commitaff8da09f2381f0869faaf6637b0d892a3ee99ed
tree5cebc473d84c008f75c5f7980c432f02a7a9fb94
parentd939cdfde34f50b95254b375f498447c82190b3e
md/raid1: handle flush request correctly

I got a warning triggered in align_to_barrier_unit_end. It's a flush
request so sectors == 0. The flush request happens to work well without
the new barrier patch, but we'd better handle it explictly.

Cc: NeilBrown <neilb@suse.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid1.c