tmp_suning_uos_patched/fs/nilfs2
Jiro SEKIBA b2ac86e1a8 nilfs2: sync super blocks in turns
This will sync super blocks in turns instead of syncing duplicate
super blocks at the time.  This will help searching valid super root
when super block is written into disk before log is written, which is
happen when barrier-less block devices are unmounted uncleanly.  In
the situation, old super block likely points to valid log.

This patch introduces ns_sbwcount member to the nilfs object and adds
nilfs_sb_will_flip() function; ns_sbwcount counts how many times super
blocks write back to the disk.  And, nilfs_sb_will_flip() decides
whether flipping required or not based on the count of ns_sbwcount to
sync super blocks asymmetrically.

The following functions are also changed:

 - nilfs_prepare_super(): flips super blocks according to the
   argument.  The argument is calculated by nilfs_sb_will_flip()
   function.

 - nilfs_cleanup_super(): sets "clean" flag to both super blocks if
   they point to the same checkpoint.

To update both of super block information, caller of
nilfs_commit_super must set the information on both super blocks.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2010-07-23 10:02:11 +09:00
..
alloc.c nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
alloc.h nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
bmap_union.h
bmap.c
bmap.h
btnode.c
btnode.h
btree.c nilfs2: cleanup multi kmem_cache_{create,destroy} code 2010-05-10 11:32:30 +09:00
btree.h nilfs2: remove obsolete declarations of cache constructor and destructor 2010-05-31 20:50:29 +09:00
cpfile.c
cpfile.h
dat.c
dat.h
dir.c
direct.c
direct.h
file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
gcdat.c
gcinode.c
ifile.c
ifile.h
inode.c nilfs2: replace inode uid,gid,mode initialization with helper function 2010-05-21 18:31:25 -04:00
ioctl.c
Kconfig
Makefile
mdt.c
mdt.h
namei.c
nilfs.h nilfs2: sync super blocks in turns 2010-07-23 10:02:11 +09:00
page.c
page.h
recovery.c nilfs2: do not use nilfs_segsum_info structure in recovery code 2010-07-23 10:02:09 +09:00
sb.h
segbuf.c nilfs2: insert checkpoint number in segment summary header 2010-05-10 11:32:31 +09:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c nilfs2: sync super blocks in turns 2010-07-23 10:02:11 +09:00
segment.h nilfs2: rename nilfs_recover_logical_segments function 2010-07-23 10:02:09 +09:00
sufile.c
sufile.h
super.c nilfs2: sync super blocks in turns 2010-07-23 10:02:11 +09:00
the_nilfs.c nilfs2: sync super blocks in turns 2010-07-23 10:02:11 +09:00
the_nilfs.h nilfs2: sync super blocks in turns 2010-07-23 10:02:11 +09:00