mirror of
https://github.com/ceph/ceph
synced 2025-02-08 03:18:12 +00:00
891d8b4754
If we have a long line that has to be dynamically allocated, we need to
adjust m_log_buf_pos accordingly afterward. In particular,
_write_and_copy does this adjustment, which means the later += line_used
is not only unnecessary but very bad, since line_used is > MAX_LOG_BUF.
Simplify all of this by getting rid of _write_and_copy: if we are writing
a big chunk let's just send the whole thing to m_fd and not bother keeping
the tail of it around for later.
Fix _log_safe_write to write the passed buffer, not m_log_buf.
Replace the paranoid check with a simple assert.
Fixes:
|
||
---|---|---|
.. | ||
Entry.h | ||
EntryQueue.h | ||
Log.cc | ||
Log.h | ||
LogClock.h | ||
SubsystemMap.h | ||
test.cc |