Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Shyam Prasad N <nspmangalore@gmail.com>
Cc: dhowells@redhat.com, Bharath SM <bharathsm.hsk@gmail.com>,
	Mark A Whiting <whitingm@opentext.com>,
	henrique.carvalho@suse.com, Enzo Matsumiya <ematsumiya@suse.de>,
	Steve French <smfrench@gmail.com>,
	Paulo Alcantara <pc@manguebit.org>,
	"Heckmann, Ilja" <heckmann@izw-berlin.de>,
	"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>
Subject: Re: [[ EXT ]] [BUG REPORT] cifs/smb data corruption when writing, x86_64, kernel 6.6.71
Date: Thu, 13 Nov 2025 13:57:31 +0000	[thread overview]
Message-ID: <1640439.1763042251@warthog.procyon.org.uk> (raw)
In-Reply-To: <CANT5p=p4KSRsCAB-peTKehvsYYiuOxy3qLNDO9j5H+5PP_eiyw@mail.gmail.com>

Shyam Prasad N <nspmangalore@gmail.com> wrote:

> +
> +			/* boundary check before the folio is accounted */
> +			if ((max_pages - nr_pages) <= 0 ||
> +			    (*_len + len) >= max_len ||
> +			    (*_count - nr_pages) <= 0) {
> +				folio_unlock(folio);
> +				folio_put(folio);
> +				xas_reset(xas);
> +				break;
> +			}
> +

I suspect that whilst this will work, it will mean that you can never append a
partial page to a write op; a partial page will always have to start a new RPC
call.

So if you do:

	fd = open("/cifs/foo");
	write(fd, buf, 0x1001);
	close(fd);

it will make two Write ops, one for 4K and one for 1 byte (give or take
PAGE_SIZE==4096).

David


  reply	other threads:[~2025-11-13 13:57 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
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 [this message]
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=1640439.1763042251@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=bharathsm.hsk@gmail.com \
    --cc=ematsumiya@suse.de \
    --cc=heckmann@izw-berlin.de \
    --cc=henrique.carvalho@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@manguebit.org \
    --cc=smfrench@gmail.com \
    --cc=whitingm@opentext.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