From patchwork Tue Aug 28 00:03:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 10577669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 825C315A7 for ; Tue, 28 Aug 2018 00:03:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C83429DC1 for ; Tue, 28 Aug 2018 00:03:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 609D729DB4; Tue, 28 Aug 2018 00:03:40 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 F2E8129DB4 for ; Tue, 28 Aug 2018 00:03:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727226AbeH1DwX (ORCPT ); Mon, 27 Aug 2018 23:52:23 -0400 Received: from mail-pl1-f170.google.com ([209.85.214.170]:42608 "EHLO mail-pl1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbeH1DwX (ORCPT ); Mon, 27 Aug 2018 23:52:23 -0400 Received: by mail-pl1-f170.google.com with SMTP id g23-v6so306951plq.9 for ; Mon, 27 Aug 2018 17:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=qnjuXvLKhu/5apfY/FKSqk48J572uTnZZqTVXN4g5pc=; b=k5YIJreQlr0KxqRRQLDk/zMCVMmd8E8Yl5l5wvcL91cn16Xo3v8cSlQGt5drOrf4lU 5bOTV2rjkwvK9enwaKhKVwGjU9pQR11ec2CBUiVqKz9VlExNJNx76TjyF5Q49iSSQ81u Qjhd1f/pWSQP+qkN3rd2CSmwx64EYHKNKdRebpq2eviOwywkJuokR7UuD+v29rB/X20t Y3hc3o5uuQI9+z9iO9kPm8VemRadBszh4l2lrXefMDCUx7pUu+mN3aNMcnull/ghtXvw 9ojB6zPlvPzxlqAXlcZ14NlJkw4RNSZdIvn4HQ9ynLofI3lTcNIYUnAwpTdAbiqJhLKL 1+9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qnjuXvLKhu/5apfY/FKSqk48J572uTnZZqTVXN4g5pc=; b=EVfgmdwRaVY7slSvBxsA1SjoxrVhrlVs8Mi83ABlYmJOJeT93FsE8NMqKfgBUYTKes SZM7Xx0oMCFMztZ78//RUGfVWxRpQAzls6ltUDEmdzYFf5ZdGJ3TAFwRYsiUO1QERcUB zHGI7dX9hZZZQRlkqnQf/BI/LqGzikhQ6aBkUC8yW3wZ/cEzsGgG6uYYzMX55rXwlSxE G5iKmGzQbRAKi43nE48wGaEsYGHwyjSw9zOp+ZEUa//A0AoYjdZIjpsJtraYZ0RutOG/ 7INciJNnXy2CmilA75PWU6I3+nEPLtZ7dopTAiXfnTyBF4rxcEipAR6FTpLWS5i3YlUw rLMA== X-Gm-Message-State: APzg51CwmqfOVlJhYgaN9wlc+sDe3zcAiMsZllCEbPc32Ou8vyG86Lu6 eQ9iyGOHijYRmWGPPwkbuB2DMMxynbQ= X-Google-Smtp-Source: ANB0VdYBSeObKtqanQBteUHDx09teQRGldspII96CFPYbFe7q/an3C8t64omXA4mOetcrf82fJGoYw== X-Received: by 2002:a17:902:8605:: with SMTP id f5-v6mr14798102plo.271.1535414608463; Mon, 27 Aug 2018 17:03:28 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:200::7:5f0c]) by smtp.gmail.com with ESMTPSA id z22-v6sm455315pgc.67.2018.08.27.17.03.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 17:03:28 -0700 (PDT) From: Omar Sandoval To: linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, Al Viro Cc: David Sterba , kernel-team@fb.com Subject: [RFC PATCH v2 0/6] Btrfs: stop abusing current->journal_info for direct I/O Date: Mon, 27 Aug 2018 17:03:13 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 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: Omar Sandoval Hi, This is a different approach from v1 [1] of this series to stop abusing current->journal_info in Btrfs. This approach unifies everything to use iocb->private instead of map_bh->b_private. Patches 1 and 5 pass the iocb to a couple of callbacks which need it. Patches 2 and 3 migrates the users of b_private to use iocb->private, and patch 4 gets rid of the b_private handling in the direct I/O code. Patch 6 cleans up Btrfs. I'm not convinced that this is cleaner that my first approach, but it at least avoids growing the argument list to do_blockdev_direct_IO(), which was Al's complaint of v1. Thanks! 1: https://www.spinics.net/lists/linux-btrfs/msg77859.html Omar Sandoval (6): fs: pass iocb to direct I/O get_block() ext4: use iocb->private instead of bh->b_private ocfs2: use iocb->private instead of bh->b_private fs: stop propagating bh->b_private for direct I/O fs: pass iocb to direct I/O submit_io() Btrfs: stop abusing current->journal_info in btrfs_direct_IO() fs/affs/file.c | 9 ++++++- fs/btrfs/inode.c | 36 +++++++------------------ fs/direct-io.c | 23 +++++++--------- fs/ext2/inode.c | 9 ++++++- fs/ext4/ext4.h | 2 -- fs/ext4/inode.c | 40 ++++++++++++++++------------ fs/f2fs/data.c | 5 ++-- fs/fat/inode.c | 9 ++++++- fs/gfs2/aops.c | 5 ++-- fs/hfs/inode.c | 9 ++++++- fs/hfsplus/inode.c | 9 ++++++- fs/jfs/inode.c | 9 ++++++- fs/nilfs2/inode.c | 9 ++++++- fs/ocfs2/aops.c | 39 ++++++++++++++------------- fs/ocfs2/aops.h | 64 ++++++++++++++++++++++++++++++--------------- fs/reiserfs/inode.c | 4 +-- fs/udf/inode.c | 9 ++++++- include/linux/fs.h | 17 ++++++------ 18 files changed, 187 insertions(+), 120 deletions(-)