Whamcloud - gitweb
LU-10370 ofd: truncate does not update blocks count on client 73/31073/10
authorArshad Hussain <arshad.super@gmail.com>
Fri, 9 Feb 2018 19:11:51 +0000 (00:41 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Jun 2018 03:56:21 +0000 (03:56 +0000)
'truncate' call correctly updates the server side with
correct size and blocks count. However, on the client
side all the metadata are correctly updated except the
blocks count, which still reflects the old count prior
to truncate call. This patch fixes this issue by
modifying ofd_punch_hdl() to update repbody with the
updated block count.

New test case under sanity is added to verify the that
the blocks counts are correctly updated after truncate call

Change-Id: I8f3f44e1668fab925339350074d1ad8ab681fc95
Co-authored-by: Abrarahmed Momin <abrar.momin@gmail.com>
Signed-off-by: Abrarahmed Momin <abrar.momin@gmail.com>
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/31073
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

No differences found