Do not ignore nfs_do_fsync result

This commit is contained in:
Vitaliy Filippov
2026-05-30 15:58:46 +03:00
parent 5576a0d9ff
commit 1a511acead
+7
View File
@@ -338,6 +338,7 @@ static void nfs_do_fsync(nfs_kv_write_state *st, int state)
op->opcode = OSD_OP_SYNC; op->opcode = OSD_OP_SYNC;
op->callback = [st, state](cluster_op_t *op) op->callback = [st, state](cluster_op_t *op)
{ {
st->res = op->retval;
delete op; delete op;
nfs_kv_continue_write(st, state); nfs_kv_continue_write(st, state);
}; };
@@ -904,6 +905,12 @@ resume_7:
return; return;
} }
resume_8: resume_8:
if (st->res < 0)
{
auto cb = std::move(st->cb);
cb(st->res);
return;
}
// We always have to change inode entry on shared writes // We always have to change inode entry on shared writes
st->proxy->kvfs->write_inode(st->ino, new_shared_ientry(st), true, [st](int res) st->proxy->kvfs->write_inode(st->ino, new_shared_ientry(st), true, [st](int res)
{ {