Read look-ahead is pretty much a standard ATA feature setting just like write cache or APM. Both hdparm (-A) and smartctl (--get|set lookahead) supports it. Would be nice if udisks2 can support this as well. Note that this is NOT equivalence of "Read Cache Disable (RCD)" in SCSI but "Disable Read Ahead (DRA)". FYR, I also requested better support for it on libata: https://bugzilla.kernel.org/show_bug.cgi?id=105861
What's wrong with actually using hdparm for this? udisks2's primary purpose is to provide access to partitions to user sessions via D-Bus. This sounds like needlessly duplicating already existing functionality, and it would also stop making udisks D-Bus activatable. So I'm leaning towards a "wontfix" here.
There's nothing wrong with using hdparm or smartctl for this. It's just one of udisksd purposes is to restore ATA settings since they are often volatile to power cycles (and hdparm / smartctl is not a daemon): https://bugzilla.kernel.org/show_bug.cgi?id=102471 https://bugzilla.kernel.org/show_bug.cgi?id=105281 (Duplicate of a LONG opened bug report I filed yesterday, in case you missed: https://bugs.freedesktop.org/show_bug.cgi?id=92479) I am pretty shocked when I see this reply since this is clearly documented in DRIVE CONFIGURATION of udisks(8) and you seem to have no idea at all. There are even SERIES of rework on this to avoid inappropriate udev/ata_id dependency since this commit: http://cgit.freedesktop.org/udisks/commit/src/udiskslinuxdriveata.c?id=406d0f785d3c7af63481dcf1b0d02c5d26df1753 I don't see how this will stop udisks from being d-bus activatable.
Created attachment 118928 [details] [review] Working patch for udisks2 to set ATA Read Look-ahead Might post a patch to gnome-disks as well if this is accepted. Shouldn't be too difficult (well, except i18n? :P)
Created attachment 118940 [details] [review] Working patch for udisks2 to set ATA Read Look-ahead (with correct get bits) oops read_lookahead_supported and read_lookahead_enabled should be bit 6 in word 82 and word 85 instead of bit 3. corrected now.
Thanks! Pushed as https://cgit.freedesktop.org/udisks/commit/?id=7c7a43df1031
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.