From: Artem Bityutskiy <dedekind1@gmail.com>
To: Andres Salomon <dilinger@queued.net>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] jffs2: implement mount option parsing and compression overriding
Date: Sun, 16 Oct 2011 17:03:00 +0300 [thread overview]
Message-ID: <1318773789.7278.7.camel@sauron> (raw)
In-Reply-To: <20111015125006.685efc30@queued.net>
Hi,
please, cc the fs-devel mailing list when you sumbit v2.
On Sat, 2011-10-15 at 12:50 -0700, Andres Salomon wrote:
> Currently jffs2 has compile-time constants (and .config options)
> controlling whether or not the various compression/decompression
> drivers are built in and enabled. This is fine for embedded
> systems, but it clashes with distribution kernels. Distro kernels
> tend to turn on everything; this causes OpenFirmware to fall
> over, as it understands ZLIB-compressed inodes. Booting a kernel
> that has LZO compression enabled, writing to the boot partition,
> and then rebooting causes OFW to fail to read the kernel from
> the filesystem. This is because LZO compression has priority
> when writing new data to jffs2, if LZO is enabled.
>
> This patch adds mount option parsing, and a single supported
> option ("compr=none"). This adds the flexibility of being
> able to specify which compressor overrides on a per-superblock
> basis. For now, we can simply disable compression;
> additional flexibility coming soon.
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
You forgot to implement .show_options method of
'struct super_operations' - it is needed to make sure 'compr=none'
is shown when you do 'cat /proc/mounts'.
> + err = jffs2_parse_options(c, data);
> + if (err) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
'jffs2_parse_options()' prints the error message, do not duplicate it
please.
> + return -EINVAL;
> + }
> +
> + return jffs2_do_remount_fs(sb, flags, data);
> +}
> +
> static const struct super_operations jffs2_super_operations =
> {
> .alloc_inode = jffs2_alloc_inode,
> @@ -166,6 +234,13 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
> c->os_priv = sb;
> sb->s_fs_info = c;
>
> + ret = jffs2_parse_options(c, data);
> + if (ret) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
Ditto - kill this printk please.
--
Best Regards,
Artem Bityutskiy
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Andres Salomon <dilinger@queued.net>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/2] jffs2: implement mount option parsing and compression overriding
Date: Sun, 16 Oct 2011 17:03:00 +0300 [thread overview]
Message-ID: <1318773789.7278.7.camel@sauron> (raw)
In-Reply-To: <20111015125006.685efc30@queued.net>
Hi,
please, cc the fs-devel mailing list when you sumbit v2.
On Sat, 2011-10-15 at 12:50 -0700, Andres Salomon wrote:
> Currently jffs2 has compile-time constants (and .config options)
> controlling whether or not the various compression/decompression
> drivers are built in and enabled. This is fine for embedded
> systems, but it clashes with distribution kernels. Distro kernels
> tend to turn on everything; this causes OpenFirmware to fall
> over, as it understands ZLIB-compressed inodes. Booting a kernel
> that has LZO compression enabled, writing to the boot partition,
> and then rebooting causes OFW to fail to read the kernel from
> the filesystem. This is because LZO compression has priority
> when writing new data to jffs2, if LZO is enabled.
>
> This patch adds mount option parsing, and a single supported
> option ("compr=none"). This adds the flexibility of being
> able to specify which compressor overrides on a per-superblock
> basis. For now, we can simply disable compression;
> additional flexibility coming soon.
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
You forgot to implement .show_options method of
'struct super_operations' - it is needed to make sure 'compr=none'
is shown when you do 'cat /proc/mounts'.
> + err = jffs2_parse_options(c, data);
> + if (err) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
'jffs2_parse_options()' prints the error message, do not duplicate it
please.
> + return -EINVAL;
> + }
> +
> + return jffs2_do_remount_fs(sb, flags, data);
> +}
> +
> static const struct super_operations jffs2_super_operations =
> {
> .alloc_inode = jffs2_alloc_inode,
> @@ -166,6 +234,13 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
> c->os_priv = sb;
> sb->s_fs_info = c;
>
> + ret = jffs2_parse_options(c, data);
> + if (ret) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
Ditto - kill this printk please.
--
Best Regards,
Artem Bityutskiy
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Andres Salomon <dilinger@queued.net>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] jffs2: implement mount option parsing and compression overriding
Date: Sun, 16 Oct 2011 17:03:00 +0300 [thread overview]
Message-ID: <1318773789.7278.7.camel@sauron> (raw)
In-Reply-To: <20111015125006.685efc30@queued.net>
Hi,
please, cc the fs-devel mailing list when you sumbit v2.
On Sat, 2011-10-15 at 12:50 -0700, Andres Salomon wrote:
> Currently jffs2 has compile-time constants (and .config options)
> controlling whether or not the various compression/decompression
> drivers are built in and enabled. This is fine for embedded
> systems, but it clashes with distribution kernels. Distro kernels
> tend to turn on everything; this causes OpenFirmware to fall
> over, as it understands ZLIB-compressed inodes. Booting a kernel
> that has LZO compression enabled, writing to the boot partition,
> and then rebooting causes OFW to fail to read the kernel from
> the filesystem. This is because LZO compression has priority
> when writing new data to jffs2, if LZO is enabled.
>
> This patch adds mount option parsing, and a single supported
> option ("compr=none"). This adds the flexibility of being
> able to specify which compressor overrides on a per-superblock
> basis. For now, we can simply disable compression;
> additional flexibility coming soon.
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
You forgot to implement .show_options method of
'struct super_operations' - it is needed to make sure 'compr=none'
is shown when you do 'cat /proc/mounts'.
> + err = jffs2_parse_options(c, data);
> + if (err) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
'jffs2_parse_options()' prints the error message, do not duplicate it
please.
> + return -EINVAL;
> + }
> +
> + return jffs2_do_remount_fs(sb, flags, data);
> +}
> +
> static const struct super_operations jffs2_super_operations =
> {
> .alloc_inode = jffs2_alloc_inode,
> @@ -166,6 +234,13 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
> c->os_priv = sb;
> sb->s_fs_info = c;
>
> + ret = jffs2_parse_options(c, data);
> + if (ret) {
> + printk(KERN_ERR "JFFS2 error: invalid or unknown mount option\n");
Ditto - kill this printk please.
--
Best Regards,
Artem Bityutskiy
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2011-10-16 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-15 19:50 [PATCH 1/2] jffs2: implement mount option parsing and compression overriding Andres Salomon
2011-10-15 19:50 ` Andres Salomon
2011-10-16 14:03 ` Artem Bityutskiy [this message]
2011-10-16 14:03 ` Artem Bityutskiy
2011-10-16 14:03 ` Artem Bityutskiy
2011-10-17 17:24 ` Andres Salomon
2011-10-17 17:24 ` Andres Salomon
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=1318773789.7278.7.camel@sauron \
--to=dedekind1@gmail.com \
--cc=dilinger@queued.net \
--cc=dwmw2@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.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.