Opened 15 years ago

Closed 15 years ago

#4897 closed bug (invalid)

Unable to delete big directory from BFS partition on USB stick

Reported by: emitrax Owned by: mmlr
Priority: high Milestone: R1
Component: Drivers/USB Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

From Haiku installed on real hardware, I tried to delete the directory with more the 50% of Webkit browser source code (don't recall how big it was). The operation took so long that I thought it was a deadlock. So I tried to look in KDL what was going on and basically I saw that

  • The rm thread command was waiting on the mutex "usb_disk device lock"
  • The holder of the lock was the "block notifier/writer" thread
  • The "block notifier/writer" thread though, was waiting on the semaphore "usb disk callback notifier"

The CPU activity though was basically going up and down from 5% to 10%, IIRC, so I don't think it was a deadlock, but something was definitely wrong.

The bug was reproducable on my laptop.

Change History (1)

comment:1 by mmlr, 15 years ago

Resolution: invalid
Status: newclosed

That's perfectly valid and expected behaviour. There's something written back by the thead holding the device lock and this thread waits for the completion notification. Since the remove operates on directories and inodes, it is not unlikely for this to take long, because these can't be burst read/written. This is not a bug however, but more of a design issue of the fs at hand playing not very well with the latencies for small transfers on flash media. You'd get similar results on other operating and file systems with the same operations, because most mainstream fs aren't fitting flash well.

Note: See TracTickets for help on using tickets.