aports/community/ceph19/11-lfs.patch
2024-10-13 13:31:19 +00:00

93 lines
2.5 KiB
Diff

--- a/src/common/buffer.cc
+++ b/src/common/buffer.cc
@@ -1680,7 +1680,7 @@
if (len > st.st_size - off) {
len = st.st_size - off;
}
- ssize_t ret = lseek64(fd, off, SEEK_SET);
+ ssize_t ret = lseek(fd, off, SEEK_SET);
if (ret != (ssize_t)off) {
return -errno;
}
@@ -1804,7 +1804,7 @@
#ifdef HAVE_PWRITEV
r = ::pwritev(fd, vec, veclen, offset);
#else
- r = ::lseek64(fd, offset, SEEK_SET);
+ r = ::lseek(fd, offset, SEEK_SET);
if (r != offset) {
return -errno;
}
@@ -1969,7 +1969,7 @@
int buffer::list::write_fd(int fd, uint64_t offset) const
{
- int r = ::lseek64(fd, offset, SEEK_SET);
+ int r = ::lseek(fd, offset, SEEK_SET);
if (r != offset)
return -errno;
--- a/src/os/fs/FS.cc
+++ b/src/os/fs/FS.cc
@@ -170,7 +170,7 @@
// fall back to writing zeros
ceph::bufferlist bl;
bl.append_zero(length);
- r = ::lseek64(fd, offset, SEEK_SET);
+ r = ::lseek(fd, offset, SEEK_SET);
if (r < 0) {
r = -errno;
goto out;
--- a/src/tools/cephfs/Dumper.cc
+++ b/src/tools/cephfs/Dumper.cc
@@ -137,8 +137,8 @@
}
// write the data
- off64_t seeked = ::lseek64(fd, start, SEEK_SET);
- if (seeked == (off64_t)-1) {
+ off_t seeked = ::lseek(fd, start, SEEK_SET);
+ if (seeked == (off_t)-1) {
r = errno;
derr << "Error " << r << " (" << cpp_strerror(r) << ") seeking to 0x" << std::hex << start << std::dec << dendl;
::close(fd);
@@ -402,7 +402,7 @@
while (left > 0) {
// Read
bufferlist j;
- lseek64(fd, pos, SEEK_SET);
+ lseek(fd, pos, SEEK_SET);
uint64_t l = std::min<uint64_t>(left, 1024*1024);
j.read_fd(fd, l);
--- a/src/tools/rbd/action/Export.cc
+++ b/src/tools/rbd/action/Export.cc
@@ -360,7 +360,7 @@
return;
}
- uint64_t chkret = lseek64(m_fd, m_dest_offset, SEEK_SET);
+ uint64_t chkret = lseek(m_fd, m_dest_offset, SEEK_SET);
if (chkret != m_dest_offset) {
cerr << "rbd: error seeking destination image to offset "
<< m_dest_offset << std::endl;
@@ -545,7 +545,7 @@
if (r < 0)
return r;
- uint64_t chkret = lseek64(fd, file_size, SEEK_SET);
+ uint64_t chkret = lseek(fd, file_size, SEEK_SET);
if (chkret != file_size)
r = errno;
}
--- a/src/tools/rbd/action/Import.cc
+++ b/src/tools/rbd/action/Import.cc
@@ -339,7 +339,7 @@
}
} else {
// lseek to skip this tag
- off64_t offs = lseek64(fd, length, SEEK_CUR);
+ off_t offs = lseek(fd, length, SEEK_CUR);
if (offs < 0) {
return -errno;
}