linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changman Lee <cm224.lee@samsung.com>
To: Chao Yu <chao2.yu@samsung.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: fix to issue small discard in real-time mode discard
Date: Tue, 03 Mar 2015 08:58:09 +0900	[thread overview]
Message-ID: <20150302235809.GA6541@lcm-devel.org> (raw)
In-Reply-To: <019801d05338$52aae5b0$f800b110$@samsung.com>

On Sat, Feb 28, 2015 at 05:23:30PM +0800, Chao Yu wrote:
> Now in f2fs, we share functions and structures for batch mode and real-time mode
> discard. For real-time mode discard, in shared function add_discard_addrs, we
> will use uninitialized trim_minlen in struct cp_control to compare with length
> of contiguous free blocks to decide whether skipping discard fragmented freespace
> or not, this makes us ignore small discard sometimes. Fix it.
> 
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
>  fs/f2fs/segment.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index daee4ab..fcc1cc2 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -549,7 +549,7 @@ static void add_discard_addrs(struct f2fs_sb_info *sbi, struct cp_control *cpc)
>  
>  		end = __find_rev_next_zero_bit(dmap, max_blocks, start + 1);
>  
> -		if (end - start < cpc->trim_minlen)
> +		if (force && end - start < cpc->trim_minlen)
>  			continue;

Reviewed-by : Changman Lee <cm224.lee@samsung.com>

>  
>  		__add_discard_entry(sbi, cpc, start, end);
> -- 
> 2.3.1
> 

      reply	other threads:[~2015-03-02 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28  9:23 [PATCH] f2fs: fix to issue small discard in real-time mode discard Chao Yu
2015-03-02 23:58 ` Changman Lee [this message]

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=20150302235809.GA6541@lcm-devel.org \
    --to=cm224.lee@samsung.com \
    --cc=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --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).