Re: [PATCH RFC] xfs: remap block layer ENODATA read errors to EIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 18, 2025 at 03:22:02PM -0500, Eric Sandeen 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;

I think we need to stop passing random errors through here (same
for the write side).  Unless we have an explicit handler (which we
have for a tiny number of errors), passing random stuff we got through
and which higher layers use for their own purpose will cause trouble.

Btw, your patch is timely as I've just seen something that probably
is the same root cause when running XFS on a device with messed up
PI, which is another of those cases where the block layer returns
"odd" error codes.





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux