lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 24/64] netfs: Pass more information on how to deal with a hole in the cache
    Date
    JeffleXu <jefflexu@linux.alibaba.com> wrote:

    > > @@ -466,7 +466,7 @@ static void netfs_rreq_short_read(struct netfs_read_request *rreq,
    > > netfs_get_read_subrequest(subreq);
    > > atomic_inc(&rreq->nr_rd_ops);
    > > if (subreq->source == NETFS_READ_FROM_CACHE)
    > > - netfs_read_from_cache(rreq, subreq, true);
    > > + netfs_read_from_cache(rreq, subreq, NETFS_READ_HOLE_CLEAR);
    >
    > Hi I'm not sure why NETFS_READ_HOLE_CLEAR style should be used in 'short
    > read' case.

    The cache backing filesystem (eg. ext4) might have excised a chunk of zeros
    from the cache in order to optimise its extent list. This instructs the cache
    to zero over the cracks. Actually, I need to think a bit further on this.
    This was written assuming that the cache tracks its content independently -
    but those patches are not in with this set.

    > I'm not sure why 'subreq->start' is not incremented with
    > 'subreq->transferred' when calling cres->ops->read() in 'short read' case.

    subreq->start shouldn't get changed. subreq->transferred is sufficient.

    David

    \
     
     \ /
      Last update: 2021-12-09 17:50    [W:4.350 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site