On 2018年04月17日 23:18, David Sterba wrote:
> On Tue, Apr 17, 2018 at 04:52:45PM +0800, Qu Wenruo wrote:
>> Commit 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for
>> delayed inode and item") merged into mainline is not the updated version
>> submitted to the mail list in Dec 2017.
>>
>> Which lacks the following fixes:
>>
>> 1) Remove btrfs_qgroup_convert_reserved_meta() call in
>>    btrfs_delayed_item_release_metadata()
>> 2) Remove btrfs_qgroup_reserve_meta_prealloc() call in
>>    btrfs_delayed_inode_reserve_metadata()
>>
>> Those fixes will resolve unexpected EDQUOT problems.
>>
>> Fixes: 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for 
>> delayed inode and item")
>> Signed-off-by: Qu Wenruo <w...@suse.com>
> 
> Added to 4.17 queue, thanks.
> 
>> @@ -569,6 +569,12 @@ static int btrfs_delayed_item_reserve_metadata(struct 
>> btrfs_trans_handle *trans,
>>      dst_rsv = &fs_info->delayed_block_rsv;
>>  
>>      num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);
>> +
>> +    /*
>> +     * Here we migrate space rsv from transaction rsv, since have
>> +     * already reserved space when starting a transaction.
>> +     * So no need to reserve qgroup space here.
>> +     */
> 
> Please format the comments to the full line width.

Right, the already can go previous line without exceeding 80 chars.

But the "So no need to..." line is a new line so it will not take up any
space of previous line anyway.

> 
>> @@ -647,7 +657,9 @@ static int btrfs_delayed_inode_reserve_metadata(
>>                                                    "delayed_inode",
>>                                                    btrfs_ino(inode),
>>                                                    num_bytes, 1);
>> -            }
>> +            } else
>> +                    btrfs_qgroup_free_meta_prealloc(root,
>> +                                                    fs_info->nodesize);
> 
> Please don't diverge from the coding style, I'm fixing such issues but,
> you know.

For this, did you mean the bracket for else branch?

Thanks,
Qu

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to