From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:55697 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755807AbcKVT7r (ORCPT ); Tue, 22 Nov 2016 14:59:47 -0500 Subject: Re: [PATCH] Btrfs: adjust len of writes if following a preallocated extent To: Liu Bo , References: <1478287254-5458-1-git-send-email-bo.li.liu@oracle.com> CC: David Sterba From: Chris Mason Message-ID: Date: Tue, 22 Nov 2016 14:59:35 -0500 MIME-Version: 1.0 In-Reply-To: <1478287254-5458-1-git-send-email-bo.li.liu@oracle.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 11/04/2016 03:20 PM, Liu Bo wrote: > If we have > > |0--hole--4095||4096--preallocate--12287| > > instead of using preallocated space, a 8K direct write will just > create a new 8K extent and it'll end up with > > |0--new extent--8191||8192--preallocate--12287| > > It's because we find a hole em and then go to create a new 8K > extent directly without adjusting @len. > > Signed-off-by: Liu Bo Reviewed-by: Chris Mason -chris