On Tue, Nov 19, 2024 at 08:22:08AM -0800, Christoph Hellwig wrote: > On Tue, Nov 19, 2024 at 06:54:52PM +0300, Alexey Dobriyan wrote: > > Block drivers and DM sometimes use EROFS to report errors. There is > > no confusion about what happens but naive error reporting code might > > pass -EROFS to strerror(3) which will print "filesystem" when clearly > > there is no filesystem anywhere, it is layer above. > > > > Or in other words, if EROFS exists, why not EROBLK? > > It is not like there is a tax on errno values. > > And where would you return this value without breaking existing > userspace? New code may start returning it right away. Old code may start checking for both and in ~100 years delete EROFS clause.