]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #20398 from wjwithagen/wip-posix_fallocate
authorKefu Chai <tchaikov@gmail.com>
Sun, 15 Apr 2018 15:02:35 +0000 (23:02 +0800)
committerGitHub <noreply@github.com>
Sun, 15 Apr 2018 15:02:35 +0000 (23:02 +0800)
common: posix_fallocate on ZFS returns EINVAL

Reviewed-by: Kefu Chai <kchai@redhat.com>
1  2 
src/CMakeLists.txt
src/os/bluestore/BlueStore.cc
src/os/filestore/FileJournal.cc

Simple merge
index cdeac45764c0c9906ea5ae941bb9d8d91c75171f,130287ef2845fb7b55c53ea97b0078f5a09c9df0..ffc3ee0c2737e3cb588c81bf446275806083fee8
@@@ -5318,25 -5317,9 +5317,9 @@@ int BlueStore::_setup_block_symlink_or_
            VOID_TEMP_FAILURE_RETRY(::close(fd));
            return -r;
          }
- #else
-         char data[1024*128];
-         for (uint64_t off = 0; off < size; off += sizeof(data)) {
-           if (off + sizeof(data) > size)
-             r = ::write(fd, data, size - off);
-           else
-             r = ::write(fd, data, sizeof(data));
-           if (r < 0) {
-             r = -errno;
-             derr << __func__ << " failed to prefallocate w/ write " << name << " file to "
-               << size << ": " << cpp_strerror(r) << dendl;
-             VOID_TEMP_FAILURE_RETRY(::close(fd));
-             return r;
-           }
-         }
- #endif
        }
        dout(1) << __func__ << " resized " << name << " file to "
 -              << pretty_si_t(size) << "B" << dendl;
 +              << byte_u_t(size) << dendl;
        }
        VOID_TEMP_FAILURE_RETRY(::close(fd));
      } else {
Simple merge