Page MenuHomeFreeBSD

factor out the code that actually does the truncation from vn_truncate() into vn_truncate_locked()
ClosedPublic

Authored by rmacklem on Jun 30 2019, 12:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 6:42 AM
Unknown Object (File)
Tue, Jul 7, 12:02 PM
Unknown Object (File)
Sat, Jul 4, 6:39 PM
Unknown Object (File)
Sat, Jun 27, 12:58 AM
Unknown Object (File)
Sat, Jun 27, 12:58 AM
Unknown Object (File)
Thu, Jun 25, 11:36 PM
Unknown Object (File)
Thu, Jun 25, 7:23 AM
Unknown Object (File)
Jun 22 2026, 9:56 PM
Subscribers

Details

Summary

This patch factors out the code that actually does the truncation from vn_truncate() into vn_truncate_locked().
This will allow vn_truncate_locked() to be called within the NFS server and by D20584 for the copy_file_range(2) syscall,
instead of needing to carry across any changes (such as the recent r347151) made to vn_truncate() over to the NFS
server code (and copy_file_range(2) when added to head.

There should be no semantic change to vn_truncate().

Test Plan

Tested using a program that calls the truncate(2) syscall and a program I use to test copy_file_range(2) for a
sparse file.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 25128