Re: [PATCH v2 14/15] hfsplus: implement replay journal functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--------------------------------------------
On Wed, 5/2/14, Vyacheslav Dubeyko <slava@xxxxxxxxxxx> wrote:

 Subject: Re: [PATCH v2 14/15] hfsplus: implement replay journal functionality
 To: "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>
 Cc: "Linux FS devel list" <linux-fsdevel@xxxxxxxxxxxxxxx>, "Al Viro" <viro@xxxxxxxxxxxxxxxxxx>, "ChristophHellwig" <hch@xxxxxxxxxxxxx>, "Hin-Tak Leung" <htl10@xxxxxxxxxxxxxxxxxxxxx>
 Date: Wednesday, 5 February, 2014, 7:50
 
 Hi Andrew,
 
 On Tue, 2014-02-04 at 14:33 -0800, Andrew Morton wrote:
 > 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;
 > > +}
 
 Yes, I agree. Please, find the patch below.
 
 Thanks,
 Vyacheslav Dubeyko.
 --
 From: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
 Subject: [PATCH] hfsplus: remove unnecessary duplication of
 cleanup in hfsplus_replay_journal() method
 
 This patch simply remove unnecessary duplication of cleanup
 in hfsplus_replay_journal() method.
 
 Signed-off-by: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
 Cc: Hin-Tak Leung <htl10@xxxxxxxxxxxxxxxxxxxxx>
 Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
 Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
 ---
  fs/hfsplus/journal.c |    7 -------
  1 file changed, 7 deletions(-)
 
 diff --git a/fs/hfsplus/journal.c b/fs/hfsplus/journal.c
 index 720d96a..93c1d6f 100644
 --- a/fs/hfsplus/journal.c
 +++ b/fs/hfsplus/journal.c
 @@ -947,13 +947,6 @@ static int
 hfsplus_replay_journal(struct super_block *sb)
          err = -EIO;
      }
  
 -    if (unlikely(err))
 -        goto
 failed_journal_replay;
 -
 -    mutex_unlock(&jnl->jnl_lock);
 -   
 hfsplus_deinit_block_list_desc(&desc);
 -    return 0;
 -
  failed_journal_replay:
      mutex_unlock(&jnl->jnl_lock);
     
 hfsplus_deinit_block_list_desc(&desc);
 -- 
 1.7.9.5
 
 
 Acked-by: Hin-Tak Leung <htl10@xxxxxxxxxxxxxxxxxxxxx>

Well spotted, Andrew.

Hin-Tak
--
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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux