]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/ECTransaction: only read partial stripes when below *original* object size 15712/head
authorSage Weil <sage@redhat.com>
Fri, 16 Jun 2017 17:56:14 +0000 (13:56 -0400)
committerSage Weil <sage@redhat.com>
Fri, 16 Jun 2017 17:56:14 +0000 (13:56 -0400)
commitb45c09b93482d6b94505d44b8bd4aae9513bc023
treeab717dc86f5d13d00367f0021f40ade8a0e5180d
parent110c4e82c367707a66ad0776d51fcf8b737da7af
osd/ECTransaction: only read partial stripes when below *original* object size

If we touch a partial stripe that is before the stripe-aligned object size
we need to read it in to do a read/modify/write that overalys the new data
onto the old.  However, if we have two writes, both touching the same
stripe but not completely covering it, and that stripe is past the original
end of file, there is no old data to read.  The previous code was using
the projected size to decide whether to do a stripe read, and would end
up trying to read data that wasn't there.

Fix by basing the stripe read decision on the original object size instead
of the projected_size.

Fixes: http://tracker.ceph.com/issues/19882
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ECTransaction.h
src/test/osd/test_ec_transaction.cc