Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4053985ybl; Mon, 12 Aug 2019 10:33:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyF2PMiqaLn5vgJciMtDjmcpZxzVq46tF+xu1s6DS0Sfhw4H/70TwPF/oAmhetoaT/poegI X-Received: by 2002:a17:90a:1c1:: with SMTP id 1mr396216pjd.72.1565631183272; Mon, 12 Aug 2019 10:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565631183; cv=none; d=google.com; s=arc-20160816; b=WHOzEcfd1wMO/bgLdYN132VMhOvmtD9vPfrJy6pHN6z/TnmKKL7s5EEaKeNu+I0plv gWKrzwKc4iypEUeSCUecQlixrJbzMGC2XCnjQylgxZgtv333C5l3ClrRXDaP2h0AepCA iq/Y8CimRkLG95zTsfiWHdMslTAXGdHDx/8ku1qAuOlGh3vgG/9jvCgCtSQmi7gU36+0 0uatBT4A5EvykVzietU6g3vNGpGKMdAQf+lncavEdI39oPgUTjipHbkjJY5xJVuviV5L M/ZTsby/h7e22bGhMNJHRLAu9058c0Gi6JSvrUdFhwPVKYasr2POHiSfvuTl7/uM0z/k AA/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject; bh=GZg6jft2tCTgX998UPvXMBUx0qlfZpe+WkRa6NMvq8M=; b=H29CUdAJKpBJdlmaUCOzeBE2CnEOP7wovoYCulsmhHlVFtygJPNZNZmBgbvbDfz99C yrMUqpENljkj5Yh1jy+841lHpSQgh/nz/fVIxPk2D16JWf1Di1Lyctc/ciicTR4YgYl/ VVFvQwv4D+SLA6tehIVhZVmATHPy58aMagy1Ma05gtYu0E8lrpFEWZbMFt/dP+GEgRTI zCVMyTsBQSlO1x42kDNsmIjQDcaDBFc6sg3iyaHNoOl+y76Kn0/pylTJg+u0oVhIj1Ct 0lPPl/93MFT8h7Ew5nOT6lVSQmLKQPN7bH0y5t/m36PhwPwRblheUJYIavT7kc3ATXjJ CCYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q24si7837012pls.7.2019.08.12.10.32.48; Mon, 12 Aug 2019 10:33:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727169AbfHLRb6 (ORCPT + 99 others); Mon, 12 Aug 2019 13:31:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:13628 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725843AbfHLRb5 (ORCPT ); Mon, 12 Aug 2019 13:31:57 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7CHRI45003980 for ; Mon, 12 Aug 2019 13:31:56 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ubc768v65-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 12 Aug 2019 13:31:56 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Aug 2019 18:31:54 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 12 Aug 2019 18:31:52 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7CHVpKE38011286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Aug 2019 17:31:51 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9552D52051; Mon, 12 Aug 2019 17:31:51 +0000 (GMT) Received: from localhost.localdomain (unknown [9.124.31.57]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id AF04F5204F; Mon, 12 Aug 2019 17:31:50 +0000 (GMT) Subject: Re: [PATCH 0/5] ext4: direct IO via iomap infrastructure To: Matthew Bobrowski , linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, jack@suse.cz, tytso@mit.edu References: From: RITESH HARJANI Date: Mon, 12 Aug 2019 23:01:50 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 19081217-0016-0000-0000-0000029DEA5A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19081217-0017-0000-0000-000032FDFB1A Message-Id: <20190812173150.AF04F5204F@d06av21.portsmouth.uk.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-12_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908120193 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hello Matthew, On 8/12/19 6:22 PM, Matthew Bobrowski wrote: > This patch series converts the ext4 direct IO code paths to make use of the > iomap infrastructure and removes the old buffer_head direct-io based > implementation. The result is that ext4 is converted to the newer framework > and that it may _possibly_ gain a performance boost for O_SYNC | O_DIRECT IO. > > These changes have been tested using xfstests in both DAX and non-DAX modes > using various configurations i.e. 4k, dioread_nolock, dax. I had some minor review comments posted on Patch-4. But the rest of the patch series looks good to me. I will also do some basic testing of xfstests which I did for my patches and will revert back. One query, could you please help answering below for my understanding :- I was under the assumption that we need to maintain ext4_test_inode_state(inode, EXT4_STATE_DIO_UNWRITTEN) or atomic_read(&EXT4_I(inode)->i_unwritten)) in case of non-AIO directIO or AIO directIO case as well (when we may allocate unwritten extents), to protect with some kind of race with other parts of code(maybe truncate/bufferedIO/fallocate not sure?) which may call for ext4_can_extents_be_merged() to check if extents can be merged or not. Is it not the case? Now that directIO code has no way of specifying that this inode has unwritten extent, will it not race with any other path, where this info was necessary (like in above func ext4_can_extents_be_merged())? Thanks Ritesh > > Matthew Bobrowski (5): > ext4: introduce direct IO read code path using iomap infrastructure > ext4: move inode extension/truncate code out from ext4_iomap_end() > iomap: modify ->end_io() calling convention > ext4: introduce direct IO write code path using iomap infrastructure > ext4: clean up redundant buffer_head direct IO code > > fs/ext4/ext4.h | 3 - > fs/ext4/extents.c | 8 +- > fs/ext4/file.c | 329 +++++++++++++++++++++++++++------- > fs/ext4/inode.c | 488 +++++--------------------------------------------- > fs/iomap/direct-io.c | 9 +- > fs/xfs/xfs_file.c | 17 +- > include/linux/iomap.h | 4 +- > 7 files changed, 322 insertions(+), 536 deletions(-) >