Merge pull request #8925 from ukernel/wip-15723

client: fstat should take CEPH_STAT_CAP_INODE_ALL

Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2016-06-03 11:50:55 +01:00
commit 5de0b6fb7b
2 changed files with 4 additions and 4 deletions

View File

@ -8656,16 +8656,16 @@ int Client::_fsync(Fh *f, bool syncdataonly)
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);

View File

@ -974,7 +974,7 @@ public:
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