Re: CIFS support preallocate partially

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No preallocate is actually sent on the wire (other than creating the
file) in the example you tried.   Some servers do not support
preallocate - do you know the expected behavior on a local file system
that does not support preallocate whether it should 1) fail to create
the file and return an error or 2) succeed in creating the file (even
though couldn't preallocate the size).

Looking at the code I am surprised it is not returning an error
message though it looks like smb3_simple_falloc would return an
EOPNOTSUPP error (at least if allocating more than a few pages beyond
end of file)

On Fri, Mar 22, 2019 at 7:26 AM Xiaoli Feng <xifeng@xxxxxxxxxx> wrote:
>
> Hello,
>
> Use xfs_io to test preallocate. It returns successfuly. But it's a empty file. And doesn't allocate space.
>
> # mount //localhost/cifs  ~/cifs
> # xfs_io -f -c "resvsp 4 4" cifs/file
> # du -h cifs/file
> 0       cifs/file
>
>
> Test on xfs:
> # rm -rf file
> # xfs_io -f -c "resvsp 4 4" file
> # du -h file
> 4.0K    file
>
> Is it expected for cifs? I think the size should be a block size(1M for cifs).
>
> Thanks.
>
> --
> Best regards!
> XiaoLi Feng 冯小丽
>
> Red Hat Software (Beijing) Co.,Ltd
> filesystem-qe Team
> IRC:xifeng,#channel: fs-qe
> Tel:+86-10-8388112
> 9/F, Raycom



-- 
Thanks,

Steve




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux