Author: smh
Date: Thu Sep 17 00:03:55 2015
New Revision: 287886
URL: https://svnweb.freebsd.org/changeset/base/287886

Log:
  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

Modified:
  head/sys/sys/vnode.h

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h        Wed Sep 16 23:59:53 2015        (r287885)
+++ head/sys/sys/vnode.h        Thu Sep 17 00:03:55 2015        (r287886)
@@ -797,7 +797,8 @@ void        vop_rename_fail(struct vop_rename_a
 
 #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_a
                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)                                                
\
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to