On Fri, 24 Jan 2014 19:28:56 +0400 Vyacheslav Dubeyko <slava@xxxxxxxxxxx> wrote: > From: Vyacheslav Dubeyko <slava@xxxxxxxxxxx> > Subject: [PATCH v2 14/15] hfsplus: implement replay journal functionality > > This patch implements functionality of HFS+ journal replay. > > If the journal contains valid transaction then it needs to write > them to disk. In order to replay the journal, an implementation > just loops over the transactions, copying each individual block > in the transaction from the journal to its proper location on > the volume. Once those blocks have been flushed to the media > (not just the driver!), it may update the journal header to > remove the transactions. > > ... > > +static int hfsplus_replay_journal(struct super_block *sb) > +{ > + struct hfsplus_journal *jnl = HFSPLUS_SB(sb)->jnl; > + struct hfsplus_journal_header *jh = jnl->jh; > + struct hfsplus_blist_desc desc; > + u32 last_seq_num = 0; > + int err; > + > > ... > > + if (hfsplus_journal_empty(jh)) > + err = hfsplus_replay_journal_header(sb); > + else { > + pr_err("journal replay failed\n"); > + err = -EIO; > + } > + > + if (unlikely(err)) > + goto failed_journal_replay; > + > + mutex_unlock(&jnl->jnl_lock); > + hfsplus_deinit_block_list_desc(&desc); > + return 0; umm, remove the above five statements? > +failed_journal_replay: > + mutex_unlock(&jnl->jnl_lock); > + hfsplus_deinit_block_list_desc(&desc); > + return err; > +} -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html