[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Btrfs: don't change inode flag of the dest clone file
From: |
Jeff Liu |
Subject: |
Re: [PATCH 2/2] Btrfs: don't change inode flag of the dest clone file |
Date: |
Fri, 16 Sep 2011 11:19:15 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
Add CC to Coreutils, cp --reflink performs btrfs clone operation.
Thanks,
-Jeff
On 09/15/2011 07:43 PM, David Sterba wrote:
> On Wed, Sep 14, 2011 at 01:25:36PM +0800, Li Zefan wrote:
>> The dst file will have the same inode flags with dst file after
>> file clone, and I think it's unexpected.
>>
>> For example, the dst file will suddenly become immutable after
>> getting some share of data with src file, if the src is immutable.
>
> Good catch! (I did not find any further direct assignment of two inode
> flags.)
>
>>
>> Signed-off-by: Li Zefan <address@hidden>
> Reviewed-by: David Sterba <address@hidden>
>
> IMNSHO should go to stable.
>
>
> david
>
>> ---
>> fs/btrfs/ioctl.c | 1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
>> index dc82bbb..a401514 100644
>> --- a/fs/btrfs/ioctl.c
>> +++ b/fs/btrfs/ioctl.c
>> @@ -2434,7 +2434,6 @@ static noinline long btrfs_ioctl_clone(struct file
>> *file, unsigned long srcfd,
>> if (endoff > inode->i_size)
>> btrfs_i_size_write(inode, endoff);
>>
>> - BTRFS_I(inode)->flags = BTRFS_I(src)->flags;
>> ret = btrfs_update_inode(trans, root, inode);
>> BUG_ON(ret);
>> btrfs_end_transaction(trans, root);
>> -- 1.7.3.1
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to address@hidden
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to address@hidden
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 2/2] Btrfs: don't change inode flag of the dest clone file,
Jeff Liu <=