Thread (70 messages) 70 messages, 4 authors, 2021-12-09

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

From: David Howells <dhowells@redhat.com>
Date: 2021-12-09 16:50:24
Also in: ceph-devel, linux-cifs, linux-fsdevel, lkml

JeffleXu [off-list ref] wrote:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help