You are not logged in.

#1 2015-07-08 06:26:40

tomzooi
Member
Registered: 2010-05-01
Posts: 26

[Solved] ctime change after read

Hello all,

I have an NTFS mount on which I store all my data so I can work from windows and linux, this is the fstab line:

UUID=ECDCF567DCF52D08 /storage/2 ntfs-3g defaults,locale=en_US.utf8,uid=tom,gid=users,dmask=0000,fmask=0000,exec  0 0

Lately I noticed that my backup programs started to sync files already synced because the local one appeared "newer. I noticed this particularly when playing mp3 files with Amarok.
Before I play a file, ls-l and stat look like this:

#ls -l:
-rwxrwxrwx 1 tom users 3655910 Jul  7 16:55 notplayed.mp3
#stat:
 File: notplayed.mp3’
  Size: 3655910   	Blocks: 7144       IO Block: 4096   regular file
Device: 805h/2053d	Inode: 903396      Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/     tom)   Gid: (  100/   users)
Access: 2015-07-07 17:14:44.996854900 +0800
Modify: 2015-07-07 16:55:52.992625800 +0800
Change: 2015-07-07 16:55:52.992625800 +0800
 Birth: -

A file I just played looks like:

#ls-l:
-rwxrwxrwx 1 tom users 4379574 Jul  8 13:54 justplayed.mp3
#stat:
 File: ‘justplayed.mp3’
  Size: 4379574   	Blocks: 8560       IO Block: 4096   regular file
Device: 805h/2053d	Inode: 662746      Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/     tom)   Gid: (  100/   users)
Access: 2015-07-07 17:14:44.586277600 +0800
Modify: 2015-07-08 13:54:51.529357500 +0800
Change: 2015-07-08 13:54:51.529357500 +0800
 Birth: -

I cannot tell yet if this is specific for Amarok, during coding similar problems are occuring, when using btsync or rsync for instance, it considers some files newer which actually are not, causing my new files to be overwritten with old files, very annoying.
What I can tell is that the mp3 files do not change during playing, only afterwards (e.g.: when the next song is played).

I would like some help to find out what is going on and how to avoid this ctime changing, or at least avoid having these files re-synced unnecessarily.

Cheers.

Last edited by tomzooi (2015-07-08 06:58:17)

Offline

#2 2015-07-08 06:57:57

tomzooi
Member
Registered: 2010-05-01
Posts: 26

Re: [Solved] ctime change after read

Apparently Amarok writes file statistics etc to the file after playing, I disabled this in the Settings=>Configure Amarok=>Metadata settings, and it appears ctime is staying the way it should. Next up: figure out why btsync was rolling back my files. Marked this thread as solved for now.

Offline

Board footer

Powered by FluxBB