On 7/10/20 10:50 AM, Eric Sandeen wrote:
On 7/10/20 9:06 AM, Josef Bacik wrote:
Eric reported seeing this message while running generic/475
BTRFS: error (device dm-3) in btrfs_sync_log:3084: errno=-117 Filesystem corrupted
This ret came from btrfs_write_marked_extents(). If we get an aborted
transaction via an -EIO somewhere, we'll see it in
btree_write_cache_pages() and return -EUCLEAN, which we spit out as
"Filesystem corrupted". Except we shouldn't be returning -EUCLEAN here,
we need to be returning -EIO. -EUCLEAN is reserved for actual
corruption, not IO errors.
Is BTRFS_FS_STATE_ERROR only set for IO errors, or could it also be
set for an actual corruption state?
It's set when we abort the transaction, which can be either or I suppose. At
this point we don't have the offending error, but the transaction abort _would_
have it. So if there was a corruption you would see it higher up in the logs.
Thanks,
Josef