Patch "iomap: pass writeback errors to the mapping" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    iomap: pass writeback errors to the mapping

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iomap-pass-writeback-errors-to-the-mapping.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 078b33c7e63a833578dcb49316c689a6d1b40487
Author: Darrick J. Wong <djwong@xxxxxxxxxx>
Date:   Tue Aug 10 18:32:55 2021 -0700

    iomap: pass writeback errors to the mapping
    
    [ Upstream commit b69eea82d37d9ee7cfb3bf05103549dd4ed5ffc3 ]
    
    Modern-day mapping_set_error has the ability to squash the usual
    negative error code into something appropriate for long-term storage in
    a struct address_space -- ENOSPC becomes AS_ENOSPC, and everything else
    becomes EIO.  iomap squashes /everything/ to EIO, just as XFS did before
    that, but this doesn't make sense.
    
    Fix this by making it so that we can pass ENOSPC to userspace when
    writeback fails due to space problems.
    
    Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 10cc7979ce38..caed9d98c64a 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1045,7 +1045,7 @@ iomap_finish_page_writeback(struct inode *inode, struct page *page,
 
 	if (error) {
 		SetPageError(page);
-		mapping_set_error(inode->i_mapping, -EIO);
+		mapping_set_error(inode->i_mapping, error);
 	}
 
 	WARN_ON_ONCE(i_blocks_per_page(inode, page) > 1 && !iop);



[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