We only need to dirty the log file if the allocate changes. Replay is
smart enough to learn the file size as it goes.
Signed-off-by: Sage Weil <sage@redhat.com>
}
if (h->file->fnode.size < offset + length) {
h->file->fnode.size = offset + length;
- must_dirty = true;
+ if (h->file->fnode.ino != 1) {
+ // we do not need to dirty the log file when the file size
+ // changes because replay is smart enough to discover it on its
+ // own.
+ must_dirty = true;
+ }
}
if (must_dirty) {
h->file->fnode.mtime = ceph_clock_now(NULL);