[ENBD] mmapped server
Peter T. Breuer
ptb at inv.it.uc3m.es
Sat Mar 25 14:23:51 MST 2006
I was just about to wonder out aloud if anyone would mind if I release
enbd 2.4.33, because I had something to try in 2.4.34 ... I think the
server can mmap its target and thus avoid reading from the net into a
buffer, then writing from the buffer to disk, by mmapping the disk to
the buffer and doing it all in one go.
But it turns out there is already code to do that! Has anyone tried it?
--mmap,-M
// PTB try using mmapped target directly first
if (self->flags & F_MMAP) {
buffer = server->mmap(server,
NULL, request->len, PROT_WRITE, MAP_SHARED, request->from);
}
// PTB otherwise fall back to the copy buffer.
I must have a go ...
Peter
More information about the ENBD
mailing list