replay.c (9134d02bc0af4a8747d448d1f811ec5f8eb96df6) | replay.c (348709bad348d2fd013e1529b4cf5f220717c328) |
---|---|
1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 492 unchanged lines hidden (view full) --- 501 struct ubifs_scan_leb *sleb; 502 struct ubifs_scan_node *snod; 503 struct ubifs_bud *bud; 504 505 dbg_mnt("replay bud LEB %d, head %d", lnum, jhead); 506 if (c->need_recovery) 507 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, jhead != GCHD); 508 else | 1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 492 unchanged lines hidden (view full) --- 501 struct ubifs_scan_leb *sleb; 502 struct ubifs_scan_node *snod; 503 struct ubifs_bud *bud; 504 505 dbg_mnt("replay bud LEB %d, head %d", lnum, jhead); 506 if (c->need_recovery) 507 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, jhead != GCHD); 508 else |
509 sleb = ubifs_scan(c, lnum, offs, c->sbuf); | 509 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); |
510 if (IS_ERR(sleb)) 511 return PTR_ERR(sleb); 512 513 /* 514 * The bud does not have to start from offset zero - the beginning of 515 * the 'lnum' LEB may contain previously committed data. One of the 516 * things we have to do in replay is to correctly update lprops with 517 * newer information about this LEB. --- 313 unchanged lines hidden (view full) --- 831static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) 832{ 833 int err; 834 struct ubifs_scan_leb *sleb; 835 struct ubifs_scan_node *snod; 836 const struct ubifs_cs_node *node; 837 838 dbg_mnt("replay log LEB %d:%d", lnum, offs); | 510 if (IS_ERR(sleb)) 511 return PTR_ERR(sleb); 512 513 /* 514 * The bud does not have to start from offset zero - the beginning of 515 * the 'lnum' LEB may contain previously committed data. One of the 516 * things we have to do in replay is to correctly update lprops with 517 * newer information about this LEB. --- 313 unchanged lines hidden (view full) --- 831static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) 832{ 833 int err; 834 struct ubifs_scan_leb *sleb; 835 struct ubifs_scan_node *snod; 836 const struct ubifs_cs_node *node; 837 838 dbg_mnt("replay log LEB %d:%d", lnum, offs); |
839 sleb = ubifs_scan(c, lnum, offs, sbuf); 840 if (IS_ERR(sleb) ) { | 839 sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery); 840 if (IS_ERR(sleb)) { |
841 if (PTR_ERR(sleb) != -EUCLEAN || !c->need_recovery) 842 return PTR_ERR(sleb); 843 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf); 844 if (IS_ERR(sleb)) 845 return PTR_ERR(sleb); 846 } 847 848 if (sleb->nodes_cnt == 0) { --- 237 unchanged lines hidden --- | 841 if (PTR_ERR(sleb) != -EUCLEAN || !c->need_recovery) 842 return PTR_ERR(sleb); 843 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf); 844 if (IS_ERR(sleb)) 845 return PTR_ERR(sleb); 846 } 847 848 if (sleb->nodes_cnt == 0) { --- 237 unchanged lines hidden --- |