[Dovecot] Turning off "Fixed Duplicates" feature

Timo Sirainen tss at iki.fi
Fri Nov 13 02:32:45 EET 2009


On Thu, 2009-11-12 at 16:22 -0800, Jordan Tardif wrote:
> > I guess the easiest solution would be to:
> >
> > 1) Remove the duplicate detection/fixing code from Dovecot code.
> > 2) Create a script that resolves duplicates by deleting one of them.
> 
> So if I do #1 , do you see this causing any other problems with dovecot?

I actually meant that you should do both. But no, 1) shouldn't cause
problems.

Or actually looking at the code, it already tries to detect duplicate
hard links and unlinks one of them. You could change the code from:

	if (st1.st_ino == st2.st_ino &&
	    CMP_DEV_T(st1.st_dev, st2.st_dev)) {
		/* Files are the same. this means either a race condition
		   between stat() calls, or that the files were link()ed. */
		if (st1.st_nlink > 1 && st2.st_nlink == st1.st_nlink &&
		    st1.st_ctime == st2.st_ctime &&
		    st1.st_ctime < ioloop_time - DUPE_LINKS_DELETE_SECS) {

to just something like:

	if (st1.st_size == st2.st_size) {

and then some day when your migrations are done switch it back.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20091112/e705e89a/attachment.bin 


More information about the dovecot mailing list