From: Laurent Riffard <laurent.riffard@free.fr>
To: Edward Shishkin <edward.shishkin@gmail.com>
Cc: akpm@linux-foundation.org,
ReiserFS Development List <reiserfs-devel@vger.kernel.org>
Subject: Re: [patch 4/4] reiser4: reduce frame size of reiser4_init_super_data
Date: Wed, 07 Oct 2009 21:45:14 +0200 [thread overview]
Message-ID: <4ACCEFCA.9070106@free.fr> (raw)
In-Reply-To: <4AC9407C.2050105@gmail.com>
Hi Edward,
This patch is buggy, isn't it ?
I've got 2 reiser4 FS in my /etc/fstab:
/dev/vglinux1/lvkernel-r4 /home/laurent/kernel reiser4 defaults,noatime,nodiratime,tmgr.atom_max_size=2048 0 0
/dev/disk/by-uuid/b8dbe880-b664-49aa-8050-bddc91fd5e49 /mnt/diske reiser4 noauto,users,noatime,nodiratime 0 0
The first FS can't be mounted:
[ 235.078342] reiser4[mount(4205)]: parse_options (fs/reiser4/init_super.c:253)[nikita-2307]:
[ 235.078345] WARNING: Unrecognized option: "tmgr.atom_max_size=2048"
although the second one can be mounted:
[ 3152.046324] reiser4: sda7: found disk format 4.0.0.
Let's have a look at the code in fs/reiser4/init_super.c:
392 int reiser4_init_super_data(struct super_block *super, char *opt_string)
393 {
394 int result;
395 struct opt_desc *opts, *p;
396 reiser4_super_info_data *sbinfo = get_super_private(super);
397
...
442 p = opts;
443
444 push_sb_field_opts(p, opts, sbinfo);
p is passed by value to push_sb_field(). push_sb_field() does increment
its local copy of p, but here p remains equal to opts.
...
501 result = parse_options(opt_string, opts, p - opts);
3rd argument is 0 because p==opts. Now let's have a look at parse_options()
230 static int parse_options(char *opt_string, struct opt_desc *opts, int nr_opts)
231 {
nr_opts always == 0 here.
232 int result;
233
234 result = 0;
235 while ((result == 0) && opt_string && *opt_string) {
I assume opt_string is not null (opt_string == "tmgr.atom_max_size=2048" ?),
so let's loop:
236 int j;
237 char *next;
244 for (j = 0; j < nr_opts; ++j) {
nr_opts == 0, so we won't do any iteration here.
245 if (!strncmp(opt_string, opts[j].name,
246 strlen(opts[j].name))) {
247 result = parse_option(opt_string, &opts[j]);
248 break;
249 }
250 }
here, j==0 and nr_opts==0.
251 if (j == nr_opts) {
252 warning("nikita-2307", "Unrecognized option: \"%s\"",
253 opt_string);
254 /* traditionally, -EINVAL is returned on wrong mount
255 option */
256 result = RETERR(-EINVAL);
oops !
~~
laurent
next prev parent reply other threads:[~2009-10-07 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 0:40 [patch 4/4] reiser4: reduce frame size of reiser4_init_super_data Edward Shishkin
2009-10-07 19:45 ` Laurent Riffard [this message]
2009-10-07 19:54 ` Laurent Riffard
2009-10-07 20:05 ` [patch] reiser4: reduce frame size of reiser4_init_super_data fixup Edward Shishkin
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=4ACCEFCA.9070106@free.fr \
--to=laurent.riffard@free.fr \
--cc=akpm@linux-foundation.org \
--cc=edward.shishkin@gmail.com \
--cc=reiserfs-devel@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 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.