linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: JeffleXu <jefflexu@linux.alibaba.com>
To: David Howells <dhowells@redhat.com>, willy@infradead.org
Cc: Jeff Layton <jlayton@kernel.org>,
	linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] netfs: Fix dodgy maths
Date: Tue, 8 Nov 2022 13:54:47 +0800	[thread overview]
Message-ID: <084d78a4-6052-f2ec-72f2-af9c4979f5dc@linux.alibaba.com> (raw)
In-Reply-To: <166757988611.950645.7626959069846893164.stgit@warthog.procyon.org.uk>



On 11/5/22 12:38 AM, David Howells wrote:
> Fix the dodgy maths in netfs_rreq_unlock_folios().  start_page could be
> inside the folio, in which case the calculation of pgpos will be come up
> with a negative number (though for the moment rreq->start is rounded down
> earlier and folios would have to get merged whilst locked)

Hi, the patch itself seems fine. Just some questions about the scenario.

1. "start_page could be inside the folio" Is that because
.expand_readahead() called from netfs_readahead()? Since otherwise,
req-start is always aligned to the folio boundary.

2. If start_page is indeed inside the folio, then only the trailing part
of the first folio can be covered by the request, and this folio will be
marked with uptodate, though the beginning part of the folio may have
not been read from the cache. Is that expected? Or correct me if I'm wrong.


-- 
Thanks,
Jingbo

  reply	other threads:[~2022-11-08  5:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 16:37 [PATCH v2 1/2] netfs: Fix missing xas_retry() calls in xarray iteration David Howells
2022-11-04 16:38 ` [PATCH v2 2/2] netfs: Fix dodgy maths David Howells
2022-11-08  5:54   ` JeffleXu [this message]
2022-11-08 15:59   ` David Howells
2022-11-09  5:35   ` [Linux-cachefs] " JeffleXu
2022-11-14 21:26   ` Jeff Layton
2022-11-08  3:28 ` [Linux-cachefs] [PATCH v2 1/2] netfs: Fix missing xas_retry() calls in xarray iteration JeffleXu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=084d78a4-6052-f2ec-72f2-af9c4979f5dc@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).