All of lore.kernel.org
 help / color / mirror / Atom feed
From: hehuiwen <huiwen.he@linux.dev>
To: Paulo Alcantara <pc@manguebit.org>,
	smfrench@gmail.com, linkinjeon@kernel.org,
	ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
	bharathsm@microsoft.com, senozhatsky@chromium.org,
	dhowells@redhat.com, metze@samba.org, chenxiaosong@kylinos.cn
Cc: linux-cifs@vger.kernel.org,
	Roberto Bergantinos Corpas <rbergant@redhat.com>
Subject: Re: [PATCH v8 5/5] smb/client: refresh allocation after EOF-extending fallocate
Date: Thu, 30 Jul 2026 10:17:36 +0800	[thread overview]
Message-ID: <e0e87dba-ea62-4175-b14c-34bc3753bec9@linux.dev> (raw)
In-Reply-To: <97c0ca61c2bed2d2559b32b7ed967121@manguebit.org>

Hi Paulo,

Thanks for the report.

The generic/103 failure is expected because it allocates almost all free 
space. Using separate filesystems for the test and scratch shares avoids it.

I have reproduced the generic/590 failure and am investigating it.

Thanks,
Huiwen


在 2026/7/30 06:54, Paulo Alcantara 写道:
> Huiwen He <huiwen.he@linux.dev> writes:
> 
>> From: Huiwen He <hehuiwen@kylinos.cn>
>>
>> Before this change, xfstests generic/496 was not supported on ksmbd:
>>
>>          generic/496 ... [not run] fallocated swap not supported here
>>
>> ksmbd handles SetEOF as truncate, so EOF extension alone does not
>> allocate backing blocks. A fallocated swapfile can therefore still
>> look sparse to swapon.
>>
>> Request allocation for EOF-extending fallocate ranges that can be
>> represented by FILE_ALLOCATION_INFORMATION, and refresh the allocation
>> state afterwards.
>>
>> With this change, xfstests generic/496 and generic/701 pass on ksmbd.
>>
>> However, Samba "strict allocate = no" now exposes the real generic/701
>> failure: the old pass came from inflated local i_blocks, not from
>> server allocation. generic/213 also fails in that case because an
>> oversized allocation request may not return ENOSPC.
>>
>> Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
>> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
> 
> This patch regressed fstests generic/103 and generic/590 against samba
> 4.24 (strict allocate = yes) with a 15G xfs partition for both test and
> scratch shares.  The tests now fail with -ENOSPC.
> 
> A simple reproducer
> 
> 	$ mount.cifs //samba-fs0/scratch2 /mnt/1 -o username=xxx,password=yyy
>          $ df -h /mnt/1
> 	Filesystem            Size  Used Avail Use% Mounted on
> 	//samba-fs0/scratch2   15G  326M   15G   3% /mnt/1
> 	$ xfs_io -c "falloc 0 8G" -f /mnt/1/file
> 	fallocate: No space left on device


  reply	other threads:[~2026-07-30  2:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  5:32 [PATCH v8 0/5] smb: fix fallocate and allocation accounting Huiwen He
2026-07-03  5:32 ` [PATCH v8 1/5] smb/client: refresh allocation size after duplicate extents Huiwen He
2026-07-03  5:32 ` [PATCH v8 2/5] smb/client: handle overlapping allocated ranges in fallocate Huiwen He
2026-07-03  5:32 ` [PATCH v8 3/5] smb/client: reduce fallocate zero buffer allocation Huiwen He
2026-07-03  5:32 ` [PATCH v8 4/5] smb/client: emulate small EOF-extending mode 0 fallocate ranges Huiwen He
2026-07-03  5:32 ` [PATCH v8 5/5] smb/client: refresh allocation after EOF-extending fallocate Huiwen He
2026-07-29 22:54   ` Paulo Alcantara
2026-07-30  2:17     ` hehuiwen [this message]
2026-07-30  2:54       ` hehuiwen

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=e0e87dba-ea62-4175-b14c-34bc3753bec9@linux.dev \
    --to=huiwen.he@linux.dev \
    --cc=bharathsm@microsoft.com \
    --cc=chenxiaosong@kylinos.cn \
    --cc=dhowells@redhat.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=pc@manguebit.org \
    --cc=rbergant@redhat.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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 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.