Re: [PATCH 24/64] netfs: Pass more information on how to deal with a hole in the cache

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

 



JeffleXu <jefflexu@xxxxxxxxxxxxxxxxx> 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





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux