From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E16F3803D6 for ; Tue, 3 Mar 2026 07:55:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772524512; cv=none; b=t+Yct/iA/rNWTEbvgliQcaCWYOL75BBYRiXCB/s6Usafj48lKyLDYzy0nnsmMJOaWLaw4sHkiPBus5wEVaKce8gEODG3kn2B6Xyt3JbLdvLLKfITgnz0zCd/ZEC8uJt1Cu2abTzYhFEgyiyluTbjQGPWo1MoU5qcaCkZDVeQn8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772524512; c=relaxed/simple; bh=/gWb85WOvGqAlgOSzLtDehw7AKRnh+7E8B4cTlui6fw=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=JZ38KSsGDjCZMm5GxQmDq1dQeOXyUSr2qLZvFto9Gj7z4a15Nyql26o9HDZAwgESqcKO4ciuvzXgtwbmBYQIN4y7fOZie7PHCkglIAj5mxaATLMEBKmC96bDG2oQCmzuASAIzaJnZ3mIPuKXfECXE1SQgI3mmtiVXFMGu72rIpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QYaciU2o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QYaciU2o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B639C116C6; Tue, 3 Mar 2026 07:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772524512; bh=/gWb85WOvGqAlgOSzLtDehw7AKRnh+7E8B4cTlui6fw=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=QYaciU2oTpG8jfg3ywavoUiUqpdz43zwccKQdfL94+zd4UUvD5f9kqIpXU8XSUhTy m1lXpQAXTS6rc+B68mSIoOzBoEvJGtdwQ+GFPa4qerpaiH1ShUUfbRCldUEvc8R0lw JezPOvqEDXFybMiPFQrwGVkebHvCjtQjVKTi3El6atbY8lCukdubtq1j5kPpAQwDlq /iuH2jz5X1T1lyrcvFtTYPT7LqP4+DG/C5jjbDV4foBq1frQsZ/dnza18RsSdA0iQB onYYPhY5BD50yYjm49zykM6l3DKbKX3ZxAi7NPxvPc1mmdTulkNcuD+Tn779xw0JfR O//pf4NTsUnVA== Message-ID: <59f168be-36ee-4982-b1fe-727e88484b59@kernel.org> Date: Tue, 3 Mar 2026 15:55:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Sheng Yong , chenguanyou , Yunlei He Subject: Re: [PATCH v2] erofs: set fileio bio failed in short read case To: Sheng Yong , xiang@kernel.org References: <20260227023008.147813-1-shengyong2026@sina.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260227023008.147813-1-shengyong2026@sina.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/2/27 10:30, Sheng Yong wrote: > From: Sheng Yong > > For file-backed mount, IO requests are handled by vfs_iocb_iter_read(). > However, it can be interrupted by SIGKILL, returning the number of > bytes actually copied. Unused folios in bio are unexpectedly marked > as uptodate. > > vfs_read > filemap_read > filemap_get_pages > filemap_readahead > erofs_fileio_readahead > erofs_fileio_rq_submit > vfs_iocb_iter_read > filemap_read > filemap_get_pages <= detect signal > erofs_fileio_ki_complete <= set all folios uptodate > > This patch addresses this by setting short read bio with an error > directly. > > Fixes: bc804a8d7e86 ("erofs: handle end of filesystem properly for file-backed mounts") > Reported-by: chenguanyou > Signed-off-by: Yunlei He > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,