Auto-commit fuse.cpp

This commit is contained in:
Antonio SJ Musumeci 2026-04-13 18:55:56 -05:00
parent d5a2187713
commit 02da8efbff
37 changed files with 374 additions and 267 deletions

View file

@ -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_,