All of lore.kernel.org
 help / color / mirror / Atom feed
From: liubo <liubo2009@cn.fujitsu.com>
To: Johann Lombardi <johann@whamcloud.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2 v2] Btrfs: Per file/directory controls for COW and compression
Date: Tue, 22 Mar 2011 10:06:50 +0800	[thread overview]
Message-ID: <4D88043A.6030002@cn.fujitsu.com> (raw)
In-Reply-To: <20110321174348.GC8235@granier.hd.free.fr>

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
> 


  reply	other threads:[~2011-03-22  2:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21  8:57 [PATCH 2/2 v2] Btrfs: Per file/directory controls for COW and compression liubo
2011-03-21 17:43 ` Johann Lombardi
2011-03-22  2:06   ` liubo [this message]
2011-03-22 10:12   ` [PATCH 2/2 v3] " liubo
2011-04-04  9:31 ` [PATCH 2/2 v2] " Konstantinos Skarlatos
2011-04-06  1:23   ` liubo
2011-04-06  1:26     ` Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D88043A.6030002@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=johann@whamcloud.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.