return _fsync(f->inode.get(), syncdataonly);
}
-int Client::fstat(int fd, struct stat *stbuf)
+int Client::fstat(int fd, struct stat *stbuf, int mask)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fstat" << std::endl;
+ tout(cct) << "fstat mask " << hex << mask << std::endl;
tout(cct) << fd << std::endl;
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
- int r = _getattr(f->inode, -1);
+ int r = _getattr(f->inode, mask);
if (r < 0)
return r;
fill_stat(f->inode, stbuf, NULL);
int fake_write_size(int fd, loff_t size);
int ftruncate(int fd, loff_t size);
int fsync(int fd, bool syncdataonly);
- int fstat(int fd, struct stat *stbuf);
+ int fstat(int fd, struct stat *stbuf, int mask=CEPH_STAT_CAP_INODE_ALL);
int fallocate(int fd, int mode, loff_t offset, loff_t length);
// full path xattr ops