diff options
author | Steve French <stfrench@microsoft.com> | 2021-03-19 00:05:48 -0500 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-03-19 11:51:31 -0500 |
commit | 65af8f0166f4d15e61c63db498ec7981acdd897f (patch) | |
tree | 529634cc41ad29c4136a7f31a43722341919eb90 /fs/dcache.c | |
parent | af3ef3b1031634724a3763606695ebcd113d782b (diff) |
cifs: fix allocation size on newly created files
Applications that create and extend and write to a file do not
expect to see 0 allocation size. When file is extended,
set its allocation size to a plausible value until we have a
chance to query the server for it. When the file is cached
this will prevent showing an impossible number of allocated
blocks (like 0). This fixes e.g. xfstests 614 which does
1) create a file and set its size to 64K
2) mmap write 64K to the file
3) stat -c %b for the file (to query the number of allocated blocks)
It was failing because we returned 0 blocks. Even though we would
return the correct cached file size, we returned an impossible
allocation size.
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: <stable@vger.kernel.org>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions