All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] smb/client: fix fallocate allocation handling
@ 2026-06-23  2:46 Huiwen He
  2026-06-23  2:46 ` [PATCH 1/7] smb/client: name the default fallocate mode Huiwen He
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Huiwen He @ 2026-06-23  2:46 UTC (permalink / raw)
  To: smfrench, linkinjeon, pc, ronniesahlberg, sprasad, tom, bharathsm,
	senozhatsky, dhowells, metze, chenxiaosong
  Cc: linux-cifs

From: Huiwen He <hehuiwen@kylinos.cn>

CIFS fallocate can return success without allocating the requested space.
It can also derive i_blocks from EOF, making sparse files appear fully
allocated.

This series propagates sparse conversion failures, corrects i_blocks
accounting, and verifies server allocation after EOF-extending mode 0
fallocate. It also reduces the memory used by zero-write emulation and
supports small ranges starting at EOF.

General arbitrary-range preallocation remains unsupported because SMB2
provides no equivalent operation. Small ranges can be emulated by writing
zeroes.

Tested against Samba with xfstests. With `strict allocate=yes`,
generic/496, generic/568 and generic/701 pass with server allocation
verified. generic/495 was used to verify that EOF extension no longer
inflates i_blocks.

With `strict allocate=no`, requests whose allocation cannot be verified
fail instead of reporting false preallocation success.

Huiwen He (7):
  smb/client: name the default fallocate mode
  smb/client: handle smb2_set_sparse() failure in EOF-extending
    fallocate
  smb/client: handle smb2_set_sparse() failure in non-extending
    fallocate
  smb/client: do not account EOF extension as allocation
  smb/client: verify allocation after EOF-extending fallocate
  smb/client: reduce fallocate zero buffer allocation
  smb/client: emulate small fallocate ranges at EOF

 fs/smb/client/inode.c     |  13 +++-
 fs/smb/client/smb2ops.c   | 128 +++++++++++++++++++++++++++++++++-----
 fs/smb/client/smb2pdu.c   |  19 ++++++
 fs/smb/client/smb2proto.h |   3 +
 fs/smb/common/fscc.h      |   5 ++
 5 files changed, 151 insertions(+), 17 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-23  3:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23  2:46 [PATCH 0/7] smb/client: fix fallocate allocation handling Huiwen He
2026-06-23  2:46 ` [PATCH 1/7] smb/client: name the default fallocate mode Huiwen He
2026-06-23  3:50   ` Steve French
2026-06-23  2:46 ` [PATCH 2/7] smb/client: handle smb2_set_sparse() failure in EOF-extending fallocate Huiwen He
2026-06-23  2:46 ` [PATCH 3/7] smb/client: handle smb2_set_sparse() failure in non-extending fallocate Huiwen He
2026-06-23  2:46 ` [PATCH 4/7] smb/client: do not account EOF extension as allocation Huiwen He
2026-06-23  2:46 ` [PATCH 5/7] smb/client: verify allocation after EOF-extending fallocate Huiwen He
2026-06-23  2:46 ` [PATCH 6/7] smb/client: reduce fallocate zero buffer allocation Huiwen He
2026-06-23  2:46 ` [PATCH 7/7] smb/client: emulate small fallocate ranges at EOF Huiwen He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.