From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Fabian Frederick <fabf@skynet.be>,
Brian Norris <computersforpeace@gmail.com>
Cc: joern@lazybastard.org, akpm@linux-foundation.org,
rdunlap@infradead.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] mtd: block2mtd: check device size
Date: Wed, 29 Jan 2014 07:04:25 -0300 [thread overview]
Message-ID: <20140129100424.GA15271@localhost> (raw)
In-Reply-To: <20140123205331.03314c6f82f24a6bb4b8ef53@skynet.be>
Hi Fabian,
I saw you sent a v2 for one of the patches on this series,
but maybe this is worth considering too.
On Thu, Jan 23, 2014 at 08:53:31PM +0100, Fabian Frederick wrote:
[..]
> -/* FIXME: ensure that mtd->size % erase_size == 0 */
> static struct block2mtd_dev *add_device(char *devname, int erase_size)
> {
> const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
> @@ -250,6 +249,11 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
> goto devinit_err1;
> }
>
> + if ((long)dev->blkdev->bd_inode->i_size % erase_size) {
> + pr_err("erasesize muse be a divisor of device size\n");
> + goto devinit_err1;
> + }
> +
Brian: What do you think?
Fabian: Have you tested this patch? Can you elaborate a bit more about
the effect it would have, compared to the current behavior?
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Fabian Frederick <fabf@skynet.be>,
Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, akpm@linux-foundation.org,
rdunlap@infradead.org, joern@lazybastard.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] mtd: block2mtd: check device size
Date: Wed, 29 Jan 2014 07:04:25 -0300 [thread overview]
Message-ID: <20140129100424.GA15271@localhost> (raw)
In-Reply-To: <20140123205331.03314c6f82f24a6bb4b8ef53@skynet.be>
Hi Fabian,
I saw you sent a v2 for one of the patches on this series,
but maybe this is worth considering too.
On Thu, Jan 23, 2014 at 08:53:31PM +0100, Fabian Frederick wrote:
[..]
> -/* FIXME: ensure that mtd->size % erase_size == 0 */
> static struct block2mtd_dev *add_device(char *devname, int erase_size)
> {
> const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
> @@ -250,6 +249,11 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
> goto devinit_err1;
> }
>
> + if ((long)dev->blkdev->bd_inode->i_size % erase_size) {
> + pr_err("erasesize muse be a divisor of device size\n");
> + goto devinit_err1;
> + }
> +
Brian: What do you think?
Fabian: Have you tested this patch? Can you elaborate a bit more about
the effect it would have, compared to the current behavior?
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-01-29 10:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 19:53 [PATCH 3/4] mtd: block2mtd: check device size Fabian Frederick
2014-01-29 10:04 ` Ezequiel Garcia [this message]
2014-01-29 10:04 ` Ezequiel Garcia
2014-01-29 12:51 ` Fabian Frederick
2014-01-29 12:51 ` Fabian Frederick
2014-03-06 8:54 ` Brian Norris
2014-03-06 8:54 ` Brian Norris
2014-03-06 10:13 ` Fabian Frederick
2014-03-06 10:13 ` Fabian Frederick
2014-03-06 11:20 ` Ezequiel Garcia
2014-03-06 11:20 ` 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=20140129100424.GA15271@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=akpm@linux-foundation.org \
--cc=computersforpeace@gmail.com \
--cc=fabf@skynet.be \
--cc=joern@lazybastard.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rdunlap@infradead.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 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.