Btrfs: Fix the problem that the dirty flag of dev stats is cleared
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 24 Jul 2014 03:37:11 +0000 (11:37 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:37:46 +0000 (13:37 -0700)
commitaddc3fa74e5bcfabc0766f934a8895d1f9f6a67c
treeeae6105559c9163b1800b5a5b7340a134d389bb5
parentd5ee37bcb1dff9c1d1cac5f7e5752309f1ff66b6
Btrfs: Fix the problem that the dirty flag of dev stats is cleared

The io error might happen during writing out the device stats, and the
device stats information and dirty flag would be update at that time,
but the current code didn't consider this case, just clear the dirty
flag, it would cause that we forgot to write out the new device stats
information. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h