]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/newstore: only ftruncate if i_size is incorrect
authorSage Weil <sage@redhat.com>
Wed, 29 Apr 2015 21:51:00 +0000 (14:51 -0700)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:42 +0000 (13:39 -0400)
commit90e7f5e6484d13f55ddc0a393705b9454a5325ab
tree7ee313f170d5eaffdf80ef4b982525d73df0c907
parent4c1552001a2e12bfdcf8630292cb07da494dcb31
os/newstore: only ftruncate if i_size is incorrect

Even a no-op ftruncate can block in the kernel.  Prior to this change I
could frequently see ftruncate wait for an aio completion on the same
file.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/newstore/NewStore.cc
src/os/newstore/NewStore.h