All of lore.kernel.org
 help / color / mirror / Atom feed
* fallocate can't change the cifs disk space usage
       [not found] <1119714633.44793917.1596421202774.JavaMail.zimbra@redhat.com>
@ 2020-08-03  2:48 ` Xiaoli Feng
  2020-08-03  4:42   ` Steve French
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xiaoli Feng @ 2020-08-03  2:48 UTC (permalink / raw)
  To: CIFS

Hello all,

Recently when I'm investigating the xfstests generic/213 generic/228 failures for cifs.
Found that fallocate can't change the cifs disk space usage. Comparing xfs fileystem, 
fallocate can update space usage.

My tests is in 5.8.0-rc7+. I also file a bug for this issue. 
  https://bugzilla.kernel.org/show_bug.cgi?id=208775

# cat /etc/samba/smb.conf
[cifs]
path=/mnt/cifs
writeable=yes
# mount //localhost/cifs cifs -o user=root,password=redhat,cache=none,actimeo=0
# df -h cifs
Filesystem        Size  Used Avail Use% Mounted on
//localhost/cifs   36G   23G   13G  66% /root/cifs
#  fallocate -o 0 -l 2g /root/cifs/file1
# df -h cifs
Filesystem        Size  Used Avail Use% Mounted on
//localhost/cifs   36G   23G   13G  66% /root/cifs
]# ls -l cifs
total 1
-rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1

Thanks.

-- 
Best regards!
XiaoLi Feng 冯小丽


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

* Re: fallocate can't change the cifs disk space usage
  2020-08-03  2:48 ` fallocate can't change the cifs disk space usage Xiaoli Feng
@ 2020-08-03  4:42   ` Steve French
  2020-08-03  8:46     ` Xiaoli Feng
  2020-08-03 15:59   ` Steve French
  2020-08-04 17:39   ` Steve French
  2 siblings, 1 reply; 7+ messages in thread
From: Steve French @ 2020-08-03  4:42 UTC (permalink / raw)
  To: Xiaoli Feng; +Cc: CIFS, samba-technical

Any luck trying the same thing to Windows and/or Azure to see if this
is possible Samba bug - sounds like possible Samba server bug but need
more information.

Are you using one of the Samba plug in VFS modules on the server (like
vfs_btrfs)?

What does the filesystem show (before and after) on the server side
(local file system not just the remote view that Samba is returning
for statfs) when you try the df -h?

On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
>
> Hello all,
>
> Recently when I'm investigating the xfstests generic/213 generic/228 failures for cifs.
> Found that fallocate can't change the cifs disk space usage. Comparing xfs fileystem,
> fallocate can update space usage.
>
> My tests is in 5.8.0-rc7+. I also file a bug for this issue.
>   https://bugzilla.kernel.org/show_bug.cgi?id=208775
>
> # cat /etc/samba/smb.conf
> [cifs]
> path=/mnt/cifs
> writeable=yes
> # mount //localhost/cifs cifs -o user=root,password=redhat,cache=none,actimeo=0
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> #  fallocate -o 0 -l 2g /root/cifs/file1
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> ]# ls -l cifs
> total 1
> -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
>
> Thanks.
>
> --
> Best regards!
> XiaoLi Feng 冯小丽
>


-- 
Thanks,

Steve

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

* Re: fallocate can't change the cifs disk space usage
  2020-08-03  4:42   ` Steve French
@ 2020-08-03  8:46     ` Xiaoli Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Xiaoli Feng @ 2020-08-03  8:46 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS, samba-technical

Hell Steve,


----- Original Message -----
> From: "Steve French" <smfrench@gmail.com>
> To: "Xiaoli Feng" <xifeng@redhat.com>
> Cc: "CIFS" <linux-cifs@vger.kernel.org>, "samba-technical" <samba-technical@lists.samba.org>
> Sent: Monday, August 3, 2020 12:42:32 PM
> Subject: Re: fallocate can't change the cifs disk space usage
> 
> Any luck trying the same thing to Windows and/or Azure to see if this
> is possible Samba bug - sounds like possible Samba server bug but need
> more information.

Thanks for quick response. When trying the same thing to windows. This issue is gone.
fallocate can update the space usage.

> 
> Are you using one of the Samba plug in VFS modules on the server (like
> vfs_btrfs)?

I'm not using any samba plug in vfs.
 
> 
> What does the filesystem show (before and after) on the server side
> (local file system not just the remote view that Samba is returning
> for statfs) when you try the df -h?

on the server side, the space usage reported by df also keep the same before and
after fallocate.

> 
> On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
> >
> > Hello all,
> >
> > Recently when I'm investigating the xfstests generic/213 generic/228
> > failures for cifs.
> > Found that fallocate can't change the cifs disk space usage. Comparing xfs
> > fileystem,
> > fallocate can update space usage.
> >
> > My tests is in 5.8.0-rc7+. I also file a bug for this issue.
> >   https://bugzilla.kernel.org/show_bug.cgi?id=208775
> >
> > # cat /etc/samba/smb.conf
> > [cifs]
> > path=/mnt/cifs
> > writeable=yes
> > # mount //localhost/cifs cifs -o
> > user=root,password=redhat,cache=none,actimeo=0
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > #  fallocate -o 0 -l 2g /root/cifs/file1
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > ]# ls -l cifs
> > total 1
> > -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
> >
> > Thanks.
> >
> > --
> > Best regards!
> > XiaoLi Feng 冯小丽
> >
> 
> 
> --
> Thanks,
> 
> Steve
> 
> 


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

* Re: fallocate can't change the cifs disk space usage
  2020-08-03  2:48 ` fallocate can't change the cifs disk space usage Xiaoli Feng
  2020-08-03  4:42   ` Steve French
@ 2020-08-03 15:59   ` Steve French
  2020-08-03 18:36     ` Steve French
  2020-08-04 17:39   ` Steve French
  2 siblings, 1 reply; 7+ messages in thread
From: Steve French @ 2020-08-03 15:59 UTC (permalink / raw)
  To: Xiaoli Feng; +Cc: CIFS

So locally on xfs this works, but Samba when receiving the request
remotely apparently isn't doing the fallocate.  Would be curious if
this works with vfs_btrfs and btrfs filesystem on the share - or a
Samba server bug.

On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
>
> Hello all,
>
> Recently when I'm investigating the xfstests generic/213 generic/228 failures for cifs.
> Found that fallocate can't change the cifs disk space usage. Comparing xfs fileystem,
> fallocate can update space usage.
>
> My tests is in 5.8.0-rc7+. I also file a bug for this issue.
>   https://bugzilla.kernel.org/show_bug.cgi?id=208775
>
> # cat /etc/samba/smb.conf
> [cifs]
> path=/mnt/cifs
> writeable=yes
> # mount //localhost/cifs cifs -o user=root,password=redhat,cache=none,actimeo=0
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> #  fallocate -o 0 -l 2g /root/cifs/file1
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> ]# ls -l cifs
> total 1
> -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
>
> Thanks.
>
> --
> Best regards!
> XiaoLi Feng 冯小丽
>


-- 
Thanks,

Steve

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

* Re: fallocate can't change the cifs disk space usage
  2020-08-03 15:59   ` Steve French
@ 2020-08-03 18:36     ` Steve French
  0 siblings, 0 replies; 7+ messages in thread
From: Steve French @ 2020-08-03 18:36 UTC (permalink / raw)
  To: Xiaoli Feng, samba-technical; +Cc: CIFS

One of the things that Samba server appears to be doing wrong is that
Samba is creating the file as a sparse file and returning that it is
not a sparse file - this obviously creates a problem because an
fallocate on a non-sparse file can be a no op ... but the server
didn't tell us it was a sparse file ...

On Mon, Aug 3, 2020 at 10:59 AM Steve French <smfrench@gmail.com> wrote:
>
> So locally on xfs this works, but Samba when receiving the request
> remotely apparently isn't doing the fallocate.  Would be curious if
> this works with vfs_btrfs and btrfs filesystem on the share - or a
> Samba server bug.
>
> On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
> >
> > Hello all,
> >
> > Recently when I'm investigating the xfstests generic/213 generic/228 failures for cifs.
> > Found that fallocate can't change the cifs disk space usage. Comparing xfs fileystem,
> > fallocate can update space usage.
> >
> > My tests is in 5.8.0-rc7+. I also file a bug for this issue.
> >   https://bugzilla.kernel.org/show_bug.cgi?id=208775
> >
> > # cat /etc/samba/smb.conf
> > [cifs]
> > path=/mnt/cifs
> > writeable=yes
> > # mount //localhost/cifs cifs -o user=root,password=redhat,cache=none,actimeo=0
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > #  fallocate -o 0 -l 2g /root/cifs/file1
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > ]# ls -l cifs
> > total 1
> > -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
> >
> > Thanks.
> >
> > --
> > Best regards!
> > XiaoLi Feng 冯小丽
> >
>
>
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

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

* Re: fallocate can't change the cifs disk space usage
  2020-08-03  2:48 ` fallocate can't change the cifs disk space usage Xiaoli Feng
  2020-08-03  4:42   ` Steve French
  2020-08-03 15:59   ` Steve French
@ 2020-08-04 17:39   ` Steve French
  2020-08-06  2:35     ` Xiaoli Feng
  2 siblings, 1 reply; 7+ messages in thread
From: Steve French @ 2020-08-04 17:39 UTC (permalink / raw)
  To: Xiaoli Feng; +Cc: CIFS

I was looking in a little more detail at tests 213 and 228 ... and I
see 228 passing to all servers I tried.  Did you see a problem with
that?

With 213 I see it working to Windows, and to Samba test 213 also works
but only if "strict allocate = yes" is set in smb.conf (I just
verified it on the buildbot)


On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
>
> Hello all,
>
> Recently when I'm investigating the xfstests generic/213 generic/228 failures for cifs.
> Found that fallocate can't change the cifs disk space usage. Comparing xfs fileystem,
> fallocate can update space usage.
>
> My tests is in 5.8.0-rc7+. I also file a bug for this issue.
>   https://bugzilla.kernel.org/show_bug.cgi?id=208775
>
> # cat /etc/samba/smb.conf
> [cifs]
> path=/mnt/cifs
> writeable=yes
> # mount //localhost/cifs cifs -o user=root,password=redhat,cache=none,actimeo=0
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> #  fallocate -o 0 -l 2g /root/cifs/file1
> # df -h cifs
> Filesystem        Size  Used Avail Use% Mounted on
> //localhost/cifs   36G   23G   13G  66% /root/cifs
> ]# ls -l cifs
> total 1
> -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
>
> Thanks.
>
> --
> Best regards!
> XiaoLi Feng 冯小丽
>


-- 
Thanks,

Steve

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

* Re: fallocate can't change the cifs disk space usage
  2020-08-04 17:39   ` Steve French
@ 2020-08-06  2:35     ` Xiaoli Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Xiaoli Feng @ 2020-08-06  2:35 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS

Hi,

----- Original Message -----
> From: "Steve French" <smfrench@gmail.com>
> To: "Xiaoli Feng" <xifeng@redhat.com>
> Cc: "CIFS" <linux-cifs@vger.kernel.org>
> Sent: Wednesday, August 5, 2020 1:39:43 AM
> Subject: Re: fallocate can't change the cifs disk space usage
> 
> I was looking in a little more detail at tests 213 and 228 ... and I
> see 228 passing to all servers I tried.  Did you see a problem with
> that?

Sorry, I made a mistake. I tested 228 in RHEL8 before. It's failed. 
Maybe it needs some patches. Now I re-test 228 in 5.8.0-rc7+. It's 
passed for both servers. And 213 is also passed if "strict allocate
 = yes" is set. And now I met another issue for windows file server.
client is 5.8.0-rc7+.

# truncate -s 320k windows/file
# fallocate -o 2k -l 256k windows/file
fallocate: fallocate failed: Operation not supported
# fallocate -o 320k -l 256k windows/file
# 

Seems the offset for fallocate need beyond the size of truncate. But
for xfs, it's passed. This test is base on test 255.

> 
> With 213 I see it working to Windows, and to Samba test 213 also works
> but only if "strict allocate = yes" is set in smb.conf (I just
> verified it on the buildbot)
> 
> 
> On Sun, Aug 2, 2020 at 9:55 PM Xiaoli Feng <xifeng@redhat.com> wrote:
> >
> > Hello all,
> >
> > Recently when I'm investigating the xfstests generic/213 generic/228
> > failures for cifs.
> > Found that fallocate can't change the cifs disk space usage. Comparing xfs
> > fileystem,
> > fallocate can update space usage.
> >
> > My tests is in 5.8.0-rc7+. I also file a bug for this issue.
> >   https://bugzilla.kernel.org/show_bug.cgi?id=208775
> >
> > # cat /etc/samba/smb.conf
> > [cifs]
> > path=/mnt/cifs
> > writeable=yes
> > # mount //localhost/cifs cifs -o
> > user=root,password=redhat,cache=none,actimeo=0
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > #  fallocate -o 0 -l 2g /root/cifs/file1
> > # df -h cifs
> > Filesystem        Size  Used Avail Use% Mounted on
> > //localhost/cifs   36G   23G   13G  66% /root/cifs
> > ]# ls -l cifs
> > total 1
> > -rwxr-xr-x. 1 root root 2147483648 Aug  2 21:57 file1
> >
> > Thanks.
> >
> > --
> > Best regards!
> > XiaoLi Feng 冯小丽
> >
> 
> 
> --
> Thanks,
> 
> Steve
> 
> 


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

end of thread, other threads:[~2020-08-06  2:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1119714633.44793917.1596421202774.JavaMail.zimbra@redhat.com>
2020-08-03  2:48 ` fallocate can't change the cifs disk space usage Xiaoli Feng
2020-08-03  4:42   ` Steve French
2020-08-03  8:46     ` Xiaoli Feng
2020-08-03 15:59   ` Steve French
2020-08-03 18:36     ` Steve French
2020-08-04 17:39   ` Steve French
2020-08-06  2:35     ` Xiaoli Feng

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.