Distro: Ubuntu 9.10 (+ some 10.04 packages) Kernel: 2.6.32-14-generic UDisks package version: 1.0.0~git20100223.a38230-2ubuntu1 When I try to benchmark my hard disk, it fail. This is the manual udisk command: $ sudo /usr/lib/udisks/udisks-helper-drive-benchmark /dev/sda 0 udisks-helper-progress: 0.0 read_transfer_rate: offset 0 rate 50121963.552517 udisks-helper-progress: 0.000000 read_transfer_rate: offset 409821184 rate 50161531.921785 read_transfer_rate: offset 819642368 rate 50068291.105993 read_transfer_rate: offset 1229463552 rate 50186590.338347 read_transfer_rate: offset 1639284736 rate 50145967.676659 read_transfer_rate: offset 2049105920 rate 50103384.598795 Error seeking to position -1836040192 for (null): Invalid argument $ sudo fdisk -l Disk /dev/sda: 82.0 GB, 81964302336 bytes 255 heads, 63 sectors/track, 9964 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical / optimal IO): 512 bytes / 512 bytes Disk identifier: 0x92899289 [...] $ sudo hdparm -I /dev/sda /dev/sda: ATA device, with non-removable media Model Number: Maxtor 6Y080L0 Serial Number: Y3JNVAEE Firmware Revision: YAR41VW0 Standards: Used: ATA/ATAPI-7 T13 1532D revision 0 Supported: 7 6 5 4 Configuration: Logical max current cylinders 16383 16383 heads 16 16 sectors/track 63 63 -- CHS current addressable sectors: 16514064 LBA user addressable sectors: 160086528 LBA48 user addressable sectors: 160086528 Logical/Physical Sector size: 512 bytes device size with M = 1024*1024: 78167 MBytes device size with M = 1000*1000: 81964 MBytes (81 GB) cache/buffer size = 2048 KBytes (type=DualPortCache) [...] Benchmark only work with USB sticks. All USB sticks that I have it's OK. Benchmark fail with every other HD that I have.
The problem seems to be here: src/helpers/job-drive-benchmark.c line 175: pos &= ~(page_size - 1); This operation make "pos" negative, before this line "pos" is positive.
Created attachment 33666 [details] [review] Patch for bug #26822 This patch solve my bug. Use lseek64() instead lseek().
Thanks for this! I grepped the source, and confirm that job-drive-benchmark.c is the last place which still uses lseek(), the others are already using the 64 bit variant.
http://cgit.freedesktop.org/udisks/commit/?id=ef4c36fc7373650140e49232786c941c5a30de0e
Cool - that explains why benchmarking didn't work on my 32-bit box (I mainly use 64-bit boxes these days). Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.