mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
statvfs in client, as per newer fuse api
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1076 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
a73bbfac36
commit
133ed04ecd
@ -21,9 +21,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef DARWIN
|
||||
#include <sys/statvfs.h>
|
||||
#endif // DARWIN
|
||||
|
||||
|
||||
#include <iostream>
|
||||
@ -2529,7 +2527,6 @@ int Client::chdir(const char *path)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DARWIN
|
||||
int Client::statfs(const char *path, struct statvfs *stbuf)
|
||||
{
|
||||
bzero (stbuf, sizeof (struct statvfs));
|
||||
@ -2546,13 +2543,6 @@ int Client::statfs(const char *path, struct statvfs *stbuf)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int Client::statfs(const char *path, struct statfs *stbuf)
|
||||
{
|
||||
assert(0); // implement me
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int Client::lazyio_propogate(int fd, off_t offset, size_t count)
|
||||
|
@ -523,11 +523,7 @@ protected:
|
||||
int unmount();
|
||||
|
||||
// these shoud (more or less) mirror the actual system calls.
|
||||
#ifdef DARWIN
|
||||
int statfs(const char *path, struct statvfs *stbuf);
|
||||
#else
|
||||
int statfs(const char *path, struct statfs *stbuf);
|
||||
#endif
|
||||
|
||||
// crap
|
||||
int chdir(const char *s);
|
||||
|
@ -36,11 +36,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#ifdef DARWIN
|
||||
#include <sys/statvfs.h>
|
||||
#else
|
||||
#include <sys/statfs.h>
|
||||
#endif // DARWIN
|
||||
|
||||
|
||||
// ceph stuff
|
||||
@ -190,17 +186,10 @@ static int ceph_flush(const char *path, struct fuse_file_info *fi)
|
||||
*/
|
||||
|
||||
|
||||
#ifdef DARWIN
|
||||
static int ceph_statfs(const char *path, struct statvfs *stbuf)
|
||||
{
|
||||
return client->statfs(path, stbuf);
|
||||
}
|
||||
#else
|
||||
static int ceph_statfs(const char *path, struct statfs *stbuf)
|
||||
{
|
||||
return client->statfs(path, stbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user