Re: Mounting USB Storage devices with "sync" option ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Zbigniew Jędrzejewski-Szmek:

> On Wed, Jan 31, 2024 at 06:43:00AM -0000, Abyss Ether via devel wrote:
>> I created a simple PoC udev rule to mount USB Storage devices with the "sync option.
>> Available here : https://github.com/larina3315/personal-stuff/blob/main/linux/10-usb-storage.rules
>> 
>> Currently, USB Storage devices are mounted without the "sync" option, causing their writes to be cached.
>> This causes an issue, especially with GUI file managers like GNOME Files, where after a file copy operation, it would notify the user that the operation has been completed. If the user then tries to unmount the USB Storage device, they get notified that data is still being written to disk and that they should not remove the USB Storage device from their PC/Laptop/device.
>
> 'sync' has some strong downsides though: various operations become
> painfully slow (this depends a lot on the hardware and its age, and
> the history of previous writes, etc.), write operations block read
> operations, and the total number of writes may be increased, leading
> to more wear&tear on the hardware.

I think this is somewhat counteracted by Linux treating USB mass storage
devices as not having write caches (according to dmesg at least).
Doesn't this mean that those costly barriers won't be used?

Of course it also means that “sync” is not effective as we would like.

Thanks,
Florian
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux