Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp86754pxu; Thu, 3 Dec 2020 20:35:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIDfpQDavUClS2kagMhZpjXjk1RYfKbztvtpZiI5Z1i2ZiyzOxcGuQtHc1ikKW9VeXApYN X-Received: by 2002:a17:907:6ea:: with SMTP id yh10mr5564826ejb.29.1607056527846; Thu, 03 Dec 2020 20:35:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607056527; cv=none; d=google.com; s=arc-20160816; b=E6gl/23CVcFMOokPzPDCKRCIjPP6UxL2A/B6CMlmTD/mRfsUjhCaTbsqS8/GstKphX NwYFOE7+vS17MZUFxGv/F4NKNS3nZ49TF7Zpp7JFlaHyxnw+HEdqHTWcCw42huFfEfNJ c8p5clylBNcZyW8n8bhGJphdbVTQ8JB3iw2OPHGFe2BqC0CJ390ebfdiXI+8vA/628lg TbxjMn1D8EkN36WBTN0iwMpfzg/PaYXglv17L5WCshgUb/xxQ4+tQGOUANkRpiZecR4C zEAB7bEFLOLGaQJD3o1mI9d0tl/wJFy9hTMSJrUHUbpDg9F1gaLizSPlhWuaR9rCKtzV PP5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ktrYpX+PX9gYP19cphCNlBkQ//YDNX4xO30NBDFiHic=; b=eFeVyv8ePK4vI/4bAoj6/pdEsOVIwpZWlaQGcBORtxtwTF7g1+Gp05ltHu27xsRRCS Nw3xs1Nnf14+einw9IW4vhtDwfgW7ro0pe2wx+fIVuXykYoYXr5LlkW6Hw6NCaKeN6Gi pni8G30yWDGwMGxGGomH9pLpbXZ+cAnFQh3IG0E5zvkQAcBqssLHWKdRYdFU0FnHbHDQ 7f7BcYKrsaaUlAJdGt8rUC0tX8EUpiKfMV7bDcXuVVudyqfZmhBGgRnBwXqzteqxgrw1 osZ5bAfzce0BsCzzdy0ZwkKXI1B/qz4GUwTRW0r9hljkQCBvkxEhCjqDltovXN5DgH0K I1iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G+K4k+QR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp24si685162ejc.590.2020.12.03.20.35.04; Thu, 03 Dec 2020 20:35:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G+K4k+QR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726299AbgLDEbz (ORCPT + 99 others); Thu, 3 Dec 2020 23:31:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgLDEbz (ORCPT ); Thu, 3 Dec 2020 23:31:55 -0500 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40068C061A4F for ; Thu, 3 Dec 2020 20:31:15 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id r18so5131176ljc.2 for ; Thu, 03 Dec 2020 20:31:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ktrYpX+PX9gYP19cphCNlBkQ//YDNX4xO30NBDFiHic=; b=G+K4k+QRVIcqBpiniR98E2i04SzytSueXbyUbePP/tzHYCXScQCtfOpD3FDqFJIiNa PaoWl/uOeCcNnk0pzfJvb3Gp9mILali+q4Od8QR+b4sPnbNOfFY03zgZWy8UN04Ll8Gs 7kAoYZcrP7ADjMszw1JNB8nmnPbO7MXNqXanNDVaN3QGHseaeVPnPu0d8070o3xxLA0B Ekf8dIiwINEAir7R6QWCPpPvI19pXTfaCOLC1OmUWASv6vUBTBZ6JoitLkgObFdHYx5u NHeNrOm/d9nyXA3+CY2Q4cw/AG4FaDj0Cwt8kT2wt79a+Dd/ZQZFSqlgTzWMEVZTn1Nm 7Rlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ktrYpX+PX9gYP19cphCNlBkQ//YDNX4xO30NBDFiHic=; b=KOO8nQJXRORGJzOB5RC+fockMVfnshaNBG6sS2vqhSqrgisuwEwnVG5KUXmn0UiKM4 +PvERZxv6RKN31z9KEfJNyqJ4xbqT1oaIEfgtnihheJBGo9MEoR+eglcIohA608maLWx KLP4xIwTPP4KpXiua97Jm3/OtjamB86WhLAwOBoAsukqK7VQ8nO/sForvuQr+F1s3Q+U n37236aKyl+TXQCIgeq5J1O+32fxVyeE8awD+Yl3CwqC6vlNhF79c0J2lXkzvlJWSMXx 0TSWSiZODeuno9vQww8mKGZK169j/k/ExWvVlTmsQp0dQXXbaf+S3LS6iqYnLoN1t4Yc SYzw== X-Gm-Message-State: AOAM533Sje37BaQRapkbU4CkJP11eke90Trxgo9/IYmfNBTNLp58Hz4r ypwqB74MUVIfO30s2MTjDz1FMrn1zycXOGcyH0M= X-Received: by 2002:a2e:9654:: with SMTP id z20mr2505992ljh.335.1607056273762; Thu, 03 Dec 2020 20:31:13 -0800 (PST) MIME-Version: 1.0 References: <20201204005847.654074-1-daeho43@gmail.com> In-Reply-To: From: Daeho Jeong Date: Fri, 4 Dec 2020 13:31:02 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression To: Eric Biggers Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Are you sure? I thought that compression (and encryption) apply to the whole > file, including any Merkle tree blocks past i_size. This "dic" structure is only for "de"compression, so we don't need to worry about going beyond i_size case. > Also, even if you include the i_size check, it's still wrong to check > fsverity_active() in the middle of the I/O because FS_IOC_ENABLE_VERITY can > execute concurrently, causing fsverity_active() to return false at the beginning > of the I/O and true later in the I/O. It needs to be checked only once, at the > beginning... Got it. Our previous implementation didn't consider this case. Need to fix this. Thanks,