Re: Slow USB storage device? (util-Linux-ng, 2010)

· ai · Source ↗

TLDR

  • Linus Torvalds traced a 30-second USB mount delay to blkid issuing a 68kB read against a 16kB/s embroidery machine storage device.

Key Takeaways

  • blkid -p on both /dev/sdc and /dev/sdc1 consumed 27+ seconds total, dominated by a single 69632-byte read triggering kernel read-ahead to ~120kB.
  • devkit-disks-part-id extracted the same partition metadata far faster, suggesting udev should call it first and skip blkid entirely.
  • Scanning the whole disk /dev/sdc before the partition /dev/sdc1 is redundant; the kernel already partitioned it.
  • Devices without a UUID are silently not mounted by hald, leaving no user-visible error and no workaround for locked firmware.
  • The fix Torvalds wanted: skip blkid in udev rules, improve blkid read sizing, and allow UUID-less automount.

Hacker News Comment Review

  • No substantive HN discussion yet.

Original | Discuss on HN