[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6064150a-7517-c0e1-72bb-e1a8adcfae74@linux.alibaba.com>
Date: Fri, 4 Nov 2022 20:20:09 +0800
From: JeffleXu <jefflexu@...ux.alibaba.com>
To: Jeff Layton <jlayton@...nel.org>, dhowells@...hat.com,
xiang@...nel.org, chao@...nel.org, linux-cachefs@...hat.com,
linux-erofs@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/2] erofs: switch to prepare_ondemand_read() in fscache
mode
On 11/4/22 7:46 PM, Jeff Layton wrote:
> On Fri, 2022-11-04 at 15:26 +0800, Jingbo Xu wrote:
>> Switch to prepare_ondemand_read() interface and a self-contained request
>> completion to get rid of netfs_io_[request|subrequest].
>>
>> The whole request will still be split into slices (subrequest) according
>> to the cache state of the backing file. As long as one of the
>> subrequests fails, the whole request will be marked as failed. Besides
>> it will not retry for short read. Similarly the whole request will fail
>> if that really happens.
>>
>
> That's sort of nasty. The kernel can generally give you a short read for
> all sorts of reasons, some of which may have nothing to do with the
> underlying file or filesystem.
>
> Passing an error back to an application on a short read is probably not
> what you want to do here. The usual thing to do is just to return what
> you can, and let the application redrive the request if it wants.
>
Yeah, thanks for your comment. We can fix this either in current
patchset or a separate series. As we just discussed on IRC, we will fix
in the following series.
--
Thanks,
Jingbo
Powered by blists - more mailing lists