Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6:
UBIFS: fix the dark space calculation
UBIFS: introduce a helper to dump scanning info

+23 -2
+16
fs/ubifs/debug.c
··· 870 870 spin_unlock(&dbg_lock); 871 871 } 872 872 873 + void dbg_dump_sleb(const struct ubifs_info *c, 874 + const struct ubifs_scan_leb *sleb, int offs) 875 + { 876 + struct ubifs_scan_node *snod; 877 + 878 + printk(KERN_DEBUG "(pid %d) start dumping scanned data from LEB %d:%d\n", 879 + current->pid, sleb->lnum, offs); 880 + 881 + list_for_each_entry(snod, &sleb->nodes, list) { 882 + cond_resched(); 883 + printk(KERN_DEBUG "Dumping node at LEB %d:%d len %d\n", sleb->lnum, 884 + snod->offs, snod->len); 885 + dbg_dump_node(c, snod->node); 886 + } 887 + } 888 + 873 889 void dbg_dump_leb(const struct ubifs_info *c, int lnum) 874 890 { 875 891 struct ubifs_scan_leb *sleb;
+5
fs/ubifs/debug.h
··· 269 269 void dbg_dump_lprops(struct ubifs_info *c); 270 270 void dbg_dump_lpt_info(struct ubifs_info *c); 271 271 void dbg_dump_leb(const struct ubifs_info *c, int lnum); 272 + void dbg_dump_sleb(const struct ubifs_info *c, 273 + const struct ubifs_scan_leb *sleb, int offs); 272 274 void dbg_dump_znode(const struct ubifs_info *c, 273 275 const struct ubifs_znode *znode); 274 276 void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat); ··· 388 386 static inline void dbg_dump_lpt_info(struct ubifs_info *c) { return; } 389 387 static inline void dbg_dump_leb(const struct ubifs_info *c, 390 388 int lnum) { return; } 389 + static inline void 390 + dbg_dump_sleb(const struct ubifs_info *c, 391 + const struct ubifs_scan_leb *sleb, int offs) { return; } 391 392 static inline void 392 393 dbg_dump_znode(const struct ubifs_info *c, 393 394 const struct ubifs_znode *znode) { return; }
+1 -1
fs/ubifs/recovery.c
··· 983 983 } 984 984 985 985 /** 986 - * clean_an_unclean_leb - read and write a LEB to remove corruption. 986 + * clean_an_unclean_leb - read and write a LEB to remove corruption. 987 987 * @c: UBIFS file-system description object 988 988 * @ucleb: unclean LEB information 989 989 * @sbuf: LEB-sized buffer to use
+1 -1
fs/ubifs/sb.c
··· 247 247 mst->total_dirty = cpu_to_le64(tmp64); 248 248 249 249 /* The indexing LEB does not contribute to dark space */ 250 - tmp64 = (c->main_lebs - 1) * c->dark_wm; 250 + tmp64 = ((long long)(c->main_lebs - 1) * c->dark_wm); 251 251 mst->total_dark = cpu_to_le64(tmp64); 252 252 253 253 mst->total_used = cpu_to_le64(UBIFS_INO_NODE_SZ);