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)
Sun, Nov 17, 8:50 AM
Unknown Object (File)
Thu, Nov 14, 7:16 AM
Unknown Object (File)
Tue, Nov 12, 11:22 PM
Unknown Object (File)
Wed, Oct 30, 10:43 PM
Unknown Object (File)
Sep 26 2024, 4:12 PM
Unknown Object (File)
Sep 5 2024, 9:19 AM
Unknown Object (File)
Sep 5 2024, 4:23 AM
Unknown Object (File)
Aug 21 2024, 1:51 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 Not Applicable
Unit
Tests Not Applicable