return _preadv_pwritev(fd, iov, iovcnt, offset, true);
}
-int Client::_preadv_pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset, bool write)
+int Client::_preadv_pwritev(int fd, const struct iovec *iov, unsigned iovcnt, int64_t offset, bool write)
{
Mutex::Locker lock(client_lock);
tout(cct) << fd << std::endl;
return -EBADF;
#endif
loff_t totallen = 0;
- for (int i = 0; i < iovcnt; i++) {
+ for (unsigned i = 0; i < iovcnt; i++) {
totallen += iov[i].iov_len;
}
if (write) {
int r = _read(fh, offset, totallen, &bl);
ldout(cct, 3) << "preadv(" << fd << ", " << offset << ") = " << r << dendl;
int bufoff = 0;
- uint32_t rlen = 0;
- for (int j = 0, resid = r; j < iovcnt && resid > 0; j++) {
+ for (unsigned j = 0, resid = r; j < iovcnt && resid > 0; j++) {
/*
* This piece of code aims to handle the case that bufferlist does not have enough data
* to fill in the iov
int _read(Fh *fh, int64_t offset, uint64_t size, bufferlist *bl);
int _write(Fh *fh, int64_t offset, uint64_t size, const char *buf,
const struct iovec *iov, int iovcnt);
- int _preadv_pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset, bool write);
+ int _preadv_pwritev(int fd, const struct iovec *iov, unsigned iovcnt, int64_t offset, bool write);
int _flush(Fh *fh);
int _fsync(Fh *fh, bool syncdataonly);
int _sync_fs();