linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, kernel-team@android.com
Cc: Linux F2FS Dev Mailing List <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 3/4] f2fs: fix wrong block count instead of bytes
Date: Mon, 30 Nov 2020 20:09:35 -0800	[thread overview]
Message-ID: <20201201040935.GC3858797@google.com> (raw)
In-Reply-To: <20201126022416.3068426-3-jaegeuk@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 <jaegeuk@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 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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2020-12-01  4:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201126022416.3068426-1-jaegeuk@kernel.org>
2020-12-01  4:09 ` [f2fs-dev] [PATCH 1/4] f2fs: rename logical_to_blk and blk_to_logical Jaegeuk Kim
2020-12-01  8:55   ` Chao Yu
     [not found] ` <20201126022416.3068426-4-jaegeuk@kernel.org>
2020-12-01  4:09   ` [f2fs-dev] [PATCH 4/4] f2fs: remove buffer_head which has 32bits limit Jaegeuk Kim
2020-12-02  1:47     ` Chao Yu
     [not found] ` <20201126022416.3068426-3-jaegeuk@kernel.org>
2020-12-01  4:09   ` Jaegeuk Kim [this message]
2020-12-01  9:03     ` [f2fs-dev] [PATCH 3/4] f2fs: fix wrong block count instead of bytes Chao Yu
     [not found] ` <20201126022416.3068426-2-jaegeuk@kernel.org>
2020-12-01  4:09   ` [f2fs-dev] [PATCH 2/4] f2fs: use new conversion functions between blks and bytes Jaegeuk Kim
2020-12-01  9:00     ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201040935.GC3858797@google.com \
    --to=jaegeuk@kernel.org \
    --cc=kernel-team@android.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).