|
|
Log in / Subscribe / Register

Fixing sector_div

Fixing sector_div

Posted May 26, 2015 17:03 UTC (Tue) by ncm (guest, #165)
In reply to: Fixing sector_div by epa
Parent article: A tale of two data-corruption bugs

Even in those dark days, compilers were smart enough to recognize a pair of divide and modulus operations on the same arguments and combine them. There never was an excuse for this macro as written. Putting it in lower case to conceal its nature was doubly wrong.

Probably instead of leaving delayed-write blocks in limbo, they should be referred to scratch blocks and then re-targeted when the time comes to sync them out. In a pinch, the actual scratch blocks can take the data, reliably.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds