Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XrdCeph : fixed problem with files bigger than 2GB for synchronous reads #214

Merged
merged 1 commit into from
Mar 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/XrdCeph/XrdCephOssFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ssize_t XrdCephOssFile::Read(off_t offset, size_t blen) {
}

ssize_t XrdCephOssFile::Read(void *buff, off_t offset, size_t blen) {
int rc = ceph_posix_lseek(m_fd, offset, SEEK_SET);
long long rc = ceph_posix_lseek(m_fd, offset, SEEK_SET);
if (offset == rc) {
return ceph_posix_read(m_fd, buff, blen);
}
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCeph/XrdCephPosix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ off_t ceph_posix_lseek(int fd, off_t offset, int whence) {
std::map<unsigned int, CephFileRef>::iterator it = g_fds.find(fd);
if (it != g_fds.end()) {
CephFileRef &fr = it->second;
logwrapper((char*)"ceph_lseek: for fd %d, offset=%d, whence=%d", fd, offset, whence);
logwrapper((char*)"ceph_lseek: for fd %d, offset=%lld, whence=%d", fd, offset, whence);
return (off_t)lseek_compute_offset(fr, offset, whence);
} else {
return -EBADF;
Expand All @@ -522,7 +522,7 @@ off64_t ceph_posix_lseek64(int fd, off64_t offset, int whence) {
std::map<unsigned int, CephFileRef>::iterator it = g_fds.find(fd);
if (it != g_fds.end()) {
CephFileRef &fr = it->second;
logwrapper((char*)"ceph_lseek64: for fd %d, offset=%d, whence=%d", fd, offset, whence);
logwrapper((char*)"ceph_lseek64: for fd %d, offset=%lld, whence=%d", fd, offset, whence);
return lseek_compute_offset(fr, offset, whence);
} else {
return -EBADF;
Expand Down