]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: pass writeback errors to the mapping
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Aug 2021 01:32:55 +0000 (18:32 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 16 Aug 2021 19:12:52 +0000 (12:12 -0700)
commitd4235e2189fc63ff2cde195e37648c6a7f69ba7c
treee3b66e6d938ed956593baa51616677ca6469dc46
parente72a515757aabc2a93c2b4a4f390ed748af52492
iomap: pass writeback errors to the mapping

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@kernel.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/iomap/buffered-io.c