linux/fs/affs
Artem Bityutskiy bc86256d2e affs: stop setting bm_flags
AFFS stores values '1' and '2' in 'bm_flags', and I fail to see any logic when
it prefers one or another. AFFS writes '1' only from '->put_super()', while
'->sync_fs()' and '->write_super()' store value '2'.  So on the first glance,
it looks like we want to have '1' if we unmount.  However, this does not really
happen in these cases:
  1. superblock is written via 'write_super()' then we unmount;
  2. we re-mount R/O, then unmount.
which are quite typical.

I could not find good documentation describing this field, except of one random
piece of documentation in the internet which says that -1 means that the root
block is valid, which is not consistent with what we have in the Linux AFFS
driver.

Jan Kara commented on this: "I have some vague recollection that on Amiga
boolean was usually encoded as: 0 == false, ~0 == -1 == true. But it has been
ages..."

Thus, my conclusion is that value of '1' is as good as value of '2' and we can
just always use '2'. An Jan Kara suggested to go further: "generally bm_flags
handling looks strange. If they are 0, we mount fs read only and thus cannot
change them.  If they are != 0, we write 2 there. So IMHO if you just removed
bm_flags setting, nothing will really happen."

So this patch removes the bm_flags setting completely. This makes the "clean"
argument of the 'affs_commit_super()' function unneeded, so it is also removed.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-07-14 16:32:41 +04:00
..
affs.h affs: bury unused macros 2012-05-29 23:28:34 -04:00
amigaffs.c affs: propagate umode_t 2012-01-03 22:55:04 -05:00
bitmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Changes Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dir.c sanitize ->fsync() for affs 2009-06-11 21:36:14 -04:00
file.c fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers 2011-07-20 20:47:59 -04:00
inode.c vfs: Rename end_writeback() to clear_inode() 2012-05-06 13:43:41 +08:00
Kconfig fs/Kconfig: move affs out 2009-01-22 13:15:56 +03:00
Makefile fs: change to new flag variable 2011-03-17 14:02:57 +01:00
namei.c switch ->create() to umode_t 2012-01-03 22:54:53 -05:00
super.c affs: stop setting bm_flags 2012-07-14 16:32:41 +04:00
symlink.c Fix remount races with symlink handling in affs 2010-01-26 22:22:24 -05:00