public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.9-ac12 - problem mounting reiserfs (parse error?)
@ 2001-09-19 15:02 Pavel Roskin
  2001-09-19 16:49 ` Fabian Arias
  0 siblings, 1 reply; 12+ messages in thread
From: Pavel Roskin @ 2001-09-19 15:02 UTC (permalink / raw)
  To: linux-kernel

Hello!

I've compiled 2.4.9-ac12 and it has problems mounting reiserfs partitions.

This forks fine:

mount /dev/hda6 /usr/local

but "mount /dev/hda6" doesn't work if I have this in /etc/fstab:

/dev/hda6    /usr/local    reiserfs defaults  0 0

It appears that "defaults" is confusing some code in the kernel.  Here are
more results:

# mount -t reiserfs -o defaults /dev/hda6 /usr/local
reiserfs kgetopt: there is not option
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
       or too many mounted file systems
# mount -t reiserfs -o rw /dev/hda6 /usr/local
reiserfs kgetopt: there is not option
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
       or too many mounted file systems
# mount -t reiserfs -o bogus /dev/hda6 /usr/local
reiserfs kgetopt: there is not option bogus
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
       or too many mounted file systems

As you see, invalid options are distinguished ("there is not option
bogus", as opposed to "there is not option"), but all options are
considered invalid.

"reiserfs kgetopt: there is not option" appears on the console and in the
dmesg output, it's not coming from mount.

RedHat 7.1, i686, mount-2.11b-3 (from RedHat).

No problems with 2.4.9-ac10.  I haven't tried 2.4.9-ac12.

I hope to send fix soon.  Sorry, but I'm writing it in hurry to alert
others that 2.4.9-ac12 is not quite usable, at least with reiserfs.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 15:02 2.4.9-ac12 - problem mounting reiserfs (parse error?) Pavel Roskin
@ 2001-09-19 16:49 ` Fabian Arias
  2001-09-19 19:04   ` Wayne Whitney
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Fabian Arias @ 2001-09-19 16:49 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-kernel


Same here, cannot mount reiserfs partitions on boot.

- Debian Sid
- mount 2.11h
- gcc-2.95.4 (20010902 Debian prerelease) and 3.0.2pre010908.

But in my case I don't have "defaults" on fstab on my reiserfs partitions:

/dev/hdc1  /      ext2          defaults,errors=remount-ro      0 1
/dev/hdc5  /home  reiserfs      rw                              0 2
/dev/hdc6  /usr   reiserfs      rw                              0 2
/dev/hdc3  /var   reiserfs      rw                              0 2


On Wed, 19 Sep 2001, Pavel Roskin wrote:

> Hello!
>
> I've compiled 2.4.9-ac12 and it has problems mounting reiserfs partitions.
>
> This forks fine:
>
> mount /dev/hda6 /usr/local
>
> but "mount /dev/hda6" doesn't work if I have this in /etc/fstab:
>
> /dev/hda6    /usr/local    reiserfs defaults  0 0
>
> It appears that "defaults" is confusing some code in the kernel.  Here are
> more results:
>
> # mount -t reiserfs -o defaults /dev/hda6 /usr/local
> reiserfs kgetopt: there is not option
> mount: wrong fs type, bad option, bad superblock on /dev/hda6,
>        or too many mounted file systems
> # mount -t reiserfs -o rw /dev/hda6 /usr/local
> reiserfs kgetopt: there is not option
> mount: wrong fs type, bad option, bad superblock on /dev/hda6,
>        or too many mounted file systems
> # mount -t reiserfs -o bogus /dev/hda6 /usr/local
> reiserfs kgetopt: there is not option bogus
> mount: wrong fs type, bad option, bad superblock on /dev/hda6,
>        or too many mounted file systems
>
> As you see, invalid options are distinguished ("there is not option
> bogus", as opposed to "there is not option"), but all options are
> considered invalid.
>
> "reiserfs kgetopt: there is not option" appears on the console and in the
> dmesg output, it's not coming from mount.
>
> RedHat 7.1, i686, mount-2.11b-3 (from RedHat).
>
> No problems with 2.4.9-ac10.  I haven't tried 2.4.9-ac12.
>
> I hope to send fix soon.  Sorry, but I'm writing it in hurry to alert
> others that 2.4.9-ac12 is not quite usable, at least with reiserfs.
>
> --
> Regards,
> Pavel Roskin
>
 ---
 Fabian Arias Mun~oz                   |              Debian GNU/Linux Sid
 a.k.a. dewback en		       |		 Kernel 2.4.9-ac10
 #linuxhelp IRC.CHILE		       |			  ReiserFS


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 16:49 ` Fabian Arias
@ 2001-09-19 19:04   ` Wayne Whitney
  2001-09-19 19:29     ` Andreas Dilger
  2001-09-19 19:47   ` boris
  2001-09-20  0:25   ` [PATCH] " Pavel Roskin
  2 siblings, 1 reply; 12+ messages in thread
From: Wayne Whitney @ 2001-09-19 19:04 UTC (permalink / raw)
  To: Fabian Arias, LKML

I also have reiserfs mounts from /etc/fstab failing in 2.4.9-ac12, so
I straced the mount process.  With options "defaults" in /etc/fstab,
"mount /usr/local" does:

  mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0x80597a8) = -1 EINVAL (Invalid argument)

While "mount /dev/hde8 /usr/local" gives:

  mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0) = 0

But with the options "notail" in /etc/fstab, "mount /usr/local" does:

  mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0x806d3e0) = 0

Vital statistics:

  RedHat 7.1.93
  Linux version 2.4.9-ac12
  gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)
  mount 2.11g

Cheers, Wayne

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 19:04   ` Wayne Whitney
@ 2001-09-19 19:29     ` Andreas Dilger
  2001-09-19 20:14       ` Wayne Whitney
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Dilger @ 2001-09-19 19:29 UTC (permalink / raw)
  To: Wayne Whitney; +Cc: Fabian Arias, LKML

On Sep 19, 2001  12:04 -0700, Wayne Whitney wrote:
> I also have reiserfs mounts from /etc/fstab failing in 2.4.9-ac12, so
> I straced the mount process.  With options "defaults" in /etc/fstab,
> "mount /usr/local" does:
> 
>   mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0x80597a8) = -1 EINVAL (Invalid argument)

Could you run gdb on your mount and show us what *data contains at this
point (last parameter).  According to man(8) "defaults" expands to
"rw,suid,dev,exec,auto,nouser,async".  You could also try putting
all of these in /etc/fstab explicitly and remove them one at a time
until we find which one it is complaining about.  Either mount(8)
shouldn't be appending this option to the mount data, or reiserfs
needs to parse it in the kernel.

> While "mount /dev/hde8 /usr/local" gives:
> 
>   mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0) = 0

Works OK, no option data passed.

> But with the options "notail" in /etc/fstab, "mount /usr/local" does:
> 
>   mount("/dev/hde8", "/usr/local", "reiserfs", 0xc0ed0000, 0x806d3e0) = 0

Works OK, has "notail" but not any other options from "defaults".

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 16:49 ` Fabian Arias
  2001-09-19 19:04   ` Wayne Whitney
@ 2001-09-19 19:47   ` boris
  2001-09-19 20:31     ` Andreas Dilger
  2001-09-20  0:25   ` [PATCH] " Pavel Roskin
  2 siblings, 1 reply; 12+ messages in thread
From: boris @ 2001-09-19 19:47 UTC (permalink / raw)
  To: Fabian Arias; +Cc: linux-kernel

On Wed, Sep 19, 2001 at 12:49:54PM -0400, Fabian Arias wrote:

> - Debian Sid
> - mount 2.11h
> - gcc-2.95.4 (20010902 Debian prerelease) and 3.0.2pre010908.

dito ...
 
> But in my case I don't have "defaults" on fstab on my reiserfs partitions:
> 
> /dev/hdc1  /      ext2          defaults,errors=remount-ro      0 1
> /dev/hdc5  /home  reiserfs      rw                              0 2

but I can boot :

/dev/scsi/host0/bus0/target5/lun0/part1	/	reiserfs	defaults,errors=remount-ro	0	0

with:
reiserfs: Unrecognized mount option errors

everything is ok until I run lilo:


Unable to handle kernel NULL pointer dereference at virtual address 00000000
 printing eip:
00000000
*pde = 00000000

Entering kdb (current=0xc58d8000, pid 738) on processor 0 Oops: Oops
due to oops @ 0x0
eax = 0x00000000 ebx = 0xc5a7ebd4 ecx = 0xc7bb8c9c edx = 0xc1179bf0 
esi = 0xc1179bd4 edi = 0x00000000 esp = 0xc58d9f20 eip = 0x00000000 
ebp = 0xc58d9f54 xss = 0x00000018 xcs = 0x00000010 eflags = 0x00010246 
xds = 0xc1170018 xes = 0x00000018 origeax = 0xffffffff &regs = 0xc58d9eec

....
0xc5a5e000 00000588 00000578  0  001  stop  0xc5a5e370 bash
0xc5a4c000 00000737 00000588  0  000  stop  0xc5a4c370 lilo
0xc58d8000 00000738 00000737  1  000  run   0xc58d8370*lilo.real
[0]kdb> btp 738
    EBP       EIP         Function(args)
0xc012a310 0x00000000 <unknown> (0xc5a7ebd4, 0xc1179bd4)
                               kernel <unknown> 0x0 0x0 0x0
           0xc012a310 do_generic_file_read+0x364 (0xc5a7ebd4, 0xc5a7ebf4, 0xc58d9f88, 0xc012a6fc)
                               kernel .text 0xc0100000 0xc0129fac 0xc012a51c
0xc58d9f98 0xc012a7d2 generic_file_read+0x7a (0xc5a7ebd4, 0x805a920, 0x200, 0xc5a7ebf4)
                               kernel .text 0xc0100000 0xc012a758 0xc012a8dc
0xc58d9fbc 0xc0138e28 sys_read+0x98 (0x4, 0x805a920, 0x200, 0x805c768, 0x3)
                               kernel .text 0xc0100000 0xc0138d90 0xc0138e64
           0xc01071cb system_call+0x33
                               kernel .text 0xc0100000 0xc0107198 0xc01071d0


             mfg 
                        b.
 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 19:29     ` Andreas Dilger
@ 2001-09-19 20:14       ` Wayne Whitney
  2001-09-19 20:29         ` Andreas Dilger
  2001-09-19 21:08         ` Wayne Whitney
  0 siblings, 2 replies; 12+ messages in thread
From: Wayne Whitney @ 2001-09-19 20:14 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Fabian Arias, LKML

On Wed, 19 Sep 2001, Andreas Dilger wrote:

> Could you run gdb on your mount and show us what *data contains at
> this point (last parameter).  According to man(8) "defaults" expands
> to "rw,suid,dev,exec,auto,nouser,async".

Hmm, I'm not versant with gdb (strace is the extent of my sophistication),
so I'll try your suggestion below.

> You could also try putting all of these in /etc/fstab explicitly and
> remove them one at a time until we find which one it is complaining
> about.  Either mount(8) shouldn't be appending this option to the
> mount data, or reiserfs needs to parse it in the kernel.

It seems that the reiserfs option parsing in 2.4.9-ac12 is foobar, as any
one of "rw,suid,dev,exec,auto,nouser,async" in the options field in
/etc/fstab causes the mount to fail.  Also, mounting an r5-hashed reiserfs
file system with the option string "hash=r5" gives this fine error:

REISERFS: Error, r5 hash detected, unable to force r5 hash

I can confirm that the following option strings give a successful mount:
"conv", "hashed_relocation", "notail".  I didn't feel like going through
all the options possible.

Is everybody seeing this, or is specific to something about my setup, e.g.
gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)?  I'll try
recompiling with gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-97.1)
to check that.

Cheers, Wayne


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 20:14       ` Wayne Whitney
@ 2001-09-19 20:29         ` Andreas Dilger
  2001-09-19 21:08         ` Wayne Whitney
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Dilger @ 2001-09-19 20:29 UTC (permalink / raw)
  To: Wayne Whitney; +Cc: Fabian Arias, LKML, reiserfs-list

On Sep 19, 2001  13:14 -0700, Wayne Whitney wrote:
> On Wed, 19 Sep 2001, Andreas Dilger wrote:
> > Could you run gdb on your mount and show us what *data contains at
> > this point (last parameter).  According to man(8) "defaults" expands
> > to "rw,suid,dev,exec,auto,nouser,async".
> 
> Hmm, I'm not versant with gdb (strace is the extent of my sophistication),
> so I'll try your suggestion below.
> 
> > You could also try putting all of these in /etc/fstab explicitly and
> > remove them one at a time until we find which one it is complaining
> > about.  Either mount(8) shouldn't be appending this option to the
> > mount data, or reiserfs needs to parse it in the kernel.
> 
> It seems that the reiserfs option parsing in 2.4.9-ac12 is foobar, as any
> one of "rw,suid,dev,exec,auto,nouser,async" in the options field in
> /etc/fstab causes the mount to fail.  Also, mounting an r5-hashed reiserfs
> file system with the option string "hash=r5" gives this fine error:
> 
> REISERFS: Error, r5 hash detected, unable to force r5 hash
> 
> I can confirm that the following option strings give a successful mount:
> "conv", "hashed_relocation", "notail".  I didn't feel like going through
> all the options possible.

I have CC'd this to reiserfs-list so they know about it.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 19:47   ` boris
@ 2001-09-19 20:31     ` Andreas Dilger
  0 siblings, 0 replies; 12+ messages in thread
From: Andreas Dilger @ 2001-09-19 20:31 UTC (permalink / raw)
  To: boris; +Cc: Fabian Arias, linux-kernel, reiserfs-list

On Sep 19, 2001  21:47 +0200, boris wrote:
> On Wed, Sep 19, 2001 at 12:49:54PM -0400, Fabian Arias wrote:
> > - Debian Sid
> > - mount 2.11h
> > - gcc-2.95.4 (20010902 Debian prerelease) and 3.0.2pre010908.
> 
> dito ...
>  
> > But in my case I don't have "defaults" on fstab on my reiserfs partitions:
> > 
> > /dev/hdc1  /      ext2          defaults,errors=remount-ro      0 1
> > /dev/hdc5  /home  reiserfs      rw                              0 2
> 
> but I can boot :
> 
> /dev/scsi/host0/bus0/target5/lun0/part1	/	reiserfs	defaults,errors=remount-ro	0	0
> 
> with:
> reiserfs: Unrecognized mount option errors
> 
> everything is ok until I run lilo:
> 
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
>  printing eip:
> 00000000
> *pde = 00000000
> 
> Entering kdb (current=0xc58d8000, pid 738) on processor 0 Oops: Oops
> due to oops @ 0x0
> eax = 0x00000000 ebx = 0xc5a7ebd4 ecx = 0xc7bb8c9c edx = 0xc1179bf0 
> esi = 0xc1179bd4 edi = 0x00000000 esp = 0xc58d9f20 eip = 0x00000000 
> ebp = 0xc58d9f54 xss = 0x00000018 xcs = 0x00000010 eflags = 0x00010246 
> xds = 0xc1170018 xes = 0x00000018 origeax = 0xffffffff &regs = 0xc58d9eec
> 
> ....
> 0xc5a5e000 00000588 00000578  0  001  stop  0xc5a5e370 bash
> 0xc5a4c000 00000737 00000588  0  000  stop  0xc5a4c370 lilo
> 0xc58d8000 00000738 00000737  1  000  run   0xc58d8370*lilo.real
> [0]kdb> btp 738
>     EBP       EIP         Function(args)
> 0xc012a310 0x00000000 <unknown> (0xc5a7ebd4, 0xc1179bd4)
>                                kernel <unknown> 0x0 0x0 0x0
>            0xc012a310 do_generic_file_read+0x364 (0xc5a7ebd4, 0xc5a7ebf4, 0xc58d9f88, 0xc012a6fc)
>                                kernel .text 0xc0100000 0xc0129fac 0xc012a51c
> 0xc58d9f98 0xc012a7d2 generic_file_read+0x7a (0xc5a7ebd4, 0x805a920, 0x200, 0xc5a7ebf4)
>                                kernel .text 0xc0100000 0xc012a758 0xc012a8dc
> 0xc58d9fbc 0xc0138e28 sys_read+0x98 (0x4, 0x805a920, 0x200, 0x805c768, 0x3)
>                                kernel .text 0xc0100000 0xc0138d90 0xc0138e64
>            0xc01071cb system_call+0x33
>                                kernel .text 0xc0100000 0xc0107198 0xc01071d0

What version of LILO are you using?  Versions >= 21.6 _should_ automatically
do tail unpacking for mapped files via ioctl, but maybe it is not well tested.
Even so, it should NOT be possible to cause it to oops with bad data to the
ioctl, if this is the case.  I've CC'd reiserfs-list on this as well.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 20:14       ` Wayne Whitney
  2001-09-19 20:29         ` Andreas Dilger
@ 2001-09-19 21:08         ` Wayne Whitney
  1 sibling, 0 replies; 12+ messages in thread
From: Wayne Whitney @ 2001-09-19 21:08 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Fabian Arias, LKML, reiserfs-list

On Wed, 19 Sep 2001, Wayne Whitney wrote:

> It seems that the reiserfs option parsing in 2.4.9-ac12 is foobar, as any
> one of "rw,suid,dev,exec,auto,nouser,async" in the options field in
> /etc/fstab causes the mount to fail.  Also, mounting an r5-hashed reiserfs
> file system with the option string "hash=r5" gives this fine error:
>
> REISERFS: Error, r5 hash detected, unable to force r5 hash
>
> I can confirm that the following option strings give a successful mount:
> "conv", "hashed_relocation", "notail".  I didn't feel like going through
> all the options possible.
>
> Is everybody seeing this, or is specific to something about my setup, e.g.
> gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)?  I'll try
> recompiling with gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-97.1)
> to check that.

I did recompile with gcc 2.96-97.1, and the problem still exists.  At
least, mount with -o rw still fails.

Cheers, Wayne




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] 2.4.9-ac12 - problem mounting reiserfs (parse error?)
  2001-09-19 16:49 ` Fabian Arias
  2001-09-19 19:04   ` Wayne Whitney
  2001-09-19 19:47   ` boris
@ 2001-09-20  0:25   ` Pavel Roskin
  2001-09-22  0:10     ` [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken Pavel Roskin
  2 siblings, 1 reply; 12+ messages in thread
From: Pavel Roskin @ 2001-09-20  0:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Arias, reiserfs-list

Hello!

> But in my case I don't have "defaults" on fstab on my reiserfs partitions:
>
> /dev/hdc1  /      ext2          defaults,errors=remount-ro      0 1
> /dev/hdc5  /home  reiserfs      rw                              0 2

The common part is that you only have options recognized before they come
to the reiserfs level.  So the option list is empty at this point, with
reiserfs cannot deal with it.

Here's the fix for 2.4.9-ac12:

---------------------------------
--- linux.orig/fs/reiserfs/super.c
+++ linux/fs/reiserfs/super.c
@@ -223,7 +223,7 @@ static int parse_options (
 	{"0", 0}
     };
     *blocks = 0;
-    if (!options)
+    if (!options || !*options)
 	/* use default configuration: create tails, journaling on, no
            conversion to newest format */
 	return 1;
---------------------------------

If the string is empty, there is nothing to parse in it.  Another question
is that the parser could be made more robust, but my patch is correct,
minimal and works for me.

> > "reiserfs kgetopt: there is not option" appears on the console and in the
> > dmesg output, it's not coming from mount.

To reiserfs team: please check spelling.  It should be "there is no
option".  Also there are "pounters" in the comments.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken
  2001-09-20  0:25   ` [PATCH] " Pavel Roskin
@ 2001-09-22  0:10     ` Pavel Roskin
  2001-09-22  0:23       ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Pavel Roskin @ 2001-09-22  0:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: reiserfs-list

Hello!

I'm a bit disappointed that the bug with option parsing in reiserfs wasn't
fixed in 2.4.9-ac13.  It's a serious issue that prevents mounting
reiserfs partitions on system startup (except root partition).

Anyway, I'm using this opportunity to send a better patch.  The only
difference is that the faulty code has been actually identified and fixed
(do-while becomes while), not just worked around by a sanity check.

"pos" is initialized with "options", not NULL, because kgetopt()
effectively does it anyway, but the value of "pos" is now used earlier.

I also included fixes for the typos that I encountered while fixing and
testing my patch.

The patch has been tested by multiple mounting and unmounting a reiserfs
partition with specific (notail) and generic (ro) flags in different
combinations.

Simplification of kgetopt() is possible, but I'm intentionally avoiding
code changes other that the most urgent fix.

The patch is also available here:
http://www.red-bean.com/~proski/linux/reiserfs-parse.diff

---------------------------------------------------
--- linux.orig/fs/reiserfs/super.c
+++ linux/fs/reiserfs/super.c
@@ -144,8 +144,8 @@ static int kgetopt (char * options, opt_
     int len_arg;

     ptr1 = (*pos ? *pos : options);
-    ptr2 = NULL; /* here we will put pounter on '=' */
-    ptr3 = NULL; /* here we will put pounter on ',' */
+    ptr2 = NULL; /* here we will put pointer on '=' */
+    ptr3 = NULL; /* here we will put pointer on ',' */

     if (!options)
 	return -1;
@@ -164,7 +164,7 @@ static int kgetopt (char * options, opt_
 	}
     }
     if (!option_exists) {
-	printk ("reiserfs kgetopt: there is not option %s\n", ptr1);
+	printk ("reiserfs kgetopt: unrecognized option %s\n", ptr1);
 	return -1;
     }
     if (ptr2) {
@@ -213,7 +213,7 @@ static int parse_options (
 {
     int c;
     char * arg = NULL;
-    char * pos = NULL;
+    char * pos = options;
     char * p = NULL;
     arg_desc_t hash[] = {
 	{"rupasov", FORCE_RUPASOV_HASH},
@@ -227,7 +227,7 @@ static int parse_options (
 	/* use default configuration: create tails, journaling on, no
            conversion to newest format */
 	return 1;
-    do  {
+    while (*pos != '\0') {
 	opt_desc_t opts[] = {
 	    {"notail", 0, 0, NOTAIL},
 	    {"conv", 0, 0, REISERFS_CONVERT},
@@ -251,7 +251,7 @@ static int parse_options (
 		return 0;
 	    }
 	}
-    } while (*pos != '\0');
+    }
     return 1;
 }

---------------------------------------------------

Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken
  2001-09-22  0:10     ` [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken Pavel Roskin
@ 2001-09-22  0:23       ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2001-09-22  0:23 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-kernel, reiserfs-list

> I'm a bit disappointed that the bug with option parsing in reiserfs wasn't
> fixed in 2.4.9-ac13.  It's a serious issue that prevents mounting
> reiserfs partitions on system startup (except root partition).

Please wait for -ac14. That has the next batch of fixes in from Hans
Namesys guys

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-09-22  0:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-19 15:02 2.4.9-ac12 - problem mounting reiserfs (parse error?) Pavel Roskin
2001-09-19 16:49 ` Fabian Arias
2001-09-19 19:04   ` Wayne Whitney
2001-09-19 19:29     ` Andreas Dilger
2001-09-19 20:14       ` Wayne Whitney
2001-09-19 20:29         ` Andreas Dilger
2001-09-19 21:08         ` Wayne Whitney
2001-09-19 19:47   ` boris
2001-09-19 20:31     ` Andreas Dilger
2001-09-20  0:25   ` [PATCH] " Pavel Roskin
2001-09-22  0:10     ` [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken Pavel Roskin
2001-09-22  0:23       ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox