lkml.org 
[lkml]   [2008]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mmotm 3/5] nilfs2: avoid double error caused by nilfs_transaction_end
Hi Ryusuke,

On Fri, Dec 12, 2008 at 7:16 AM, Ryusuke Konishi
<konishi.ryusuke@lab.ntt.co.jp> wrote:
> Pekka Enberg pointed out that double error handlings found after
> nilfs_transaction_end() can be avoided by separating abort operation:
>
> OK, I don't understand this. The only way nilfs_transaction_end() can
> fail is if we have NILFS_TI_SYNC set and we fail to construct the
> segment. But why do we want to construct a segment if we don't commit?
>
> I guess what I'm asking is why don't we have a separate
> nilfs_transaction_abort() function that can't fail for the erroneous
> case to avoid this double error value tracking thing?
>
> This does the separation and renames nilfs_transaction_end() to
> nilfs_transaction_commit() for clarification.
>
> Since, some calls of these functions were used just for exclusion
> control against the segment constructor, they are replaced with
> semaphore operations.
>
> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>

Nice cleanup!

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>


\
 
 \ /
  Last update: 2008-12-12 08:53    [W:0.290 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site