From patchwork Wed Dec 10 01:45:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 5466291 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 18EB59F1D4 for ; Wed, 10 Dec 2014 01:53:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41CBC200E5 for ; Wed, 10 Dec 2014 01:53:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BDFE200DC for ; Wed, 10 Dec 2014 01:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756034AbaLJBxq (ORCPT ); Tue, 9 Dec 2014 20:53:46 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:53665 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753720AbaLJBqo (ORCPT ); Tue, 9 Dec 2014 20:46:44 -0500 Received: by mail-pd0-f171.google.com with SMTP id y13so1723687pdi.30 for ; Tue, 09 Dec 2014 17:46:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=y46sLejxXL34lOTGRQmJNUUZ03IWC9HrQUZtMOTfPjU=; b=kZi3OnoMBCzGf+OmF+D+Mb4+PO+F7RAATFGHxqZ8hWyiPptWLFexY0V0Gl3DpLD60Y KcL5UG2bL6qlpWcYzkTX4LovK1+W3A9AAjXXviSE/9WqtEIu7SwbXEfudMCxdgt0AlFA 7sEX79hBBAmVoeSfI3vXI4UBOtINAX++P3HAjfb8E4+DXor1kpkK+Dupkjgwcd87U2Dz 32cH2rqLqzyMckG8R6buawWvhxus+De9KhD8O96xwGjzD0TI2hE9CeEKtcgZgOJNwQng aPk2JJ/KDpk5cB9p6DNNyrJ42j9BGpfwRMO18pSDghcn6NlDT5xyojDm6wdLT7BQ+6yj HxdQ== X-Gm-Message-State: ALoCoQnXFidFreVCz0xWEtMqJe0bsCvre2AOLTORhVK1O6omDQBSK6VakJ3jM+QoasjXp9NFzxAX X-Received: by 10.68.190.229 with SMTP id gt5mr2135351pbc.119.1418176003771; Tue, 09 Dec 2014 17:46:43 -0800 (PST) Received: from mew.localdomain (c-24-19-133-29.hsd1.wa.comcast.net. [24.19.133.29]) by mx.google.com with ESMTPSA id on1sm2602957pdb.32.2014.12.09.17.46.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Dec 2014 17:46:43 -0800 (PST) From: Omar Sandoval To: Alexander Viro , Andrew Morton , Chris Mason , Josef Bacik , Trond Myklebust , Christoph Hellwig , David Sterba , linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Omar Sandoval Subject: [RFC PATCH v3 4/7] vfs: update swap_{,de}activate documentation Date: Tue, 9 Dec 2014 17:45:45 -0800 Message-Id: <5db0fd93b5de36b81625fc3f640caff2411ef996.1418173063.git.osandov@osandov.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Parameters were added to swap_activate in the same patch series that introduced it without updating the documentation. Additionally, the documentation claims that non-existent address space operations swap_{in,out} are used for swap I/O, but it's (now) direct_IO. Signed-off-by: Omar Sandoval --- Documentation/filesystems/Locking | 7 ++++--- Documentation/filesystems/vfs.txt | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index b30753c..e72b4c3 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -205,7 +205,8 @@ prototypes: int (*launder_page)(struct page *); int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); int (*error_remove_page)(struct address_space *, struct page *); - int (*swap_activate)(struct file *); + int (*swap_activate)(struct swap_info_struct *, struct file *, + sector_t *); int (*swap_deactivate)(struct file *); locking rules: @@ -230,8 +231,8 @@ migratepage: yes (both) launder_page: yes is_partially_uptodate: yes error_remove_page: yes -swap_activate: no -swap_deactivate: no +swap_activate: yes +swap_deactivate: no ->write_begin(), ->write_end(), ->sync_page() and ->readpage() may be called from the request handler (/dev/loop). diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 20bf204..46ef103 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -600,8 +600,9 @@ struct address_space_operations { unsigned long); void (*is_dirty_writeback) (struct page *, bool *, bool *); int (*error_remove_page) (struct mapping *mapping, struct page *page); - int (*swap_activate)(struct file *); - int (*swap_deactivate)(struct file *); + int (*swap_activate)(struct swap_info_struct *, struct file *, + sector_t *); + void (*swap_deactivate)(struct file *); }; writepage: called by the VM to write a dirty page to backing store. @@ -788,7 +789,7 @@ struct address_space_operations { memory. A return value of zero indicates success, in which case this file can be used to back swapspace. The swapspace operations will be proxied to this address space's - ->swap_{out,in} methods. + ->direct_IO method for both reads and writes. swap_deactivate: Called during swapoff on files where swap_activate was successful.