Coda File System

Re: Theory of writeback

From: Jan Harkes <>
Date: Fri, 23 Mar 2007 14:23:28 -0400
On Fri, Mar 23, 2007 at 09:38:00AM +0100, Martin Ginkel wrote:
> I use coda for my laptop, often connected via a "not-so-fast" wireless
> link to the server. I use my music-collection from that server
> and play the music via amarok.

Actually I've seen this and I believe Amarok is in fact changing one of
the ID3 tags (istr it updates a number of plays counter). Interestingly
it doesn't try to do this when the mode-bits of the file mark it as
read-only. So you can do 'chmod -R 444 my-mp3-folder' and it will not
change the files.

> In principle the files should only be read while playing,

Yes, but the application tries to be smart.

> What I definitly know is, that the files written to the server are
> bit-identical to their original version.

Maybe if the play count tag isn't present it simply closes the file
without updating, but I checked and I definitely saw differences.

> Can someone explain, what condition triggers venus to start writing
> back the file (Why?),
> which calls have to happen: fopen("file","w"); close(), is a write()
> necessary. And when does this happen (the close() call?).

Any open for writing (O_WRONLY or O_RDWR) will trigger a writeback when
the file is closed.

> I'm in the process to debug this. It might be that amarok does something
> wrong, but I'm not sure.

Changing the modebits to 444 worked for me.

Received on 2007-03-23 14:25:21