Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbcDRTrB (ORCPT ); Mon, 18 Apr 2016 15:47:01 -0400 Received: from mail-bl2on0127.outbound.protection.outlook.com ([65.55.169.127]:32760 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751548AbcDRTq7 (ORCPT ); Mon, 18 Apr 2016 15:46:59 -0400 Authentication-Results: fromorbit.com; dkim=none (message not signed) header.d=none;fromorbit.com; dmarc=none action=none header.from=hpe.com; Message-ID: <571539A6.5070401@hpe.com> Date: Mon, 18 Apr 2016 15:46:46 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Dave Chinner CC: "Theodore Ts'o" , Andreas Dilger , , , Tejun Heo , Christoph Lameter , Scott J Norton , Douglas Hatch , Toshimitsu Kani Subject: Re: [PATCH v3 1/2] ext4: Pass in DIO_SKIP_DIO_COUNT flag if inode_dio_begin() called References: <1460484775-33359-1-git-send-email-Waiman.Long@hpe.com> <1460484775-33359-2-git-send-email-Waiman.Long@hpe.com> <20160414031634.GJ10643@dastard> <570FC379.7000107@hpe.com> <20160415081757.GK10643@dastard> <57112235.1090201@hpe.com> <20160415221918.GA21184@destitution> In-Reply-To: <20160415221918.GA21184@destitution> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [72.71.243.35] X-ClientProxiedBy: BLUPR05CA0071.namprd05.prod.outlook.com (10.141.20.41) To DF4PR84MB0313.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.27) X-MS-Office365-Filtering-Correlation-Id: dda01e15-ca13-4d80-ceba-08d367c2327d X-Microsoft-Exchange-Diagnostics: 1;DF4PR84MB0313;2:iSXU4Zq+O+nrDfBn5ofh7gS/Hu3XHSJHu6s3zlI1at/rXHec/m5pi8WIWkqSz6of4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n2Bri10X5NOJqmw==;4:8suArLKSVTYaia1Mn2Q5iEeexW2RV/Orb0W5o7c+lBJ22D+JvT0xf03z+iLKkeR7Z7m+H9Quzu+Q9tv034A/RqwemNAuIMD3ZX0WsLdHicZEFmYY28J+xXIsfwUucan19D9T8/5kZjMvs49hpdu1c7OpjrW5zIzHpiYuJfxwJHWFCnMG/cUCsA1KZ5lT7IHf0SVPc1WoiKK7babNpn3Z9ZWm7u52mCSiucX95s7u8lhrnaQy6bzlyVyJd4vygcUNU1cra01RlXXwhhFSpuJ6o4PrM+84DEFBqeV1YDsGLJlXpqpujzbDMEFveGeGFmyIDf367a8JnGFh5sBmErDCI8Nqqu6ler14zxGkDG1FcwvxKQSBLXrhAf6hf8O0sT16RtS+6/JEP1N2sVOqhuQw8Q/nl4qBeZ1yTCzLR8oVM+M= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:DF4PR84MB0313;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0313; X-Forefront-PRVS: 0916FC3A18 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(377454003)(24454002)(3846002)(6116002)(110136002)(47776003)(33656002)(66066001)(83506001)(93886004)(4001350100001)(586003)(36756003)(5004730100002)(65956001)(50986999)(76176999)(65816999)(87266999)(117156001)(86362001)(189998001)(99136001)(1096002)(59896002)(230700001)(4326007)(65806001)(5008740100001)(92566002)(54356999)(42186005)(2950100001)(64126003)(81166005)(2906002)(80316001)(50466002)(23756003)(77096005);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0313;H:[192.168.142.159];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;DF4PR84MB0313;23:6nr4cfH7jhHp5EH2pKE8smGQDrZxrcGUf5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y9B8PjbSbpRor/x5veavf+zEwgFaN6cdsIKTNXNlLo8yCaKegJas?= =?iso-8859-1?Q?yZX6aURaLE1zGjpo9CbvVM3OJ4sjG1myXBN8FUZRN/ocs3yKNOoSdSuq2D?= =?iso-8859-1?Q?MpqKPd846LW35VeZDp0fud/cRR6CYePK8eNEWnK5NAFS0SZzdxKxz3LagG?= =?iso-8859-1?Q?epy9tESCzRp00ezOUwS5Ec3SWL8ypTw8QYHdJNki3nab16UlycASjQG/M1?= =?iso-8859-1?Q?nibbu9O1hl1an4VFuPnMzqhZm1Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DF4PR84MB0313;5:VzX5Nm+OLcvYBRN35VConSjHpF2ZO9QfCDUHY9poi7p4RsQ8CnM+WLboFv57x4491EDZg77q9yxsxW8CcfBBep9Kg4wZK1tHF2AR8asH+7/Y+/50r3KZpuZzMjbVSPYYMtfyh314+vvkpghe34eF1BM64PrUsnHOKPAQnomrzofW6yZTsJKWyJhQG8OaRzFN;24:kw/HnpEb+0X9gRIBJGlcSeCtkeHPTShvlAeGM7ZnhVSU47S+tFxEcRAWR+IaPZtzj+cAFRkaKR1yY/F89vrr4p/h/B3O8wP9OhdbSs5kSfo=;7:NxggmM8V5PPI8JeZmh2oAa16/RPmqiNoB+yGM1K7neIGtLkP447J6aqfC/VYmdJtIkh2oIh1lBxscUdaWVP1pMsl5DbIsJ7wzwc50Qgr2ZwMDdb/QIbtFwLJb6WFSbMUbqNgQ0kK91J0B3eZ0KQczNalTUCX0h1qpEJ+NJ3KVz4FGi7/smdeJrvafD4KVay5ivYSxCdBoWw8ByJ68n3SJfxmrPS/fEIY4CMqRWcLG+c= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2016 19:46:54.8887 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0313 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 34 On 04/15/2016 06:19 PM, Dave Chinner wrote: > On Fri, Apr 15, 2016 at 01:17:41PM -0400, Waiman Long wrote: >> On 04/15/2016 04:17 AM, Dave Chinner wrote: >>> On Thu, Apr 14, 2016 at 12:21:13PM -0400, Waiman Long wrote: >>>> What the patch does is to eliminate the innermost >>>> inode_dio_begin/end pair. >>> Yes, and with that change inode_dio_wait() no longer waits for >>> AIO+DIO writes on ext4, hence breaking truncate IO barrier >>> requirements of inode_dio_wait(). >>> >>> Cheers, >>> >>> Dave. >> You are right and thank for pointing this out to me. I think I focus too >> much on the dax_do_io() internal and didn't realize that inode_dio_end() can >> be deferred in __blockdev_direct_IO(). I will update my patch to eliminate >> the extra inode_dio_begin/end pair only for dax_do_io(). > Even there there is the risk that a future change will break ext4. > the ext4 code needs fixing first, then you can look at skipping the > DIO based counting everywhere. > > i.e. fix the root cause of the problem, don't hack around it or > throw band-aids over it. > > Cheers, > > Dave. I agree that the ext4 code needs fixing w.r.t. the problem that you found. That will take more time and testing. In the mean time, I think it is OK to pick the low-hanging fruits that are handled by my patch. Cheers, Longman