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}.
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