mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fuse.cpp
This commit is contained in:
parent
d5a2187713
commit
02da8efbff
37 changed files with 374 additions and 267 deletions
|
|
@ -48,22 +48,10 @@ FUSE::fallocate(const fuse_req_ctx_t *ctx_,
|
|||
off_t offset_,
|
||||
off_t len_)
|
||||
{
|
||||
u64 fh;
|
||||
FileInfo *fi = FileInfo::from_fh(fh_);
|
||||
|
||||
fh = fh_;
|
||||
if(fh == 0)
|
||||
{
|
||||
state.open_files.cvisit(ctx_->nodeid,
|
||||
[&](auto &val_)
|
||||
{
|
||||
fh = val_.second.fi->to_fh();
|
||||
});
|
||||
}
|
||||
|
||||
if(fh == 0)
|
||||
return -ENOENT;
|
||||
|
||||
FileInfo *fi = FileInfo::from_fh(fh);
|
||||
if(not fi)
|
||||
return -EBADF;
|
||||
|
||||
return ::_fallocate(fi->fd,
|
||||
mode_,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue