Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp627588lqa; Sat, 27 Apr 2024 18:18:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAOIt4Q8bPr+hOQIEr6CpfQHm71+CYKNHQsmunfuxZbgTPyQOrd9S5PINbqKMz8Pwz6MlBLZ7ktiRoWI55y0Q8Bd9SYMsIQGYcA5aE2w== X-Google-Smtp-Source: AGHT+IEG1tXzR5zzcuEXvDEztLEehoyLcHkVBPfO5Jpk0kcxe7+A0XICxpb5KMVGkr/Pop7Gvgqe X-Received: by 2002:a05:6e02:1154:b0:36c:4a89:c56b with SMTP id o20-20020a056e02115400b0036c4a89c56bmr537822ill.18.1714267096220; Sat, 27 Apr 2024 18:18:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714267096; cv=pass; d=google.com; s=arc-20160816; b=S7JOGCUR+kQc1o+f2yRgcWi2C/LcYmmd4JFwyxTPwVlYFpQt9Ihz3qlZ/nZctrPGCl 4LKVsZSOg1+9923hcfZcNR0AO5AsuZ3oBgsPgM3Yh+gQaiK66RmFf+nVCywvEKvinlcf CWqF06yQYwlFUM/txIuzd1PYRpeK939J+7v208KQHcGkCXhij5l+vLQgCirw3QwzRG3f 90jwJPDkMCOSeM+xjvn8zbU1Iac7rfvgqPyz5X5egyZBqxzqyB3Pb4TxHe7OVxIA1VZZ EFx5EEJiWTvo5Z2Dg6CVEfNFNOMw6XbGSzwoxuXadw8yMNJ17AoyZs6e2Orilei0Nadw miPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=BXxvAE4jb4NmLMDJCW8o/zRswMP75gqhLg59Zk222wk=; fh=MOVxEOGanwWCn+Q6Pn+6p3PxVkKSgsTRCkow/8qDkBs=; b=k6yz565nmqRnGh5x8uL5enNTmwMy4+hMMrrh2C0mYDJQnhTNobMoVl5e8/KPWGWXPp z+onD6fxUWHS/zcquSRuPcuodhclqjzYkh5ibLuPtxUg23XD1mk8FPg8WeU2/7YBuwqC UCEY9sBLnctwXTZ08wRuK8ztziniox/qWVl/C9Txldc5YkOQ5OO9lHm48mVPUkvWckdw UTwm7aHgTcFU6r11BIMwDd0HIgz1mGjLsXMg22iSfpBRhXRYlSrc10+kto9BiSe08Aum /gk57cWyc2AmEAnu6Sa8xCCfSdU1o3h2D241QZ+8JePKVh972OA850Kbg4bIt3LTUkJq aTSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bqeBx/6b"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-161210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k70-20020a638449000000b006049b7b6656si8445644pgd.413.2024.04.27.18.18.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 18:18:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bqeBx/6b"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-161210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AE9B6B212EC for ; Sun, 28 Apr 2024 01:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01ECCEDE; Sun, 28 Apr 2024 01:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bqeBx/6b" Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF629EC3 for ; Sun, 28 Apr 2024 01:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714267085; cv=none; b=JIoIMnwVInthzBGnmV9kzJDcO3WukPNzP9kfTwnU4KGWs7iFvg+pmB65E31Z1K7ANTbIjxKGSnPn3ghxvUkJNKOMKNMvOzsWGCgIYkryt5I9TRI42YnV8IhkOQjhrddEL9hc6bXBFAz+me98mfeRGlUqlKSFxO0bRCt5HVfkesA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714267085; c=relaxed/simple; bh=bsGjHWGiuQwbJMxlFQ/Kb90M+1DSE4UTR7NZyFeJ0n4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pBTY6ZI6HnVFYS6UIlvJ8K1sBT8e/HukCsAXiRyxCPFjHgFjCAOsBjuMHUBEt+NnyF0jjCZm9omAl92X3GHzUtnWgSAs9H6SipM9v2NDzCX1H0pF07U/R5JW+IuAK3PzDTUMPVsXenP33xPGQy3Yynj2KDhDaHR0KOm6Cg9f4ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bqeBx/6b; arc=none smtp.client-ip=209.85.222.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f43.google.com with SMTP id a1e0cc1a2514c-7ec609bd752so1108438241.1 for ; Sat, 27 Apr 2024 18:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714267083; x=1714871883; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BXxvAE4jb4NmLMDJCW8o/zRswMP75gqhLg59Zk222wk=; b=bqeBx/6bTfPGSBD0MfypC1XB88kKw3QG+kgxJbgAlZEAL62yjHPpeldKBx7OBbNqE7 dB1eWaTkb6WOlkLx7KC7S6Nkc8BMGy/IwyFLVyvY2OQL2o4vdtvplerbyZaebsoA5/nj v0KJj/gU6Qs+eLyHP6paUJff0rWt3ef+DIsPhwg9EqkCT64PyTBcML1AIm8HbSKK0nBz 1PJFhfjf/RRcHJx24odZWrs9HHtFjEPpGk1LsnIEQoIwvYHuLkCovUpfgGFuXPDG72/B d5MKk6uzQkuiasCkb0kCjvPG909Xv5xQEo9C5guSabZ9cgVQQvtrsoVVlRMhniamNW2/ YvLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714267083; x=1714871883; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BXxvAE4jb4NmLMDJCW8o/zRswMP75gqhLg59Zk222wk=; b=jXkOXuAvLRs4TOXxOKIc7xPZ/JtF6ZSUTbo+99WYZNJLR8n0s1h4XW3NAFENttckIa T2NFGjz4/jr2d4JR976brbSY3GrtgMGIL1xWXwl40w92zPbY3q6OkxR4QXujIIj1cLP+ RxuU4VaroBVvOGPO5wQ/K0a0I47TcmvLuMWPlhaSlAaWeQsy6RJFeOVgvr1dqNgEc2lI 40YgGG3F9ZxgdaEsdKAmMv/dd19LFV228Vt5vWNogRBA3hTA7jiNmj7N6e39BRN2e/5R 3fXDrrHaC6/aw3mDytj+NNPQxd62ZduOtm+dUbIxFnSIeHJmnexXO/u3SLgtPWOlzAA/ gikA== X-Forwarded-Encrypted: i=1; AJvYcCWPbhENlWl8zvAQCX+PNZQr8Qr3mbEf83FskHSyTfyruLVNEwVyyQwbQAki9uZyWsrzRu8ndAHoJE7NugEmRhMMDp90aAR4BX4OOQeB X-Gm-Message-State: AOJu0Yw5GaGIFJv/G2LGPMNHFX8jYqEHJkPDpZTpGhOKizqT0KNivD3/ mtqoNQOyxoenf7aner1QJQty+VvPRP0f/0F5XIrj8mvitcuN/R0fbHmwesa0/ndsaE47IKSvAyk HNu5cZ3ODoGSe3wprQs2xiWz/wX/SNRh0 X-Received: by 2002:a05:6102:c8e:b0:47c:f0b:5347 with SMTP id f14-20020a0561020c8e00b0047c0f0b5347mr8739370vst.16.1714267082779; Sat, 27 Apr 2024 18:18:02 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240428011236.1008917-1-chao@kernel.org> In-Reply-To: <20240428011236.1008917-1-chao@kernel.org> From: Daeho Jeong Date: Sat, 27 Apr 2024 18:17:51 -0700 Message-ID: Subject: Re: [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Apr 27, 2024 at 6:12=E2=80=AFPM Chao Yu wrote: > > Otherwise, it breaks pinfile's sematics. > > Cc: Daeho Jeong > Signed-off-by: Chao Yu > --- > v2: > - fix to disallow OPU on pinfile no matter what device type f2fs uses. > fs/f2fs/data.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index d8e4434e8801..56600dd43834 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -1595,8 +1595,9 @@ int f2fs_map_blocks(struct inode *inode, struct f2f= s_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 =3D=3D F2FS_GET_BLOCK= _DIO))) { > + if (map->m_may_create && (is_hole || > + (flag =3D=3D F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) && > + !f2fs_is_pinned_file(inode)))) { > if (unlikely(f2fs_cp_error(sbi))) { > err =3D -EIO; > goto sync_out; > -- > 2.40.1 > Reviewed-by: Daeho Jeong Thanks,