if (is_unmounting()) {
ldout(cct, 10) << "unmounting: trim pass, size was " << lru.lru_get_size()
<< "+" << inode_map.size() << dendl;
- long unsigned size = lru.lru_get_size() + inode_map.size();
+ uint64_t size = lru.lru_get_size() + inode_map.size();
trim_cache();
if (size < lru.lru_get_size() + inode_map.size()) {
ldout(cct, 10) << "unmounting: trim pass, cache shrank, poking unmount()" << dendl;
return -EROFS;
}
if ((mask & CEPH_SETATTR_SIZE) &&
- (unsigned long)stx->stx_size > in->size &&
- is_quota_bytes_exceeded(in, (unsigned long)stx->stx_size - in->size,
+ (uint64_t)stx->stx_size > in->size &&
+ is_quota_bytes_exceeded(in, (uint64_t)stx->stx_size - in->size,
perms)) {
return -EDQUOT;
}
CEPH_CAP_FILE_WR;
}
if (mask & CEPH_SETATTR_SIZE) {
- if ((unsigned long)stx->stx_size < mdsmap->get_max_filesize()) {
+ if ((uint64_t)stx->stx_size < mdsmap->get_max_filesize()) {
req->head.args.setattr.size = stx->stx_size;
ldout(cct,10) << "changing size to " << stx->stx_size << dendl;
} else { //too big!
r = _opendir(in.get(), dirpp, perms);
/* if ENOTDIR, dirpp will be an uninitialized point and it's very dangerous to access its value */
if (r != -ENOTDIR)
- tout(cct) << (unsigned long)*dirpp << std::endl;
+ tout(cct) << (uintptr_t)*dirpp << std::endl;
return r;
}
int Client::closedir(dir_result_t *dir)
{
tout(cct) << __func__ << std::endl;
- tout(cct) << (unsigned long)dir << std::endl;
+ tout(cct) << (uintptr_t)dir << std::endl;
ldout(cct, 3) << __func__ << "(" << dir << ") = 0" << dendl;
std::scoped_lock lock(client_lock);
}
int r = _opendir(in, dirpp, perms);
- tout(cct) << (unsigned long)*dirpp << std::endl;
+ tout(cct) << (uintptr_t)*dirpp << std::endl;
ldout(cct, 3) << "ll_opendir " << vino << " = " << r << " (" << *dirpp << ")"
<< dendl;
ldout(cct, 3) << "ll_releasedir " << dirp << dendl;
tout(cct) << "ll_releasedir" << std::endl;
- tout(cct) << (unsigned long)dirp << std::endl;
+ tout(cct) << (uintptr_t)dirp << std::endl;
std::scoped_lock lock(client_lock);
ldout(cct, 3) << "ll_fsyncdir " << dirp << dendl;
tout(cct) << "ll_fsyncdir" << std::endl;
- tout(cct) << (unsigned long)dirp << std::endl;
+ tout(cct) << (uintptr_t)dirp << std::endl;
std::scoped_lock lock(client_lock);
return _fsync(dirp->inode.get(), false);
if (fhptr) {
ll_unclosed_fh_set.insert(fhptr);
}
- tout(cct) << (unsigned long)fhptr << std::endl;
+ tout(cct) << (uintptr_t)fhptr << std::endl;
ldout(cct, 3) << "ll_open " << vino << " " << ceph_flags_sys2wire(flags) <<
" = " << r << " (" << fhptr << ")" << dendl;
return r;
ino = inode->ino;
}
- tout(cct) << (unsigned long)*fhp << std::endl;
+ tout(cct) << (uintptr_t)*fhp << std::endl;
tout(cct) << ino << std::endl;
ldout(cct, 8) << "_ll_create " << vparent << " " << name << " 0" << oct <<
mode << dec << " " << ceph_flags_sys2wire(flags) << " = " << r << " (" <<
ldout(cct, 3) << "ll_read " << fh << " " << fh->inode->ino << " " << " " << off << "~" << len << dendl;
tout(cct) << "ll_read" << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
tout(cct) << off << std::endl;
tout(cct) << len << std::endl;
ldout(cct, 3) << "ll_write " << fh << " " << fh->inode->ino << " " << off <<
"~" << len << dendl;
tout(cct) << "ll_write" << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
tout(cct) << off << std::endl;
tout(cct) << len << std::endl;
ldout(cct, 3) << "ll_flush " << fh << " " << fh->inode->ino << " " << dendl;
tout(cct) << "ll_flush" << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return _flush(fh);
ldout(cct, 3) << "ll_fsync " << fh << " " << fh->inode->ino << " " << dendl;
tout(cct) << "ll_fsync" << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
int r = _fsync(fh, syncdataonly);
ldout(cct, 3) << "ll_sync_inode " << *in << " " << dendl;
tout(cct) << "ll_sync_inode" << std::endl;
- tout(cct) << (unsigned long)in << std::endl;
+ tout(cct) << (uintptr_t)in << std::endl;
std::scoped_lock lock(client_lock);
return _fsync(in, syncdataonly);
ldout(cct, 3) << __func__ << " " << fh << " " << fh->inode->ino << " " << dendl;
tout(cct) << __func__ << " " << mode << " " << offset << " " << length << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return _fallocate(fh, mode, offset, length);
ldout(cct, 3) << __func__ << " (fh)" << fh << " " << fh->inode->ino << " " <<
dendl;
tout(cct) << __func__ << " (fh)" << std::endl;
- tout(cct) << (unsigned long)fh << std::endl;
+ tout(cct) << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return -ENOTCONN;
ldout(cct, 3) << "ll_getlk (fh)" << fh << " " << fh->inode->ino << dendl;
- tout(cct) << "ll_getk (fh)" << (unsigned long)fh << std::endl;
+ tout(cct) << "ll_getk (fh)" << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return _getlk(fh, fl, owner);
return -ENOTCONN;
ldout(cct, 3) << __func__ << " (fh) " << fh << " " << fh->inode->ino << dendl;
- tout(cct) << __func__ << " (fh)" << (unsigned long)fh << std::endl;
+ tout(cct) << __func__ << " (fh)" << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return _setlk(fh, fl, owner, sleep);
return -ENOTCONN;
ldout(cct, 3) << __func__ << " (fh) " << fh << " " << fh->inode->ino << dendl;
- tout(cct) << __func__ << " (fh)" << (unsigned long)fh << std::endl;
+ tout(cct) << __func__ << " (fh)" << (uintptr_t)fh << std::endl;
std::scoped_lock lock(client_lock);
return _flock(fh, cmd, owner);