Fix kqueue write events for files > 2GB
Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) macros, kqueue write events for files greater 2GB where never fired. This caused tail -f on a file greater 2GB to never see updates. MFC after: 1 week Relnotes: YES Sponsored by: Multiplay
This commit is contained in:
parent
5ac0efdba9
commit
412ce2744c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287886
@ -797,7 +797,8 @@ void vop_rename_fail(struct vop_rename_args *ap);
|
||||
|
||||
#define VOP_WRITE_PRE(ap) \
|
||||
struct vattr va; \
|
||||
int error, osize, ooffset, noffset; \
|
||||
int error; \
|
||||
off_t osize, ooffset, noffset; \
|
||||
\
|
||||
osize = ooffset = noffset = 0; \
|
||||
if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \
|
||||
@ -805,7 +806,7 @@ void vop_rename_fail(struct vop_rename_args *ap);
|
||||
if (error) \
|
||||
return (error); \
|
||||
ooffset = (ap)->a_uio->uio_offset; \
|
||||
osize = va.va_size; \
|
||||
osize = (off_t)va.va_size; \
|
||||
}
|
||||
|
||||
#define VOP_WRITE_POST(ap, ret) \
|
||||
|
Loading…
Reference in New Issue
Block a user