Register FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sun May 19, 2013 02:45



Post new topic Reply to topic  [ 4 posts ] 
mount successful but drive access causes lockup 
Author Message

Joined: Thu Apr 10, 2008 23:29
Posts: 3
Post mount successful but drive access causes lockup
Hello,

I'm on an embedded MIPS platform with the following configuration:

Kernel 2.6.15
uClibc 2.28
Busybox 1.01

I attach an external USB hard drive and see these messages:

Vendor: Maxtor Model: OneTouch II Rev: 023d
Type: Direct-Access ANSI SCSI revision: 04
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB)
sda: assuming drive cache: write through
oSCSI device sda: 398297088 512-byte hdwr sectors (203928 MB)
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi disk sda

I load the FUSE kernel module:

# insmod fuse.ko
fuse init (API version 7.8)
fuse distribution version: 2.7.3

If I try to use mount, it using mount:

/mnt/hdd # mount -t ntfs-3g /dev/sda1 /mnt/win
mount: Mounting /dev/sda1 on /mnt/win failed: No such device

(old busybox?)

But this way seems to work:

# ntfs-3g /dev/sda1 /mnt/win

# mount
/dev/mtdblock2 on / type jffs2 (rw,noatime)
/proc on /proc type proc (rw,nodiratime)
devpts on /dev/pts type devpts (rw)
none on /tmp type ramfs (rw)
/dev/sda1 on /mnt/win type fuseblk (rw,noatime,user_id=0,group_id=0,allow_other)

/var/log/messages shows:

Jan 1 00:03:53 (none) daemon.notice ntfs-3g[122]: Version 1.2310 integrated FUSE 27
Jan 1 00:03:53 (none) daemon.notice ntfs-3g[122]: Mounted /dev/sda1 (Read-Write, label "MAXTOR-BACKUP", NTFS 3.1)
Jan 1 00:03:53 (none) daemon.notice ntfs-3g[122]: Cmdline options: (null)
Jan 1 00:03:53 (none) daemon.notice ntfs-3g[122]: Mount options: silent,allow_other,nonempty,relatime,noatime,fsname=/dev/sda1,blkdev,blksize=4096

At this point,

# ls /mnt/win

results in ls hanging. If I connect the drive to Windows XP, it works fine.

I've tried ro and force options without success.

Any ideas what might be wrong?

Thanks


Thu Apr 10, 2008 23:59
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1645
Post Re: mount successful but drive access causes lockup
willy wrote:
Any ideas what might be wrong?

Something in your environment, quite probably in the kernel. MIPS is a supported, regularly tested platform (well, at least what we have -- there are quite a lot different MIPS devices, environments).


Fri Apr 11, 2008 00:13
Profile

Joined: Thu Apr 10, 2008 23:29
Posts: 3
Post Re: mount successful but drive access causes lockup
Thanks for the help. I'm still working on it.

Sometimes it does not hang and I can access the drive, but when it does hang and I use -o debug, I get the message

fuse: writing device: Invalid argument

When it does not hang, I get intermittent ls output. Sometimes no files are listed but issuing ls a second time will show the files correctly.

Ive tested an external USB FAT32 formatted disk copying files for hours, so I think the USB drivers are working fine.


Mon Apr 14, 2008 21:08
Profile

Joined: Thu Apr 10, 2008 23:29
Posts: 3
Post 
Ok. I think I've found the solution. Thanks to szaka, poisan42 and hebb.

As mentioned in another thread, I had to do the steps below to resolve the problem. Step 1 doesn't seem to be required in my case.
So the problem is related to a data cache bug in the kernel (I'm using 2.6.15) that affects MIPS platforms as well as ARM.

See http://forum.ntfs-3g.org/viewtopic.php?t=115 for the full thread.


2. In fuse/kernel/fuse_i.h, enable the line #define DCACHE_BUG
3. In fuse/kernel/dev.c, modify as below.

// Before
#ifdef DCACHE_BUG
flush_cache_page(vma, cs->addr, page_to_pfn(cs->pg));
#endif

// After
#ifdef DCACHE_BUG
r4k_flush_cache_page(vma, cs->addr, page_to_pfn(cs->pg));
#endif


4. Modify the kernel source in linux/arch/mips/mm/c-r4k.c
// Before
static void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn)
{
...
}

// After
void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn)
{
...
}
EXPORT_SYMBOL(r4k_flush_cache_page);


Tue Apr 15, 2008 02:14
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.