CRLF / LF conversion, all over again

Ihar Viarheichyk i.viarheichyk at
Thu Feb 21 07:42:39 GMT 2002

On Thu, Feb 21, 2002 at 01:37:34PM +0100, Timothee Besset wrote:
> Obviously there is some file caching involved, and therefore a cost in
> terms of overall performance and disk space. That's all there is to say
> about it really, it's not a problem of 'what if' and 'what if'.

Well, this is not a performance problem only. Such behaviour requires
completely change logic of many operations. E.g. on every request to
read/write a block of N bytes from Mth position in a file you need
recount both M and N according number of linefeeds in a block and in a
file. It's slow, it's possible unreliable.
> Now, this could be written (as I described in a previous email) by an
> independant daemon on the server machine, maintaining two copies of the
> shared directories in sync and doing the conversions. Or maybe it would be
> cleaner/more efficient written as a samba extension. I would probably not
> look at samba code and just start on a standalone solution to get directly
> to the core of the problem though.

I think you chose the hardest way. In unix there is no problem to read/write
text files with CRLF (or convert CRLF<->LF on the fly).

Igor Vergeichik
ICQ 47298730

More information about the samba-technical mailing list