From: Andrew Morton <akpm@linux-foundation.org>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Linux FS devel list <linux-fsdevel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
ChristophHellwig <hch@infradead.org>,
Hin-Tak Leung <htl10@users.sourceforge.net>
Subject: Re: [PATCH v2 14/15] hfsplus: implement replay journal functionality
Date: Tue, 4 Feb 2014 14:33:01 -0800 [thread overview]
Message-ID: <20140204143301.a2c0cbe9ba5957cc86a2b1a6@linux-foundation.org> (raw)
In-Reply-To: <1390577336.2287.88.camel@slavad-ubuntu-12.04>
On Fri, 24 Jan 2014 19:28:56 +0400 Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
> From: Vyacheslav Dubeyko <slava@dubeyko.com>
> 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;
> +}
next prev parent reply other threads:[~2014-02-04 22:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 15:28 [PATCH v2 14/15] hfsplus: implement replay journal functionality Vyacheslav Dubeyko
2014-02-04 22:33 ` Andrew Morton [this message]
2014-02-05 7:50 ` Vyacheslav Dubeyko
2014-02-05 11:19 ` Hin-Tak Leung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140204143301.a2c0cbe9ba5957cc86a2b1a6@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=htl10@users.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).