Skip to content

Sync not called during OS Flush or O_DIRECT? #14

@benduncan

Description

@benduncan

@pojntfx and team, great work on Go-NBD!

I'm playing around with an implementation, however notice a bug that I do not receive Sync() events from my backend after an OS disk flush/sync.

func (b *VblockBackend) Sync() error {
slog.Info("Sync event fired")
...
}

If using

dd if=/dev/nbd3 of=/dev/null bs=32K iflag=direct

Or copying/editing files on the mounted /dev/nbd* block device and running sync, this is not triggered in the go-nbd server by calling my plugins Sync() function.

Suggestions?

I'm using Ubuntu 25.04 and go version go1.24.3 linux/arm64 and mounting with nbd-client (nbd 3.26.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions