K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2021-12-25T00:43:13.755861Z K 7 svn:log V 1020 nfscl: Fix must_commit/writeverf handling for Direct I/O Without this patch, the KASSERT(must_commit == 0,..) can be triggered by the writeverf in the Direct I/O write reply changing. This is not a situation that should cause a panic(). Correct handling is to ignore the change in "writeverf" for Direct I/O, since it is done with NFSWRITE_FILESYNC. This patch modifies the semantics of the "must_commit" argument slightly, allowing an initial value of 2 to indicate that a change in "writeverf" should be ignored. It also fixes the KASSERT()s. This bug would affect few, since Direct I/O is not enabled by default and "writeverf" rarely changes. Normally "writeverf" only changes when a NFS server reboots, however I found the bug when testing against a Linux 5.15.1 kernel nfsd, which replied to a NFSWRITE_FILESYNC write with a "writeverf" of all 0x0 bytes. (cherry picked from commit ead50c94cb604594987e6512289268891a427725) Git Hash: e23b97688d63599fef5617d48ec61ed9d883be29 Git Author: rmacklem@FreeBSD.org END