Whamcloud - gitweb
LU-2049 grant: delay grant releasing until commit
Grant space acquired for a bulk write is released from the grant
accounting at the end of request processing. At that point, the
additional space consumed by the write request is believed to be
taken into account in any subsequent statfs call.
However, it does not seem to be the case with all backend
filesystems and more particularly ZFS which seems to provide
reliable space information only once the transaction associated
with the bulk write has committed. This creates a hole in the
grant space management where we can end up allocating more grant
space than really available.
This patch postpones grant releasing until transaction commit time.
This is done by registering a commit callback in charge of this
operation.
The patch also removes the implicit use of info->fti_used and stores
the amount of grant space to be released in obdo::o_grant_used.
Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: Id99b8712ffc1e5f103df4835b698127619b8ba85
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13531
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>