]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: fix DIO good bytes calculation
authorPeng Tao <tao.peng@primarydata.com>
Thu, 9 Apr 2015 15:02:16 +0000 (23:02 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 23 Apr 2015 19:05:18 +0000 (15:05 -0400)
commitf2203d9eec4c3ccd1d31ee9918bce87cb0f33717
tree6bf27072c4383cffc77e15c553d6b294394a472e
parent1128b3e56b02094b9f41fae4c75cdb784ed6b725
nfs: fix DIO good bytes calculation

For direct read that has IO size larger than rsize, we'll split
it into several READ requests and nfs_direct_good_bytes() would
count completed bytes incorrectly by eating last zero count reply.

Fix it by handling mirror and non-mirror cases differently such that
we only count mirrored writes differently.

This fixes 84ee0bf5("nfs: count DIO good bytes correctly with mirroring").

Reported-by: Jean Spector <jean@primarydata.com>
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/direct.c