ceph_mdsc_send_cap_ack(mdsc, ceph_ino(&ci->vfs_inode),
keep, wanted, seq,
- size, max_size, &mtime, &atime, mds);
+ size, 0, &mtime, &atime, mds);
if (dropping & CEPH_CAP_RDCACHE) {
dout(20, "invalidating pages on %p\n", &ci->vfs_inode);
cap->implemented = newcaps;
/* ack now. re-use incoming message. */
grant->size = le64_to_cpu(inode->i_size);
+ grant->max_size = 0; /* don't re-request */
ceph_encode_timespec(&grant->mtime, &inode->i_mtime);
ceph_encode_timespec(&grant->atime, &inode->i_atime);
reply = 1;
need, want);
spin_lock(&ci->vfs_inode.i_lock);
if (offset >= 0 && offset >= (loff_t)ci->i_max_size) {
- dout(20, "get_cap_refs offset %llu >= max_size %llu\n",
- offset, ci->i_max_size);
+ if (offset > (ci->vfs_inode.i_size << 1)) {
+ dout(20, "get_cap_refs offset %llu >= max_size %llu\n",
+ offset, ci->i_max_size);
+
+ } else
+ dout(20, "get_cap_refs offset %llu >= max_size %llu\n",
+ offset, ci->i_max_size);
goto sorry;
}
have = __ceph_caps_issued(ci);
dout(10, "wtf, i don't have ino %lu=%llx? closing out cap\n",
inot, ino);
ceph_mdsc_send_cap_ack(mdsc, ino, 0, 0, seq,
- size, max_size, 0, 0, mds);
+ size, 0, 0, 0, mds);
return;
}
int i_nr_by_mode[4];
loff_t i_max_size; /* size authorized by mds */
- loff_t i_reported_size; /* size we're reported to mds(s) */
+ loff_t i_reported_size; /* (max_)size reported to or requested of mds */
struct timespec i_old_atime;
/* held references to caps */