From patchwork Wed Mar 14 15:50:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10282553 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12CD7602C2 for ; Wed, 14 Mar 2018 15:50:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1C04281E1 for ; Wed, 14 Mar 2018 15:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E66FF2823E; Wed, 14 Mar 2018 15:50:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D94E28249 for ; Wed, 14 Mar 2018 15:50:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbeCNPuH (ORCPT ); Wed, 14 Mar 2018 11:50:07 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:45798 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbeCNPuE (ORCPT ); Wed, 14 Mar 2018 11:50:04 -0400 Received: by mail-oi0-f45.google.com with SMTP id j79so3063699oib.12 for ; Wed, 14 Mar 2018 08:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=ajlWukfUZBEG5D0ESNrKwecmImuVF0LzYivMapEuudI=; b=Hg6iRCA28CuM4dEkb6EDzyUSKxKrrmeYeYicXbKTXrc/VgRG/LlDq0IV5ATCTe+DBY CaMsH/9y6JyRKABeI5Xasq7d4glNWV7KJyqQlKJbQdPIdk7LvW6IEjYBI4djA+1QY8Wa 4+Pkdk4V69fplGyOi/HWGfECukKO3z7eW7t8Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=ajlWukfUZBEG5D0ESNrKwecmImuVF0LzYivMapEuudI=; b=aKABSmpTdTX6o/fo0sp0imZheY1LNzySJjzQk7f5syShPKZUm7XIDTkcdzwnHdYOGi 7V30LWHnoGw13kSIFiK9mPtL+kwmlRmJ2RqThr/MwlT74PS1yXE3T6IsagzKxk4x9K9h 5EYWosLLLAuSXH4AOtf1GTXGxm5XD7GurJzbBhOPC/m9Nrsg8YXeqdgJ64d6Z0H+7gz9 VZ2tKsW07uNU7D5TSh5dzMIV8696jgso5EJoA3d9khm9+8k3WDtp6SNR6MpXl05Eqip/ TF3nU6mGH49mNE9tbfOTGWlWxfWpyW4dWhr/X5kZt4zPDCXZ2+Z7wDvRhcKQcdLv0OLT tPiw== X-Gm-Message-State: AElRT7FoFX/S/jOr5EHJi1bfC4jz1Oup/kBCyA2hr9DtDBWPZ37hffXO f3755ypaE0G+C89rbi4D1dydhjIJvEcOKjqzxlnOJw== X-Google-Smtp-Source: AG47ELtWzRgfuHnW45zdEz3aH9B7eeUZ9RdCggUSIycMMUJMb9p8rjOyHMU/3Ft7E9bFpvW0X+URghOMwbRc3u3AEL0= X-Received: by 10.202.245.214 with SMTP id t205mr3213735oih.13.1521042603489; Wed, 14 Mar 2018 08:50:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:5403:0:0:0:0:0 with HTTP; Wed, 14 Mar 2018 08:50:02 -0700 (PDT) X-Originating-IP: [176.63.54.97] From: Miklos Szeredi Date: Wed, 14 Mar 2018 16:50:02 +0100 Message-ID: Subject: generic/127 failure on xfs with hacked fsx To: "Darrick J . Wong" Cc: linux-xfs , linux-fsdevel@vger.kernel.org, fstests Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While testing overlayfs I found something which appears to be an unwanted side effect of xfs_release(). Apply the attached patch to xfstests and run generic/127. Result is: +ltp/fsx -q -l 262144 -o 65536 -S 191110531 -N 100000 fsx_std_mmap +Mapped Read: non-zero data past EOF (0x8aa1) page offset 0xaa2 is 0xa091 +LOG DUMP (70315 total operations): Thanks, Miklos --- ltp/fsx.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -647,6 +647,14 @@ check_trunc_hack(void) } } +static void openclose(int fd) +{ + char path[32]; + + sprintf(path, "/proc/self/fd/%i", fd); + close(open(path, O_RDONLY)); +} + void doflush(unsigned offset, unsigned size) { @@ -799,6 +807,7 @@ domapread(unsigned offset, unsigned size prterr("domapread: mmap"); report_failure(190); } + openclose(fd); memcpy(temp_buf, p + pg_offset, size); check_eofpage("Read", offset, p, size);