On 8/18/25 5:09 PM, Dave Chinner wrote: >> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c >> index f9ef3b2a332a..6ba57ccaa25f 100644 >> --- a/fs/xfs/xfs_buf.c >> +++ b/fs/xfs/xfs_buf.c >> @@ -747,6 +747,9 @@ xfs_buf_read_map( >> /* bad CRC means corrupted metadata */ >> if (error == -EFSBADCRC) >> error = -EFSCORRUPTED; >> + /* ENODATA == ENOATTR which confuses xattr layers */ >> + if (error == -ENODATA) >> + error = -EIO; > Not sure this is the right place to map this. It is only relevant to > the XFS xattr layer in the kernel, so mapping it for everything > seems like overkill. > > I suspect that this error mapping should really be in > xfs_attr3_leaf_read() and xfs_da_read_buf() so it is done for > xattr fork metadata read IO only... yeah, that's partly why RFC. The higher up it gets added, the more risk of adding another caller later that doesn't handle it. I didn't see much downside to doing it lower, and just saying well, ENODATA is kinda another way to spell EIO. So I don't really care, but doing it in one place seemed better than doing it in several. Doing it lower might also be more consistent - only remapping ENODATA for xattr reads is a little strange? But you're right that other IOs shouldn't need it. *shrug* -Eric