All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"linux-f2fs-devel@lists.sourceforge.net"
	<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix type of section block count variables
Date: Thu, 20 Aug 2020 09:05:40 -0700	[thread overview]
Message-ID: <20200820160540.GA2375181@google.com> (raw)
In-Reply-To: <20200819105748.plywpksq3cgm3j24@shindev.dhcp.fujisawa.hgst.com>

On 08/19, Shinichiro Kawasaki wrote:
> On Aug 19, 2020 / 10:34, Shin'ichiro Kawasaki wrote:
> > Commit da52f8ade40b ("f2fs: get the right gc victim section when section
> > has several segments") added code to count blocks of each section using
> > variables with type 'unsigned short', which has 2 bytes size in many
> > systems. However, the counts can be larger than the 2 bytes range and
> > type conversion results in wrong values. Especially when the f2fs
> > sections have blocks as many as USHRT_MAX, the count is handled as zero.
> 
> I made a mistake in the commit message line above. Not 'USHRT_MAX' but
> 'UHSRT_MAX + 1' is the number to be zero after type cast to unsinged short.
> 
> Jaegeuk, if the patch is good enough for you to pick up, could you help to
> edit the line as follows?
> 
> > sections have blocks as many as USHRT_MAX + 1, the count is handled as 0.
> >                                          ^^^^                          ^
> 
> In case this patch needs update to v2, I will update the commit message.
> Sorry about this confusion.

No worries. I applied the above change. Thanks,

> 
> -- 
> Best Regards,
> Shin'ichiro Kawasaki


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

      reply	other threads:[~2020-08-20 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  1:34 [f2fs-dev] [PATCH] f2fs: Fix type of section block count variables Shin'ichiro Kawasaki
2020-08-19  1:58 ` Chao Yu
2020-08-19 10:57 ` Shinichiro Kawasaki
2020-08-20 16:05   ` Jaegeuk Kim [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=20200820160540.GA2375181@google.com \
    --to=jaegeuk@kernel.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=shinichiro.kawasaki@wdc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.