From: Mark A Whiting <whitingm@opentext.com>
To: Enzo Matsumiya <ematsumiya@suse.de>
Cc: Steve French <smfrench@gmail.com>,
"Heckmann, Ilja" <heckmann@izw-berlin.de>,
"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>,
"henrique.carvalho@suse.com" <henrique.carvalho@suse.com>
Subject: Re: [[ EXT ]] [BUG REPORT] cifs/smb data corruption when writing, x86_64, kernel 6.6.71
Date: Mon, 31 Mar 2025 19:47:51 +0000 [thread overview]
Message-ID: <YT1PR01MB9451A0F623371F50E77CC1C9B3AD2@YT1PR01MB9451.CANPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <aaloi77h2f5xolhrnegxsxntqp2jopwisunmjfp45idsoockpy@cy5agf2oqjop>
Hi Enzo,
I now have a couple days of testing done. The good news is that we've run several terabytes of data through cifs and haven't had a single failure with the patch you provided.
Now for the not as good news. Even though we aren't seeing any data corruption or failures. We are regularly and very frequently hitting a WARN_ON in cifs_extend_writeback() on line 2866.
>for (i = 0; i < folio_batch_count(&batch); i++) {
> folio = batch.folios[i];
> /* The folio should be locked, dirty and not undergoing
> * writeback from the loop above.
> */
> if (!folio_clear_dirty_for_io(folio))
> WARN_ON(1);
Reading through the folio_clear_dirty_for_io() function it appears the only way this would happen is if the folio is clean, i.e., the dirty flag is not set.
>if (folio_test_writeback(folio)) {
> /*
> * For data-integrity syscalls (fsync(), msync()) we must wait for
> * the I/O to complete on the page.
> * For other cases (!sync), we can just skip this page, even if
> * it's dirty.
> */
> if (!sync) {
> stop = false;
> goto unlock_next;
> } else {
> folio_wait_writeback(folio);
Reading through your patch, unless I missed something, this folio_wait_writeback() call is the only addition that could affect the dirty flag indirectly. I'm assuming that when the current writeback is complete it would mark the folio clean. Then when it's added to the current batch and later checked, it's clean instead of the dirty flag being set as expected.
Since you wrote the patch, is this expected behavior and that WARN_ON isn't valid anymore? Or is this something I should be worried about?
Thanks,
Mark Whiting
next prev parent reply other threads:[~2025-03-31 19:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 21:24 [BUG REPORT] cifs/smb data corruption when writing, x86_64, kernel 6.6.71 Mark A Whiting
2025-03-26 10:11 ` AW: [[ EXT ]] " Heckmann, Ilja
2025-03-26 18:58 ` Steve French
2025-03-26 21:13 ` Enzo Matsumiya
2025-03-27 12:48 ` Mark A Whiting
2025-03-27 13:07 ` Enzo Matsumiya
2025-03-27 19:31 ` [EXTERNAL] - " Mark A Whiting
2025-03-31 19:47 ` Mark A Whiting [this message]
2025-11-06 15:00 ` Bharath SM
2025-11-06 15:20 ` Enzo Matsumiya
2025-11-06 15:51 ` Bharath SM
2025-11-06 16:03 ` Enzo Matsumiya
2025-11-10 15:56 ` David Howells
2025-11-06 16:22 ` David Howells
2025-11-06 16:46 ` Bharath SM
2025-11-06 16:49 ` Bharath SM
2025-11-10 16:00 ` David Howells
2025-11-11 9:22 ` David Howells
2025-11-11 10:39 ` Shyam Prasad N
2025-11-12 17:09 ` Shyam Prasad N
2025-11-12 18:14 ` David Howells
2025-11-13 12:04 ` Shyam Prasad N
2025-11-13 13:57 ` David Howells
2025-11-14 9:27 ` Shyam Prasad N
2025-11-14 10:49 ` David Howells
2025-11-14 10:57 ` Shyam Prasad N
2025-11-07 12:54 ` Shyam Prasad N
2025-11-10 4:37 ` Shyam Prasad N
2025-03-27 10:09 ` AW: [[ EXT ]] " Heckmann, Ilja
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=YT1PR01MB9451A0F623371F50E77CC1C9B3AD2@YT1PR01MB9451.CANPRD01.PROD.OUTLOOK.COM \
--to=whitingm@opentext.com \
--cc=ematsumiya@suse.de \
--cc=heckmann@izw-berlin.de \
--cc=henrique.carvalho@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=smfrench@gmail.com \
/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