Messages in this thread | | | Date | Fri, 12 Dec 2008 09:50:31 +0200 | From | "Pekka Enberg" <> | Subject | Re: [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>
| |