HomeFreeBSD

Remove incorrect assertion

Description

Remove incorrect assertion

Commit 85703f6 added a new ASSERT to zfs_write() as part of the
cleanup which isn't correct in the case where multiple processes
are concurrently extending a file. The zp->z_size is updated
atomically while holding a range lock on only a portion of the
file. Therefore, it's possible for the file size to increase
after a same check is performed earlier in the loop causing this
ASSERT to fail. The code itself handles this case correctly so
only the invalid ASSERT needs to be removed.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11235

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Nov 24 2020, 5:28 PM
GitHub <noreply@github.com>Committed on Nov 24 2020, 5:28 PM
Parents
rG6f5aac3ca057: Reduce latency effects of non-interactive I/O
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG04a82e043d06: Remove incorrect assertion (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Nov 24 2020, 5:28 PM