# git rev-parse -q --verify 0d74471924f2a01dcd32d154510c0500780b531a^{commit} 0d74471924f2a01dcd32d154510c0500780b531a already have revision, skipping fetch # git checkout -q -f -B kisskb 0d74471924f2a01dcd32d154510c0500780b531a # git clean -qxdf # < git log -1 # commit 0d74471924f2a01dcd32d154510c0500780b531a # Merge: 227747fb9eab 39db9815da48 # Author: Linus Torvalds # Date: Thu May 16 17:18:41 2019 -0700 # # Merge tag 'afs-fixes-b-20190516' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs # # Pull AFS callback promise fixes from David Howells: # "This series fixes a bunch of problems in callback promise handling, # where a callback promise indicates a promise on the part of the server # to notify the client in the event of some sort of change to a file or # volume. In the event of a break, the client has to go and refetch the # client status from the server and discard any cached permission # information as the ACL might have changed. # # The problem in the current code is that changes made by other clients # aren't always noticed, primarily because the file status information # and the callback information aren't updated in the same critical # section, even if these are carried in the same reply from an RPC # operation, and so the AFS_VNODE_CB_PROMISED flag is unreliable. # # Arranging for them to be done in the same critical section during # reply decoding is tricky because of the FS.InlineBulkStatus op - which # has all the statuses in the reply arriving and then all the callbacks, # so they have to be buffered. It simplifies things a lot to move the # critical section out of the decode phase and do it after the RPC # function returns. # # Also new inodes (either newly fetched or newly created) aren't # properly managed against a callback break happening before we get the # local inode up and running. # # Fix this by: # # - There's now a combined file status and callback record (struct # afs_status_cb) to carry both plus some flags. # # - Each operation wrapper function allocates sufficient afs_status_cb # records for all the vnodes it is interested in and passes them into # RPC operations to be filled in from the reply. # # - The FileStatus and CallBack record decoders no longer apply the # new/revised status and callback information to the inode/vnode at # the point of decoding and instead store the information into the # record from (2). # # - afs_vnode_commit_status() then revises the file status, detects # deletion and notes callback information inside of a single critical # section. It also checks the callback break counters and cancels the # callback promise if they changed during the operation. # # [*] Note that "callback break counters" are counters of server # events that cancel one or more callback promises that the client # thinks it has. The client counts the events and compares the # counters before and after an operation to see if the callback # promise it thinks it just got evaporated before it got recorded # under lock. # # - Volume and server callback break counters are passed into # afs_iget() allowing callback breaks concurrent with inode set up to # be detected and the callback promise thence to be cancelled. # # - AFS validation checks are now done under RCU conditions using a # read lock on cb_lock. This requires vnode->cb_interest to be made # RCU safe. # # - If the checks in (6) fail, the callback breaker is then called # under write lock on the cb_lock - but only if the callback break # counter didn't change from the value read before the checks were # made. # # - Results from FS.InlineBulkStatus that correspond to inodes we # currently have in memory are now used to update those inodes' # status and callback information rather than being discarded. This # requires those inodes to be looked up before the RPC op is made and # all their callback break values saved. # # To aid in this, the following changes have also been made: # # - Don't pass the vnode into the reply delivery functions or the # decoders. The vnode shouldn't be altered anywhere in those paths. # The only exception, for the moment, is for the call done hook for # file lock ops that wants access to both the vnode and the call - # this can be fixed at a later time. # # - Get rid of the call->reply[] void* array and replace it with named # and typed members. This avoids confusion since different ops were # mapping different reply[] members to different things. # # - Fix an order-1 kmalloc allocation in afs_do_lookup() and replace it # with kvcalloc(). # # - Always get the reply time. Since callback, lock and fileserver # record expiry times are calculated for several RPCs, make this # mandatory. # # - Call afs_pages_written_back() from the operation wrapper rather # than from the delivery function. # # - Don't store the version and type from a callback promise in a reply # as the information in them is of very limited use" # # * tag 'afs-fixes-b-20190516' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: # afs: Fix application of the results of a inline bulk status fetch # afs: Pass pre-fetch server and volume break counts into afs_iget5_set() # afs: Fix unlink to handle YFS.RemoveFile2 better # afs: Clear AFS_VNODE_CB_PROMISED if we detect callback expiry # afs: Make vnode->cb_interest RCU safe # afs: Split afs_validate() so first part can be used under LOOKUP_RCU # afs: Don't save callback version and type fields # afs: Fix application of status and callback to be under same lock # afs: Always get the reply time # afs: Fix order-1 allocation in afs_do_lookup() # afs: Get rid of afs_call::reply[] # afs: Don't pass the vnode pointer through into the inline bulk status op # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 0d74471924f2a01dcd32d154510c0500780b531a # < make -s -j 8 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig KCONFIG_SEED=0x1CBCA5A6 # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=n # Added to kconfig CONFIG_CPU_LITTLE_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_BOOK3E_64=n # Added to kconfig CONFIG_PPC_BOOK3S_64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # yes \n | make -s -j 8 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 8 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- :1388:2: warning: #warning syscall open_tree not implemented [-Wcpp] :1391:2: warning: #warning syscall move_mount not implemented [-Wcpp] :1394:2: warning: #warning syscall fsopen not implemented [-Wcpp] :1397:2: warning: #warning syscall fsconfig not implemented [-Wcpp] :1400:2: warning: #warning syscall fsmount not implemented [-Wcpp] :1403:2: warning: #warning syscall fspick not implemented [-Wcpp] /kisskb/src/kernel/locking/lockdep.c:2820:13: warning: 'print_lock_trace' defined but not used [-Wunused-function] static void print_lock_trace(struct lock_trace *trace, unsigned int spaces) ^ /kisskb/src/arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid': /kisskb/src/arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) ^ /kisskb/src/arch/powerpc/mm/book3s64/radix_tlb.c:104:2: error: impossible constraint in 'asm' make[4]: *** [/kisskb/src/scripts/Makefile.build:279: arch/powerpc/mm/book3s64/radix_tlb.o] Error 1 make[3]: *** [/kisskb/src/scripts/Makefile.build:489: arch/powerpc/mm/book3s64] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:489: arch/powerpc/mm] Error 2 make[2]: *** Waiting for unfinished jobs.... /kisskb/src/arch/powerpc/kernel/eeh.c:1792:12: warning: 'proc_eeh_show' defined but not used [-Wunused-function] static int proc_eeh_show(struct seq_file *m, void *v) ^ make[1]: *** [/kisskb/src/Makefile:1073: arch/powerpc] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:179: sub-make] Error 2 Command 'make -s -j 8 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 # Build took: 0:01:00.767674