]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix smb3_zero_range for Azure
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 2 May 2019 05:52:57 +0000 (15:52 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 8 May 2019 04:24:55 +0000 (23:24 -0500)
commit829b489c9301056d9ef829902442ad62605cc776
tree98abb41afde40d638530693a9b0a591083a0b271
parentfc2f3bd6815adf5a308a10b86dd5209ca59deffb
cifs: fix smb3_zero_range for Azure

For zero-range that also extend the file we were sending this as a
compound of two different operations; a fsctl to set-zero-data for the range
and then an additional set-info to extend the file size.
This does not work for Azure since it does not support this fsctl which leads
to fallocate(FALLOC_FL_ZERO_RANGE) failing but still changing the file size.

To fix this we un-compound this and send these two operations as separate
commands, firsat one command to set-zero-data for the range and it this
was successful we proceed to send a set-info to update the file size.

This fixes xfstest generic/469 for Azure servers.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c