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 remain
>> in log tree.
>>
>> So we need to check the log tree to get logged_trans a right value
>> in case it hits a EEXIST while logging.
> 
> Instead of doing this why not just check and see if the inode has been
> logged but the transaction has not yet been committed in
> btrfs_drop_inode?  That way the inode doesn't get evicted from cache
> until after we know it's ok and that way we don't have to waste a tree
> lookup.  Thanks,
> 

Good idea, I'll follow it.

thanks,
liubo

> Josef
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to