Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1090044ybt; Wed, 17 Jun 2020 23:38:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu02rJ1n60fBXvCaeebmtwl4IAUMFraLyUz90WLv6EguAh9ZodJsTdWGjmTHe+vUBfsPXZ X-Received: by 2002:a17:906:6453:: with SMTP id l19mr2491908ejn.262.1592462335387; Wed, 17 Jun 2020 23:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592462335; cv=none; d=google.com; s=arc-20160816; b=YLniE3AU57gTOn6NfejC4GQxYl3ZBPusSt49dWUjkD027acShxE+jLC+95o3hb4Rlz Y4T+WIL2BItRjnQcRHAlRTaSG878aiuzeZ5GxTOVHlVFN9pXizd6Qy5/UD97ZhB3ggr/ c8idThLgqbSrlw/p98pa3Vfa37OIZKTCAgkYs9lVs10NcfV40kIGfcWWdiojcOf0ktK7 pFl6vgndUYKKSzIY7JHXh3JI0OjQn8BA0qTzqQt5wQRc4LGSed/iwBFXfQhloDiYgJxN iw/OHa1DI5/CHjgz4zWtlpDmRV85GLk7JQJ7TjMqJG8+vq8Rep3QoleZKh0SfFgjRBtL yTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=lDsLK3eBtNQa7PWaMtgPbYDXZFpi+T5x/0jBmaQpX6k=; b=y8azSpmg7I+NKLf3v56SQpxrVMJOKbOKNyc3OCpMvBVGWVIxuEqNMkgBeYj664z6D1 mujdtbwJm0X1IdTkW980oO8bqvoa4X1oIPbw2f/XstMis0QMSv9bpYBw6ute2zss5JSm +cm+/indGEDE/UyPV9S1fbydW5fDysL7WVQIX553kj2lkVHCpdGFkh/mcFi5x50LboR+ btd+GLaDTro5TDU+z+dRKnkPSRJpcSTmAgq0WHeulM8cGZWV8+3qUepCZz0dmJN0cRRg KV8/ZLaGn1KwIG0J7Ep+dK60kgjkxfF2qBPJgerF7Zx5s5MJwH8E7yozQy+gKWUKGeKt vetw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si1316709edw.362.2020.06.17.23.38.30; Wed, 17 Jun 2020 23:38:55 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727858AbgFRGgo (ORCPT + 99 others); Thu, 18 Jun 2020 02:36:44 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6361 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727115AbgFRGgn (ORCPT ); Thu, 18 Jun 2020 02:36:43 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 839A2A6925E4F01565F6; Thu, 18 Jun 2020 14:36:40 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 18 Jun 2020 14:36:32 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH 4/5] f2fs: clean up parameter of f2fs_allocate_data_block() Date: Thu, 18 Jun 2020 14:36:24 +0800 Message-ID: <20200618063625.110273-4-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 In-Reply-To: <20200618063625.110273-1-yuchao0@huawei.com> References: <20200618063625.110273-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use validation of @fio to inidcate whether caller want to serialize IOs in io.io_list or not, then @add_list will be redundant, remove it. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/gc.c | 2 +- fs/f2fs/segment.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index cbdf062d3562..dfd322515357 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1366,7 +1366,7 @@ static int __allocate_data_block(struct dnode_of_data *dn, int seg_type) set_summary(&sum, dn->nid, dn->ofs_in_node, ni.version); old_blkaddr = dn->data_blkaddr; f2fs_allocate_data_block(sbi, NULL, old_blkaddr, &dn->data_blkaddr, - &sum, seg_type, NULL, false); + &sum, seg_type, NULL); if (GET_SEGNO(sbi, old_blkaddr) != NULL_SEGNO) invalidate_mapping_pages(META_MAPPING(sbi), old_blkaddr, old_blkaddr); diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b74f0f5fcf3a..72a667f1d678 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3350,7 +3350,7 @@ void f2fs_replace_block(struct f2fs_sb_info *sbi, struct dnode_of_data *dn, void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page, block_t old_blkaddr, block_t *new_blkaddr, struct f2fs_summary *sum, int type, - struct f2fs_io_info *fio, bool add_list); + struct f2fs_io_info *fio); void f2fs_wait_on_page_writeback(struct page *page, enum page_type type, bool ordered, bool locked); void f2fs_wait_on_block_writeback(struct inode *inode, block_t blkaddr); diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 3d27b939627e..bfc4eb2d8038 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -859,7 +859,7 @@ static int move_data_block(struct inode *inode, block_t bidx, } f2fs_allocate_data_block(fio.sbi, NULL, fio.old_blkaddr, &newaddr, - &sum, CURSEG_COLD_DATA, NULL, false); + &sum, CURSEG_COLD_DATA, NULL); fio.encrypted_page = f2fs_pagecache_get_page(META_MAPPING(fio.sbi), newaddr, FGP_LOCK | FGP_CREAT, GFP_NOFS); diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index cb861ed98ee3..113114f98087 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -3089,7 +3089,7 @@ static int __get_segment_type(struct f2fs_io_info *fio) void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page, block_t old_blkaddr, block_t *new_blkaddr, struct f2fs_summary *sum, int type, - struct f2fs_io_info *fio, bool add_list) + struct f2fs_io_info *fio) { struct sit_info *sit_i = SIT_I(sbi); struct curseg_info *curseg = CURSEG_I(sbi, type); @@ -3157,7 +3157,7 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page, if (F2FS_IO_ALIGNED(sbi)) fio->retry = false; - if (add_list) { + if (fio) { struct f2fs_bio_info *io; INIT_LIST_HEAD(&fio->list); @@ -3206,7 +3206,7 @@ static void do_write_page(struct f2fs_summary *sum, struct f2fs_io_info *fio) down_read(&fio->sbi->io_order_lock); reallocate: f2fs_allocate_data_block(fio->sbi, fio->page, fio->old_blkaddr, - &fio->new_blkaddr, sum, type, fio, true); + &fio->new_blkaddr, sum, type, fio); if (GET_SEGNO(fio->sbi, fio->old_blkaddr) != NULL_SEGNO) invalidate_mapping_pages(META_MAPPING(fio->sbi), fio->old_blkaddr, fio->old_blkaddr); -- 2.18.0.rc1