Hi,

Agostino just contacted me too and it seems we have already found the 
reason.

On Sat, 26 May 2007, ago wrote:
> On Sat, 26 May 2007, Szabolcs Szakacsits wrote:
>
> > Do you use swap file on NTFS too? (Must be totally irrelevant.)
>
> Yes. In fact we were just discussing what to do with it... I might as
> well ask you since you probably know far more than us on that. 3
> options are:
>
> 1 loopmounted file within NTFS seen by kernel as a dedicated swap partition
> 2 file within NTFS seen by kernel as a swap file (swap file inside
> NTFS host folder is mounted inside the ext3 root partition which is in
> a loopmounted file within the NTFS drive)
> 3 file within ext3 / ( /  is a loopmounted file within NTFS) seen by
> kernel as a file
>
> We are using 1 at the moment.

Ok, swap file on NTFS is irrelevant only if it's used like below and 
loopback isn't involved in any way:

        mount -t ntfs-3g physical_device mountpoint
        cd mountpoint
        dd if=/dev/zero of=swapfile bs=1M count=2000    # 2 GB swap
        mkswap swapfile
        swapon swapfile

All other ways can deadlock in the kernel the same way people reported. 
Bigger the file and less the RAM, the higher the chance.

The swap must be independent of the filesystem otherwise they can end up 
waiting for each other. Only the above solution ensures this: after the 
successful swapon, the kernel swap subsystem directly accesses the relevant 
disk regions, so the mentioned deadlocks can't happen.

I've updated the related ntfs-3g support question with more details:

        http://ntfs-3g.org/support.html#swap

Good luck with Wubi! I think it's one of the top important Linux projects, 
so feel free to ask whenever you have ntfs-3g related issues, it will be 
handled with high priority ;)

Best regards,
                Szaka

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to