Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4166658pxu; Mon, 30 Nov 2020 20:15:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYtXQzZ+qRAckJj5xpSDQxMWdebCfT2ogst3Zo4Jfe7N+b1puiegECxJHfTHhQ20aLPGH3 X-Received: by 2002:a50:fc11:: with SMTP id i17mr1168424edr.112.1606796137233; Mon, 30 Nov 2020 20:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606796137; cv=none; d=google.com; s=arc-20160816; b=qp17ULGO9M0lS0/2azJwIvjuLAmK9eRFOaP63QZj9sJjJ4L1MtkABXzo4131YQnHHx 3dGTXlesiqpfS1WklMHKJriHZowazBRCm4Bp4rRWCDgqwUaeiqRQnyUdT23sAeAkCliS HXR/aQL5Hi2XabYwUId2GKsavxkFHYdwKYLWjFF+cAMNYvw4rc2KPiZUDgPPY7Ixv1/n P+YdadO9y3/MZFISXAuXvg9HuJHgYLprQ9R5YRaeDeyq+qvlMLmfk6aroh24j6OiNmBx Hwm+2EDyWkqGeBhBT9OFoGPY8VOuqOEKDa68wEjejAnYFQF0DC/cjafnwaQ6x291xfSp ddHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I5NGBCYlQHyFj322eEmEf7IPRCi8siqfkuaC0jt39Ig=; b=VYl2jgf7VTlzewy1eANS8zW2uwJ20veWMs/4KiFuov58SGjsBmf8xG894brrhCB1wj fBIhVBOHZQHxV94kG4znN2P0/d23CgsjLysGl6MyC2yx68+m8EE5KMAY7+CI5wm/csIG olcJzXHZ+qWnHMX/wuUh49mqHvMbLufp/SjL+PYKX2Ft11S1oAZAvxVplbdUDDv4QqAU KE6WxYEA1wvY5rENvXp/coInUCC0l7Ody+MkQnr/OZgSaNMRPGot7/B2818CN/nGpa01 hLovk7CtUSMSXpG2NjdaqpTd9F06h6XGIJ24SkluVkZEB7IMqGFAVSqZn53f0YJBc9d+ +CcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yW0yy1dU; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si214338ejb.73.2020.11.30.20.15.14; Mon, 30 Nov 2020 20:15:37 -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=@kernel.org header.s=default header.b=yW0yy1dU; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728118AbgLAEKR (ORCPT + 99 others); Mon, 30 Nov 2020 23:10:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:59528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbgLAEKR (ORCPT ); Mon, 30 Nov 2020 23:10:17 -0500 Received: from google.com (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D236920796; Tue, 1 Dec 2020 04:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606795777; bh=IDSdg+guasLBTGEvPlqfaxTayjeUYhY516Z8N9vIwFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yW0yy1dUB3OUyKbX0TGGC6bn4IixF3TN4vPNqoRlbzJ147/dyQs91/q/qwAza0c2Z cU5Wf2QutdXkdWMYyAftvxdWP+vEfBgCIWsbP/XkVeTze9QwEvI7eJtIheAOdMZbZv KIxj7MQigS30NaeDTbg8OG8fY5Ie7buw4kWimqFM= Date: Mon, 30 Nov 2020 20:09:35 -0800 From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, kernel-team@android.com Cc: Linux F2FS Dev Mailing List Subject: Re: [PATCH 3/4] f2fs: fix wrong block count instead of bytes Message-ID: <20201201040935.GC3858797@google.com> References: <20201126022416.3068426-1-jaegeuk@kernel.org> <20201126022416.3068426-3-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201126022416.3068426-3-jaegeuk@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25, Jaegeuk Kim wrote: > We should convert cur_lblock, a block count, to bytes for len. > > Signed-off-by: Jaegeuk Kim > --- > 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 a84e5bc09337..e49c14ccfafe 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -3893,7 +3893,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, > sector_t highest_pblock = 0; > int nr_extents = 0; > unsigned long nr_pblocks; > - unsigned long len; > + u64 len; > int ret; > > /* > @@ -3911,7 +3911,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, > cond_resched(); > > memset(&map_bh, 0, sizeof(struct buffer_head)); > - map_bh.b_size = len - cur_lblock; > + map_bh.b_size = len - blks_to_bytes(inode, cur_lblock); > > ret = get_data_block(inode, cur_lblock, &map_bh, 0, > F2FS_GET_BLOCK_FIEMAP, &next_pgofs); > -- > 2.29.2.454.gaff20da3a2-goog