Message ID | 20240226013208.2389246-2-chao@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-80378-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1816202dyb; Sun, 25 Feb 2024 17:32:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVe5n/1y+XZLgXZpiVeLr5lnCp06HFMeP0Ox2jIaX+90fChtdo2ujvoqGDBlGrdSb7nlGqQPAPo/dwvXL4aVjothKlLCw== X-Google-Smtp-Source: AGHT+IGMdYm6gwy/h6S0gNzN0yJOOpfJEMueoU5QTHKVHfAwYfeqksIDG3ttYoyguE1OcmlYoB30 X-Received: by 2002:a05:622a:347:b0:42e:32d5:dd17 with SMTP id r7-20020a05622a034700b0042e32d5dd17mr7854027qtw.24.1708911164707; Sun, 25 Feb 2024 17:32:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708911164; cv=pass; d=google.com; s=arc-20160816; b=tkAdJ7dSA8EFRmVWtA0qG8SNFUH0CLIXaz8W/TgSTjyQOnSBPIdeqkdGXWoWhKlL9F 9072IjMH/NKh+peggsl44fhGR3u159bJU65V8KEH+QEV/uYNbTQXR0ehP/5EgS0F47UC EbuMBdYMYKgxpgFjK7RAAWP/zMKEvXBWLVqrjGgch8M2eJZUgqRcr0VJyA/bO9GjtPIN WOJtv3JZxm/uAvWB+nxCWwrLBbYmLtYgINg+jTIp7lxoXejuCnh7ZQDw7c1g97L5mxme TAKI1Ex+uj2/pss/DrcaL8Do65xJZw3POD6pzsaqP7QdOE5yuP2hPHlAVEK9MHDiiciS Y4lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MKYXI1Ap5bdO4ffnGtEFZhoB6Xx2YGZvvZEWMh9zBBU=; fh=X1/oBJvTGJUQ0YtRp03u+3tPfRw/dXXALWynfOSlfQQ=; b=YowwGS6sdAhOow0UltoSnKiL9l9AtZURnKKa7uHPpXOoVXkCbZNziXFjWtR5V1fvtV lVbAxGAMgl5vq7hqMH7tTD0vpQdWs/hPB0nVe+jzBMTDhg58HhwiX5/yuFk9lN4do/yn SEe7RaGu7twooZTbRNygxaTQWZm2cTSM2uB8o0kcj6NQLGHRXq1UI1JH7e2RASCJqBJP NYUAK7L2TP54KG8Z4Uku1MT1peOd68Hp9Pn+YvjJR3E62aPudl6+tbOoU/g5ZxQ35Hw/ 2DjsRme/Elpn31MR3gzPB+5JPifT1kD/D/GpvjVwFk2QO2DBpOVOVEXQookDCmRpaC9L nJbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kba7Cjwy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80378-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80378-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b4-20020ac85404000000b0042e626a8435si4038612qtq.743.2024.02.25.17.32.44 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 17:32:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80378-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kba7Cjwy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80378-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80378-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7BFB81C2125B for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 01:32:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB9D114273; Mon, 26 Feb 2024 01:32:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kba7Cjwy" 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 10FB2D53C for <linux-kernel@vger.kernel.org>; Mon, 26 Feb 2024 01:32:22 +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=1708911142; cv=none; b=qTUEGNAfOT8Wz+nSeSZK4hUzWPH24ynltqww4ba4OJJBrLHYSb1uT/aHfsRIL21SJPd+ygDYwjcq3+Y6V75QnaiGW0RwjgaXttPtdyLX+vc+Nky9NJG2AqfCZO84xddyQc0JxEcVXV7kFVLlFLpdibdBwjJmyGEkz50OX7+FE5g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708911142; c=relaxed/simple; bh=A4yz3LRTSvapt9o8FbzBxwIf+iiKoUhwLj0hcQkJ+Wk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AcOUjMEK+H2z8cLKASBv+XUzRdgany/QCVPUsb17BD5IPB0S5zcWlVgasK2SL2s6G0jnFmfpcHlbll8bfc6S9/8vDXzW5FKwu+UbvLHtVOhNxrA/63hsIVguGKXqADzmPg5uW1RH7EZn5D+fG6DnFdS8AQBmJHWRXnTAaqvI0+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kba7Cjwy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87233C433F1; Mon, 26 Feb 2024 01:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708911141; bh=A4yz3LRTSvapt9o8FbzBxwIf+iiKoUhwLj0hcQkJ+Wk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kba7CjwyvYHZYqaueT48znUox1iICesihe//v1MzldqInj0Axh8uIvIfBjn+h6T/6 TCqvnsiB0U6qFKtp0I7a2S7tBvyRGZoGO0kXG2dw1ERyFzI3+bOctLMqV2Ri/LbDIV XtFDkbFXIpHuv+baKXjHLX/KsG+0uyTmNtt4/2h/FlAAzfaNPqL/HQU7ZgQ5ffPzDv XEp7AniLEMBQsfyArGdqI8+sQy0D7i1NVN9HcLjwmJwIXH2BkdIrModkOfqGQ0b18E 9Zpb4EtqwTcKyakW2QPyKkX9BLFTdkYizPcvgCpU4q8VlRi9K6ZpEmX+X4VYYzcmhA odIiTNwigmV1g== From: Chao Yu <chao@kernel.org> To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu <chao@kernel.org> Subject: [PATCH 2/4] f2fs: relocate f2fs_precache_extents() in f2fs_swap_activate() Date: Mon, 26 Feb 2024 09:32:06 +0800 Message-Id: <20240226013208.2389246-2-chao@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240226013208.2389246-1-chao@kernel.org> References: <20240226013208.2389246-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791923233671106243 X-GMAIL-MSGID: 1791923233671106243 |
Series |
[1/4] f2fs: fix blkofs_end correctly in f2fs_migrate_blocks()
|
|
Commit Message
Chao Yu
Feb. 26, 2024, 1:32 a.m. UTC
This patch exchangs position of f2fs_precache_extents() and
filemap_fdatawrite(), so that f2fs_precache_extents() can load
extent info after physical addresses of all data are fixed.
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Reviewed-by: Daeho Jeong <daehojeong@google.com> Thanks, On Sun, Feb 25, 2024 at 5:33 PM Chao Yu <chao@kernel.org> wrote: > > This patch exchangs position of f2fs_precache_extents() and > filemap_fdatawrite(), so that f2fs_precache_extents() can load > extent info after physical addresses of all data are fixed. > > Signed-off-by: Chao Yu <chao@kernel.org> > --- > fs/f2fs/data.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index 0c728e82d936..bd8674bf1d84 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -4045,12 +4045,12 @@ static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file, > if (!f2fs_disable_compressed_file(inode)) > return -EINVAL; > > - f2fs_precache_extents(inode); > - > ret = filemap_fdatawrite(inode->i_mapping); > if (ret < 0) > return ret; > > + f2fs_precache_extents(inode); > + > ret = check_swap_activate(sis, file, span); > if (ret < 0) > return ret; > -- > 2.40.1 > > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0c728e82d936..bd8674bf1d84 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -4045,12 +4045,12 @@ static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file, if (!f2fs_disable_compressed_file(inode)) return -EINVAL; - f2fs_precache_extents(inode); - ret = filemap_fdatawrite(inode->i_mapping); if (ret < 0) return ret; + f2fs_precache_extents(inode); + ret = check_swap_activate(sis, file, span); if (ret < 0) return ret;