From: Artem Bityutskiy <dedekind1@gmail.com>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Richard Weinberger <richard@nod.at>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2 for v3.15 0/3] UBI: block: Support very large volumes
Date: Mon, 28 Jul 2014 19:05:25 +0300 [thread overview]
Message-ID: <1406563525.23376.32.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <20140725231001.GA29798@arch.cereza>
On Fri, 2014-07-25 at 20:10 -0300, Ezequiel Garcia wrote:
> I think this series got lost :-(
>
> It's not in today's -next, and I'm looking at your pull for v3.16 and it's
> not there either. It seems I overlooked it, and realised just now, just before
> sending a new fix.
>
> Any idea what happened?
Shame, but no idea. May be I applied them on a laptop, and forgot to
push, and then never noticed. Anyway, sorry, just applied and pushed
out.
> return 0;
> @@ -412,7 +412,7 @@ int ubiblock_create(struct ubi_volume_info *vi)
> gd->first_minor = dev->ubi_num * UBI_MAX_VOLUMES + dev->vol_id;
> gd->private_data = dev;
> sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id);
> - disk_capacity = (vi->size * vi->usable_leb_size) >> 9;
> + disk_capacity = vi->used_bytes >> 9;
I think you should first align up and then divide. Something like
disk_capacity = ALIGN(vi->used_bytes, 512) / 512
may be?
By the way, do you really need to shift instead of just dividing, which
is more readable. I think with nowadays' compilers ">> 9" and "/ 512"
will give the same code, and the latter seems a bit more readable, no?
--
Best Regards,
Artem Bityutskiy
next prev parent reply other threads:[~2014-07-28 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 10:11 [PATCH v2 for v3.15 0/3] UBI: block: Support very large volumes Ezequiel Garcia
2014-05-05 10:11 ` [PATCH v2 1/3] UBI: block: Make ubiblock_resize return something Ezequiel Garcia
2014-05-05 10:11 ` [PATCH v2 2/3] UBI: block: Set disk_capacity out of the mutex Ezequiel Garcia
2014-05-05 10:11 ` [PATCH v2 3/3] UBI: block: Avoid disk size integer overflow Ezequiel Garcia
2014-05-21 16:20 ` [PATCH v2 for v3.15 0/3] UBI: block: Support very large volumes Ezequiel Garcia
2014-05-27 11:02 ` Artem Bityutskiy
2014-05-27 12:30 ` Ezequiel Garcia
2014-07-25 23:10 ` Ezequiel Garcia
2014-07-28 16:05 ` Artem Bityutskiy [this message]
2014-07-30 14:31 ` Ezequiel Garcia
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=1406563525.23376.32.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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.