Re: [PATCH 10/12 v3] Btrfs: deal with EEXIST after iput

2011-06-21 Thread liubo
On 06/21/2011 10:00 PM, Josef Bacik wrote: > On 06/21/2011 04:49 AM, Liu Bo wrote: >> There are two cases when BTRFS_I(inode)->logged_trans is zero: >> a) an inode is just allocated; >> b) iput an inode and reread it. >> >> However, in b) if btrfs is not committed yet, and this inode _may_ >> still

Re: [PATCH 10/12 v3] Btrfs: deal with EEXIST after iput

2011-06-21 Thread Josef Bacik
On 06/21/2011 04:49 AM, Liu Bo wrote: There are two cases when BTRFS_I(inode)->logged_trans is zero: a) an inode is just allocated; b) iput an inode and reread it. However, in b) if btrfs is not committed yet, and this inode _may_ still remain in log tree. So we need to check the log tree to ge

[PATCH 10/12 v3] Btrfs: deal with EEXIST after iput

2011-06-21 Thread Liu Bo
There are two cases when BTRFS_I(inode)->logged_trans is zero: a) an inode is just allocated; b) iput an inode and reread it. However, in b) if btrfs is not committed yet, and this inode _may_ still remain in log tree. So we need to check the log tree to get logged_trans a right value in case it