CRLF / LF conversion, all over again

Timothee Besset ttimo at idsoftware.com
Thu Feb 21 03:05:02 GMT 2002


I am not familiar with the internals of a networked file system to tell.
This is mostly an analysis from end user standpoint and sysadmin
standpoint. A few remarks though:

- file size? not a problem, if the client is win32 it is served with CRLF
converted files from the unix server, and sees the correct size

- 5k at the end of 600Mb file .. text files are typically small. Odds are,
if it's 600Mb, it's binary. (at least in my case I don't have text files
that go above 100kb).

What do you mean by 'write a VFS module'? My understanding is that if the
server does CRLF conversion, obviously it will have to cache the CRLF and
LF versions, and synchronise when one of the clients changes something (as
I said, I know nothing the precise problems in smbd).

The other solution I am looking at right now, is having two shared
directories, one mounted by win32 clients, and one mounted by unix
clients. They would be exactly the same for the binary files, and have
appropriate CRLF or LF versions of the text files. Then plug some kind of
daemon server side to always maintain the directories in sync (detect when
a file is modified on one side and update his binary or LF / CRLF
counterpart).

It is not a very satisfactory solution, and while designing it I came to
the conclusion that it would be better implemented at smbd level.

TTimo

On Thu, 21 Feb 2002 21:40:51 +1100
Andrew Bartlett <abartlet at pcug.org.au> wrote:

> Timothee Besset wrote:
> > 
> > I'm new to the list, so please bear with me .. 
> 
> > Ok, so hopefully you can tell me wether this is an important issue for
> > Samba, wether it is being worked on, how hard it would be to do etc.
> 
> OK, think about file length.  What file size to report?  Before we do
> the translation or after?  What about a partial read?  I want 5k at the
> end of a 600Mb file - I now have to 'convert' that file to figure out
> where that 5k actaully is.
> 
> This is before we even start on the various other issues that make this
> a non-starter.  If you really want to do this, write a VFS module.
> 
> Andrew Bartlett
> 
> -- 
> Andrew Bartlett                                 abartlet at pcug.org.au
> Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
> Student Network Administrator, Hawker College   abartlet at hawkerc.net
> http://samba.org     http://build.samba.org     http://hawkerc.net
> 




More information about the samba-technical mailing list