[PATCH] fallocate returned values on failure

Jones jones.kstw at gmail.com
Thu Dec 4 20:36:28 MST 2014

Hello Jeremy,

After test this look.txt it works!

And one more concern,
upload a file named test.img to my linux box,
once if fallocate() returns -1 with errno = ENOSPC,
the file test.img is left in the linux box and its size is 0 Bytes,
hmm not quite sure if this is okay just left a file test.img with 0 Bytes,
or perhaps we could delete it in close_file() ?

1. vfs_allocate_file_space():
return -1 and errno = ENOSPC,
back to earlier frame create_file_unixpath().

2. create_file_unixpath():
goto fail;

3. close_file(req, fsp, ERROR_CLOSE);
Hmm looks like the 0KB 10GB.img file is not delete at this api.


Absolutely correct - thanks ! Here is the updated
> fix. Once you confirm that this works for you, I'll
> split into smaller units and submit to master and
> prepare back-ports all the way to 4.0.x.

More information about the samba-technical mailing list