On Thu, Aug 30, 2018 at 11:28:49AM -0700, Darrick J. Wong wrote: > I prefer to have FIBMAP return errors to *cough* encourage people to use > FIEMAP. If code are going to abuse the FI[BE]MAP interface they could > at least abuse the one that gives it enough context to avoid fs > corruption. (A proper fs driver would be preferable, though very > difficult). I think Carlos was looking into implementing the FIBMAP ioctl using ->fiemap. In that case we could return sensible errors, and centralize policy in a single place.. > Granted, grub's blocklist code doesn't seem to check for shared blocks > when it writes grubenv.... yuck, though TBH I don't have the eye budget > to spend on digging through grub2. Frankly I think FIBMAP comes verrry > close to "this API is unfixably stupid and shouldn't be enabled for new > use cases and should go away some day". .. and that policy should be: always return an error for the slightest unusual file layout (shared, encrypted, inline, etc).