mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Add readdir policies
This commit is contained in:
parent
d817fa4e97
commit
c92a10021e
22 changed files with 1077 additions and 172 deletions
|
|
@ -16,13 +16,7 @@
|
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "fuse_readdir_plus_linux.hpp"
|
||||
#include "fuse_readdir_plus_posix.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
#include "dirinfo.hpp"
|
||||
#include "rwlock.hpp"
|
||||
#include "ugid.hpp"
|
||||
#include "errno.hpp"
|
||||
|
||||
#include "fuse.h"
|
||||
|
||||
|
|
@ -33,26 +27,6 @@ namespace FUSE
|
|||
readdir_plus(const fuse_file_info_t *ffi_,
|
||||
fuse_dirents_t *buf_)
|
||||
{
|
||||
Config::Read cfg;
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const ugid::Set ugid(fc->uid,fc->gid);
|
||||
|
||||
switch(cfg->readdir)
|
||||
{
|
||||
case ReadDir::ENUM::LINUX:
|
||||
return FUSE::readdir_plus_linux(cfg->branches,
|
||||
di->fusepath.c_str(),
|
||||
cfg->cache_entry,
|
||||
cfg->cache_attr,
|
||||
buf_);
|
||||
default:
|
||||
case ReadDir::ENUM::POSIX:
|
||||
return FUSE::readdir_plus_posix(cfg->branches,
|
||||
di->fusepath.c_str(),
|
||||
cfg->cache_entry,
|
||||
cfg->cache_attr,
|
||||
buf_);
|
||||
}
|
||||
return -ENOTSUP;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue