If there is no available grant on the client side, but exists dirty
pages, we should issue BRW rpc and wait for more grants.
Another changes is about lost_grant: if dirty pages were truncated,
grants will be returned to client, instead of the target having
allocated them.
Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I50791554807dddfafafcd2b8d228958ebfa3ac16
Reviewed-on: http://review.whamcloud.com/2037
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>