Re: [PATCH][v2] btrfs: return -EROFS for BTRFS_FS_STATE_ERROR cases

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

 



On Tue, Jul 21, 2020 at 10:38:37AM -0400, 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 -EROFS.  -EUCLEAN is reserved for actual
> corruption, not IO errors.
> 
> We are inconsistent about our handling of BTRFS_FS_STATE_ERROR
> elsewhere, but we want to use -EROFS for this particular case.  The
> original transaction abort has the real error code for why we ended up
> with an aborted transaction, all subsequent actions just need to return
> -EROFS because they may not have a trans handle and have no idea about
> the original cause of the abort.
> 
> Reported-by: Eric Sandeen <esandeen@xxxxxxxxxx>
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>

I've added full stacktrace from my logs and the patch is now ordered
after patch that filters EROFS in transaction abort. Thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux