Lines Matching refs:size
12 #include "file-set-size.h"
22 int file_set_size(int fd, off_t size)
32 i_assert(size >= 0);
39 if (size < st.st_size) {
40 if (ftruncate(fd, size) < 0) {
46 if (size == st.st_size)
53 err = posix_fallocate(fd, st.st_size, size - st.st_size);
69 memset(block, 0, I_MIN((ssize_t)sizeof(block), size - offset));
71 while (offset < size) {
73 I_MIN((ssize_t)sizeof(block), size - offset),
85 int file_preallocate(int fd ATTR_UNUSED, off_t size ATTR_UNUSED)
89 if (fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, size) < 0)
100 fs.fst_length = size;