copy_file_range: truncate write if it would exceed RLIMIT_FSIZE
PR: 266611
MFC after: 2 weeks
Differential D36706
copy_file_range: truncate write if it would exceed RLIMIT_FSIZE asomers on Sep 25 2022, 11:17 PM. Authored by Tags None Referenced Files
Subscribers
Details copy_file_range: truncate write if it would exceed RLIMIT_FSIZE PR: 266611 test case added for fusefs. Manual testing for UFS, ZFS, tmpfs, msdosfs, and nfs.
Diff Detail
Event TimelineComment Actions Use of vn_rlimit_fsizex() requires finishing VOP with vn_rlimit_fsizex_res(). Comment Actions That's only so the caller will see the correct value of uio_resid, right? For VOP_COPY_FILE_RANGE, the caller does not provide a struct uio. Instead, it's only necessary to return the number of bytes copied in *ap->a_lenp , AFAICT.
I could try to fix that one too. Comment Actions Right now yes, but I considered it the current implementation detail. At least please add a comment explaining why _res() is not called, but I consider it fragile. |