Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB MSC: Detect write cache and issue SYNCHRONIZE_CACHE? #753

Open
keirf opened this issue Feb 7, 2023 · 2 comments
Open

USB MSC: Detect write cache and issue SYNCHRONIZE_CACHE? #753

keirf opened this issue Feb 7, 2023 · 2 comments

Comments

@keirf
Copy link
Owner

keirf commented Feb 7, 2023

USB MSC devices may implement write caching and require flushing on sync/close. Should investigate this:

  1. Find a USB drive that advertises a write cache
  2. Implement a write test that exhibits write loss in the absence of SYNCHRONIZE_CACHE
  3. Implement SYNCHRONIZE_CACHE and fix the test

Note this doesn't seem to be a problem for run-of-the-mill USB sticks. Probably no write-back cache.

@Leo-PL
Copy link

Leo-PL commented May 28, 2023

Probably any run-off-the-mill SATA SSD in an USB enclosure can help you with that.

Certain (but very rare) USB flash drives with internal USB-SATA bridge and SATA SSD-on-chip can have write cache as well. These are the ones of faster and more expensive variety. Maybe in such cases, the caching may be disabled explicitly?

@keirf
Copy link
Owner Author

keirf commented May 28, 2023

Thanks yes disabling the cache might be easiest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants