Samba for Radiance

I don't remember where we left the issue regarding support for Samba file sharing and lock files. I suppose I haven't let go of it yet.

Below is a link to the modifications made to rpiece.c by Tony Kay. He allowed these changes to be made feely available. The tarball also includes a samba lock exerciser.

Samba for Rpiece

If these changes are easy enough, please consider including them in the (next) release. Perhaps the same approach could be extended into the ambient file sharing code.

The following link is to the Cywin (Win32) version of Radiance by Tarn Burton. I include this second link in case there are dependencies needed for Samba, and in case you would like to investigate Tarn's solution to various Windows-isms.

Radiance for Cygwin (Win32s)

Thanks to everyone for all your work on this! Especially Greg!

-Chas

Charles Ehrlich wrote:

I don't remember where we left the issue regarding support for Samba file
sharing and lock files. I suppose I haven't let go of it yet.

Below is a link to the modifications made to rpiece.c by Tony Kay. He allowed
these changes to be made feely available. The tarball also includes a samba
lock exerciser.

Those links don't lead anywhere for me (some host not found).

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

I'll send them to you directly. Let me know if anyone else needs the files sent as an attachment. It's just a few hundred KB.
-Chas

···

Georg Mischler <[email protected]> wrote:Charles Ehrlich wrote:

I don't remember where we left the issue regarding support for Samba file
sharing and lock files. I suppose I haven't let go of it yet.

Below is a link to the modifications made to rpiece.c by Tony Kay. He allowed
these changes to be made feely available. The tarball also includes a samba
lock exerciser.

Those links don't lead anywhere for me (some host not found).

-schorsch

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Charles Ehrlich wrote:

I don't remember where we left the issue regarding support for Samba file
sharing and lock files. I suppose I haven't let go of it yet.

Below is a link to the modifications made to rpiece.c by Tony Kay. He allowed
these changes to be made feely available. The tarball also includes a samba
lock exerciser.

I had a very short look at the code, and as far as I can see,
this may not be exactly what you seem to think it is. Whether
that makes it more or less useful, remains to be seen.

Unless I have missed something, then Tony Kays changes have
nothing directly to do with Samba. It's just that he happened to
use Samba for the actual file access. What he seems to have done,
is simply to link Radiance to the Cygwin libraries, which gave
him access to an implementation of fcntl() that is aware of
networked file locks. As a result, he could use exactly the same
code on Windows as is already used on unix.

Advantages:
- works transparently together with unix NFS locks, even if the
  file is actually accessed through a Samba mount.
- no code changes required

Disadvantages:
- requires the Cygwin libraries, which makes commercial
  redistribution potentially difficult/expensive.
- NFS locks still seem to be unreliable on some unix systems.
- I'm not sure if Cygwin can lock files on both unix and Windows
  based filesystems this way.

For my taste, those are at least two disadvantages too many...

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

George Mischler wrote:

···

Advantages:
- works transparently together with unix NFS locks, even if the
file is actually accessed through a Samba mount.
- no code changes required

Disadvantages:
- requires the Cygwin libraries, which makes commercial
redistribution potentially difficult/expensive.
- NFS locks still seem to be unreliable on some unix systems.
- I'm not sure if Cygwin can lock files on both unix and Windows
based filesystems this way.

====
Georg,
Just to confirm, you looked at the revised code in rpiece.c written by Tony Kay? I included the rest of the Cygwin stuff because I was not sure if the Samba additions depended upon it. You seem to confirm my suspicions, and so, Samba file locking really hasn't been implemented in rpiece.c independent from Cygwin, right? If so, then I agree, it is of little value.
-Chas

Charles Ehrlich wrote:

Georg,
Just to confirm, you looked at the revised code in rpiece.c written by Tony
Kay? I included the rest of the Cygwin stuff because I was not sure if the
Samba additions depended upon it. You seem to confirm my suspicions, and so,
Samba file locking really hasn't been implemented in rpiece.c independent
from Cygwin, right? If so, then I agree, it is of little value.
-Chas

Yes, I just cross checked. The actual changes in rpiece.c involve
replacing the MSDOS preprocessor symbol by CYGWIN for conditional
compiles, and some code to work around a Cygwin bug with fdopen().
The locking mechanism is unchanged from standard unix Radiance,
and can't work without Cygwin on Windows.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/