From patchwork Tue Feb 28 23:36:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 9597269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9974D600CB for ; Wed, 1 Mar 2017 00:59:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ADF127F7F for ; Wed, 1 Mar 2017 00:59:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F7D428490; Wed, 1 Mar 2017 00:59:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3246A27F7F for ; Wed, 1 Mar 2017 00:59:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751909AbdCAA6g (ORCPT ); Tue, 28 Feb 2017 19:58:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:55557 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751737AbdCAA6c (ORCPT ); Tue, 28 Feb 2017 19:58:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9920CAC27; Tue, 28 Feb 2017 23:36:44 +0000 (UTC) From: Goldwyn Rodrigues To: jack@suse.com Cc: hch@infradead.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, Goldwyn Rodrigues Subject: [PATCH 4/8] nowait aio: Introduce IOMAP_NOWAIT Date: Tue, 28 Feb 2017 17:36:06 -0600 Message-Id: <20170228233610.25456-5-rgoldwyn@suse.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170228233610.25456-1-rgoldwyn@suse.de> References: <20170228233610.25456-1-rgoldwyn@suse.de> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Goldwyn Rodrigues IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps. This is used by XFS in the XFS patch. Signed-off-by: Goldwyn Rodrigues --- fs/iomap.c | 2 ++ include/linux/iomap.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/iomap.c b/fs/iomap.c index a51cb4c..3fb68d2 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -883,6 +883,8 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, struct iomap_ops *ops, } else { dio->flags |= IOMAP_DIO_WRITE; flags |= IOMAP_WRITE; + if (iocb->ki_flags & IOCB_NOWAIT) + flags |= IOMAP_NOWAIT; } if (mapping->nrpages) { diff --git a/include/linux/iomap.h b/include/linux/iomap.h index a4c94b8..d1c33ef 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -51,6 +51,7 @@ struct iomap { #define IOMAP_REPORT (1 << 2) /* report extent status, e.g. FIEMAP */ #define IOMAP_FAULT (1 << 3) /* mapping for page fault */ #define IOMAP_DIRECT (1 << 4) /* direct I/O */ +#define IOMAP_NOWAIT (1 << 5) /* Don't wait for writeback */ struct iomap_ops { /*