Re: [PATCH 2/2 v2] Btrfs: Per file/directory controls for COW and compression

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

 



On 03/22/2011 01:43 AM, Johann Lombardi wrote:
> On Mon, Mar 21, 2011 at 04:57:13PM +0800, liubo wrote:
>> @@ -4581,8 +4583,6 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
>>  	location->offset = 0;
>>  	btrfs_set_key_type(location, BTRFS_INODE_ITEM_KEY);
>>  
>> -	btrfs_inherit_iflags(inode, dir);
>> -
>>  	if ((mode & S_IFREG)) {
>>  		if (btrfs_test_opt(root, NODATASUM))
>>  			BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM;
>> @@ -4590,6 +4590,8 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
>>  			BTRFS_I(inode)->flags |= BTRFS_INODE_NODATACOW;
>>  	}
>>  
>> +	btrfs_inherit_iflags(inode, dir);
> 
> The problem is that btrfs_inherit_iflags() overwrites BTRFS_I(inode)->flags with the parent's flags, so you lose BTRFS_INODE_NODATA{SUM|COW}.
> 

Thanks for pointing this, will fix it.

thanks,
liubo

> Johann
> 

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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux