mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
Modified Files:
client/Buffercache.cc Another bug in map_existing: need_off was not correctly advanced git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@456 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
c25cb2973a
commit
33475a32bc
@ -259,18 +259,21 @@ Filecache::map_existing(size_t len,
|
||||
if (actual_off > need_off) {
|
||||
holes[need_off] = (size_t) (actual_off - need_off);
|
||||
dout(10) << "bc: map: hole " << need_off << " " << holes[need_off] << endl;
|
||||
need_off = actual_off;
|
||||
}
|
||||
if (bh->state == BUFHD_STATE_RX) {
|
||||
rx[actual_off] = bh;
|
||||
dout(10) << "bc: map: rx " << actual_off << " " << rx[actual_off]->miss_len << endl;
|
||||
need_off = actual_off + bh->miss_len;
|
||||
} else if (bh->state == BUFHD_STATE_TX) {
|
||||
tx[actual_off] = bh;
|
||||
dout(10) << "bc: map: tx " << actual_off << " " << tx[actual_off]->bl.length() << endl;
|
||||
need_off = actual_off + bh->bl.length();
|
||||
} else {
|
||||
hits[actual_off] = bh;
|
||||
dout(10) << "bc: map: hits " << actual_off << " " << hits[actual_off]->bl.length() << endl;
|
||||
need_off = actual_off + bh->bl.length();
|
||||
}
|
||||
need_off = actual_off + bh->bl.length();
|
||||
}
|
||||
if (need_off < start_off + len) {
|
||||
holes[need_off] = (size_t) (start_off + len - need_off);
|
||||
|
Loading…
Reference in New Issue
Block a user