]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix sync read zeroing at EOF
authorSage Weil <sage@inktank.com>
Mon, 17 Jun 2013 02:48:52 +0000 (19:48 -0700)
committerSage Weil <sage@inktank.com>
Mon, 17 Jun 2013 19:24:02 +0000 (12:24 -0700)
commitee40c217e373b538e227f7218b09c1c794b4124a
tree3efef87b811820bc88edc2c61932ecd2e3ecf0e9
parente3fb095d8aa88556e4356c76b848fa61b09acbc0
client: fix sync read zeroing at EOF

If we have a read that hits EOF, we need to do a short read.  Previously
we would zero the buffer if we were completely withing the file, but
we also need to zero things if we overlap with EOF.  This fixes a hang
of mpi-fsx on ceph-fuse.  Triggered/tested by
LibCephFS.MulticlientHoleEOF.

Fixes: #5368
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/client/Client.cc