Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp155238lqa; Fri, 26 Apr 2024 18:50:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX90IXcVFJipkRIXuGw30MspSCKI1KYDmwoL9osilHSWCFaX9CqPeuh995VcIWPWqRVFK9ccEx9ktYMwgb9fYI6prZRrdj/dfd7dR7CDg== X-Google-Smtp-Source: AGHT+IHOn9KWLQ1x2nIx6ay6wTb0fDuDSBLLBir1vlmVcYvgXOP3FFohagoy3OuIm5Y4hSQPUXpZ X-Received: by 2002:a05:6808:2a8a:b0:3c8:2c20:718c with SMTP id fc10-20020a0568082a8a00b003c82c20718cmr4318745oib.2.1714182637382; Fri, 26 Apr 2024 18:50:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714182637; cv=pass; d=google.com; s=arc-20160816; b=PvKyk4UhiBqF1AEWVPMuNh0x4RWj8hWb2mry+B5SdqVD+prQ+T8Z4pd110EBFXYvW/ gcvT/aA2WkL6GMewUne74l1Cw15K1zK/hcZADquVNmLesLExOCL0JwCJowFOW6kZQtXl zjbhHsfrWXNd2mrNOVm5k27U9xJcbPwNanKQ951U48ru6mLtDfI+lLPbcS5EH0OZ+sbn 2IIob3SrQjB0HXwYcBT+qw9uzXo2j0Ton6fGiCjYzGyJ+1f+RVXRmWiqZazvKz8//fXp wQOzQp0N8mJ3nzNnXedfN9DZq+/ev8suhwQW7cUIqUPkVc076o+6R6PgjTX0zp4yEXwa MJ5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=QGCWf1fYv9mjyF5sS/AqATkOZV31NgdGbrNbCSRI+OU=; fh=H5v+CjkY1nRWdftDHNboMCIe1nH85PkL3QB3W/+Szvo=; b=lkPrkMhidBGJKMsJ/xTjuCLbVDWrir8/D3spyh7N40CsPeXAcLV8herLrIvJe2qbkR gN6AzsAn3Rfapx+7UwCUDHdb3q97/EeijTs0XoAedHvX986LiJQYOyphY+MpuhmiVm+X R9tVJF26IW81trmMqd9EKOTEb06L+yAF+TKQa3DEAbAkhlmuMyytRUIxh+gs9K/bR98E TOQzotvJxvk8Wxi7av6Cr6qRF5WhUI/JlVJWhWeNNF9x7f9i2T51njRasL2t51xeidQD 0BUg3OdLhzS88ihmlGyIqNzC6F9LHinsxV7Tm01n9OAkNG9j6qaIGL2iASoZZOwMRB/7 5IyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="AVNysz/y"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j63-20020a638b42000000b006043a3b466dsi7562044pge.14.2024.04.26.18.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 18:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="AVNysz/y"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF22628425A for ; Sat, 27 Apr 2024 01:50:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 518B3383AC; Sat, 27 Apr 2024 01:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AVNysz/y" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7023E8488 for ; Sat, 27 Apr 2024 01:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714182631; cv=none; b=bTbx2nluDihX0uO4rMBsXyJ6mg0suCn0Ls5oDhQuXMN/DnlX3PsQfzx1I8T5XnYTdSanp+nChcAEJGStazhsxiRM3NVMth/A6JchiTR38LzAhn5DEWRPUt3jza1BWL7AJg0/gJwrZKmKvOzMZsp/UydQs+YzyHTeqh236lmEINc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714182631; c=relaxed/simple; bh=VjxiUJcsHiSDZaL1ImaAyDNDa7t3ac8l/dqpSVw+d9E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eaPf2xk+anYtHZU9ViNnzV3CLiy5BrtZS7H1bghC6t6bfNnoB0Y2PEEMS9s18wIY5353lqai5S0l/Ns9A8L0iG2P1AS8RnMDd0PD+TsX8ajImG0K6E31LTF0mzptW0Bt+WBGmu0uUwtIavZn/DpDN+6FeQX9+2MTSQ5FgmNv/z4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AVNysz/y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28ED9C113CD; Sat, 27 Apr 2024 01:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714182631; bh=VjxiUJcsHiSDZaL1ImaAyDNDa7t3ac8l/dqpSVw+d9E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AVNysz/yMkWz9NFYvfRhyNXJNzea87BHraWdrjeCJaOac2qqtm/jNz9UIKSA4ykLX OnXFMdTOPSNUmVx99f7C5dlJfitIRCw7qnZJcBpLfUbKefpW36f5dU1W/7XPcDAlZ7 gPbhNql3KkIFIQo9jK1MkdRUnBUdfCU1tOVIaolnWSrzLWD1nsa9z5LDCR+Vw7CUi4 GM33uuMSQ67fU9lnNmcZrodKRaWw2SVOK/mSLDFiv6DxtOmPMpRgkXbKyk2RhU9exY Wpjo/ZKjSxck9RSsWgVS+B8NCRftL1kFAxxuYE9drxgxoTZx/zK+hrAjvvi63EiePN 5zDv0xzAiC7pw== Message-ID: Date: Sat, 27 Apr 2024 09:50:42 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [f2fs-dev] [PATCH] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO To: Zhiguo Niu Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20240426103528.406063-1-chao@kernel.org> Content-Language: en-US From: Chao Yu Autocrypt: addr=chao@kernel.org; keydata= xsFNBFYs6bUBEADJuxYGZRMvAE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/fPK3znFqoqqKmSFZ aiRALjAZH6ufspvYAJEJE9eZSX7Rtdyt30MMHQARAQABwsFfBBgBCgAJBQJWLOm1AhsMAAoJ EKTPgB1/p52GPpoP/2LOn/5KSkGHGmdjzRoQHBTdm2YV1YwgADg52/mU68Wo6viStZqcVEnX 3ALsWeETod3qeBCJ/TR2C6hnsqsALkXMFFJTX8aRi/E4WgBqNvNgAkWGsg5XKB3JUoJmQLqe CGVCT1OSQA/gTEfB8tTZAGFwlw1D3W988CiGnnRb2EEqU4pEuBoQir0sixJzFWybf0jjEi7P pODxw/NCyIf9GNRNYByUTVKnC7C51a3b1gNs10aTUmRfQuu+iM5yST5qMp4ls/yYl5ybr7N1 zSq9iuL13I35csBOn13U5NE67zEb/pCFspZ6ByU4zxChSOTdIJSm4/DEKlqQZhh3FnVHh2Ld eG/Wbc1KVLZYX1NNbXTz7gBlVYe8aGpPNffsEsfNCGsFDGth0tC32zLT+5/r43awmxSJfx2P 5aGkpdszvvyZ4hvcDfZ7U5CBItP/tWXYV0DDl8rCFmhZZw570vlx8AnTiC1v1FzrNfvtuxm3 92Qh98hAj3cMFKtEVbLKJvrc2AO+mQlS7zl1qWblEhpZnXi05S1AoT0gDW2lwe54VfT3ySon 8Klpbp5W4eEoY21tLwuNzgUMxmycfM4GaJWNCncKuMT4qGVQO9SPFs0vgUrdBUC5Pn5ZJ46X mZA0DUz0S8BJtYGI0DUC/jAKhIgy1vAx39y7sAshwu2VILa71tXJ In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/4/26 19:30, Zhiguo Niu wrote: > Dear Chao, > > On Fri, Apr 26, 2024 at 6:37 PM Chao Yu wrote: >> >> Otherwise, it breaks pinfile's sematics. >> >> Cc: Daeho Jeong >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/data.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c >> index bee1e45f76b8..e29000d83d52 100644 >> --- a/fs/f2fs/data.c >> +++ b/fs/f2fs/data.c >> @@ -1596,7 +1596,8 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map, int flag) >> >> /* use out-place-update for direct IO under LFS mode */ >> if (map->m_may_create && >> - (is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) { >> + (is_hole || (flag == F2FS_GET_BLOCK_DIO && (f2fs_lfs_mode(sbi) && >> + (!f2fs_sb_has_blkzoned(sbi) || !f2fs_is_pinned_file(inode)))))) { > Excuse me I a little question, should pin files not be written in OPU > mode regardless of device type(conventional or zone)? Agreed, so it looks we need remove !f2fs_sb_has_blkzoned condition here... Thanks, > thanks! >> if (unlikely(f2fs_cp_error(sbi))) { >> err = -EIO; >> goto sync_out; >> -- >> 2.40.1 >> >> >> >> _______________________________________________ >> Linux-f2fs-devel mailing list >> Linux-f2fs-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel