-------- Original Message -------- Subject: fixes/changes to mount options parser Date: Fri, 4 Apr 2003 20:05:03 +0400 From: Oleg Drokin To: reiserfs-list@namesys.com, jeffm@suse.com Hello! Ok, so after some silence on this front, here is 2.4 and 2.5 versions of mount options parser fixes I propose. These fixes consist of: When you pass some mount options at mount time, default mount options are not reset if what you pass does not change the defaults. (both in 2.4 and 2.5) If you are doing remount and parser detected error, remount fails (2.4 only) If you pass more than one jdev= option, parsers spits out error (2.5 only, as 2.4 does not have this yet) Remount options (better) support (2.5 did not had ability to propagate mount options at all, by Jeff Mahoney). What this patch does not do, but was supposed to do: Hans decided that conflicting mount options on one line (like tails=off,tails=small) should produce error on mount/remount. After I implemented this, it turned out this does not work with remounting. if you mount with -o tails=off, and then later do remount with -o tails=small, then the filesystem will be passed options string like "tails=off,tails=small". This seems to be a feature of mount(8). So the only option that cannot appear on command line twice is "jdev" ("resize" can be met more than once is you enlarged drive twice in a row). So I reverted to the old way of "last option takes effect". As I do not want to split the code to determine whenever this is mount or remount, this behaviour will take place in case of both mount and umount. Attached are three patches: 2.4.20_parsefix.diff is patch for 2.4.20 2.4_parsefix.diff is patch against latest Marchelo's bk tree. (2.4) 2.5_parsefix.diff is patch against latest Linus' bk tree. (2.5) This code was only tested by me, and I want to hear any opinions on ways to improve before I pass it to our tester and start to try to submit it upstream. So if you want to try the code, treat it as experimental one. (BTW, I wonder how often people do actually pass any mount options at all and how often remount is made wit hany additional options?) Bye, Oleg -- Yury Umanets