[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiAQZUZCEH1OxFb3Oa_mqz69tagdXHnKuYd_rwRHba5Cw@mail.gmail.com>
Date: Fri, 24 Feb 2023 10:58:45 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Howells <dhowells@...hat.com>
Cc: Steve French <stfrench@...rosoft.com>,
Vishal Moola <vishal.moola@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jan Kara <jack@...e.cz>, Paulo Alcantara <pc@....nz>,
Matthew Wilcox <willy@...radead.org>,
Huang Ying <ying.huang@...el.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Xin Hao <xhao@...ux.alibaba.com>, linux-mm@...ck.org,
mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] cifs: Fix cifs_writepages_region()
On Fri, Feb 24, 2023 at 9:19 AM David Howells <dhowells@...hat.com> wrote:
>
> The skip thing, in my code, is only used in WB_SYNC_NONE mode. If we hit 5
> things in progress or rescheduling is required, we return to the caller on the
> basis that conflicting flushes appear to be happening in other threads.
Ahh. *That* is the difference, and I didn't realize.
I made all the skip-write cases the same, and I really meant for that
case to only trigger for WB_SYNC_NONE, but I stupidly didn't notice
that the whole folio_test_dirty() re-test case was done without that
WB_SYNC_NONE case that all the other cases had.
Mea culpa, mea maxima culpa. That was just me being stupid.
So that case isn't actually a "skip write" case at all, it's actually
a "no write needed at all" case.
Your original patch is the right fix, and I was just being silly for
having not realized.
I'll apply that minimal fix for now - I think the right thing to do is
your bigger patch, but that needs more thinking (or at least splitting
up).
Sorry for the confusion, and thanks for setting me straight,
Linus
Powered by blists - more mailing lists