]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/filestore: fix punch hole usage in _zero
authorSage Weil <sage@redhat.com>
Fri, 11 Mar 2016 16:02:58 +0000 (11:02 -0500)
committerSage Weil <sage@redhat.com>
Fri, 11 Mar 2016 16:02:58 +0000 (11:02 -0500)
commit400975b09ec4cc46b86cb2216727324e869a3a9b
tree844f9250332a1afc5f19ced45df7ce652d21a855
parentb96cfda4a3409da97e9b6430c741afce86f28498
os/filestore: fix punch hole usage in _zero

If we punch a hole that extends past EOF, ObjectStore semantics are
that the file size is also extended.  Do that.

Note that this bug was hidden before because we weren't passing
KEEP_SIZE to fallocate until 7bd95b595fddb8a4e618a2c7df1ba04eccf0829d
and the fallocate was *always* failing with EOPNOTSUPP (making us fall
back to writing actual zeros).

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/filestore/FileStore.cc