Re: fio with fallocate fails with ENOSYS

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

 



On 2012-07-12 22:51, Kevin Castiglia wrote:
> Hello,
> 
> fio with fallocate fails with ENOSYS, but I'm unable to reproduce this
> failure outside of fio. The following command:
>     fio --rw=write --fallocate=keep --filename=hello --size=1G
> --runtime=10 --time_based --name=test
> reports an error (if there is no file named 'hello' in my current
> working directory).
> 
> Within the output I see: err=38 (file:filesetup.c:98, func=fallocate,
> error=Function not implemented)
> 
> The following C program prints 0 (if there is no file named testing in
> my current working directory):
> 
> #include <linux/falloc.h>
> #include <stdio.h>
> #include <errno.h>
> 
> int main() {
> 
>     int f = open("testing", "O_CREAT", "0644");
>     int r = fallocate(f, 01, 0, 1073741824);
>     printf("%d\n", r);
> 
> }
> 
> Why is the fio command above failing with ENOSYS when this test
> program runs without errors?
> 
> Also,
> 
>     $ strace fallocate -n -l 1G test
>     ...
>     fallocate(3, 01, 0, 1073741824)         = 0
>     ...
> 
> the fallocate system call seems to work.
> 
> I'm using Fedora 16 , fio 2.07, and an ext4 filesystem
> 
>     $ fio --version
>     fio 2.0.7
> 
>     $ uname -r
>     3.1.0-7.fc16.x86_64
> 
>     $ mount
>     ...
>     /dev/mapper/vg_kcastiglia-lv_home on /home type ext4
> (rw,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered)
>     ...
> 
>     $ ldd --version
>     ldd (GNU libc) 2.14.90
>     ...
> 
>     $ gcc --version
>     gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
>     ...

It'd help if you strace (-f) fio to show the issue.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux