mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
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:
commit
5de0b6fb7b
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user