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: 5466311 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 567C0BEEA8 for ; Wed, 10 Dec 2014 01:54:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88143200E7 for ; Wed, 10 Dec 2014 01:54:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 964C3200E6 for ; Wed, 10 Dec 2014 01:54:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753720AbaLJBxw (ORCPT ); Tue, 9 Dec 2014 20:53:52 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:44953 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753666AbaLJBqo (ORCPT ); Tue, 9 Dec 2014 20:46:44 -0500 Received: by mail-pd0-f169.google.com with SMTP id z10so1718631pdj.28 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=KAU0BwaLyw7aI2hHVFvSg1FMOeK43JiV8S4M8s1v8Wq2dQ70K5n9wzhCuxKaI4oEh6 gqTNZpdy2bYAl5rH0PEc5Qwi38pC9cQTFv5WGeiSQi7ucxhXeLhgsjw3HlZJI1NXLanO Mj5m9hZBiqACRHaHkPxT8MYNXbw6qVF1ZCquQ7sAQ1qIkZB1rIMhHcIzLXaogMsk0phe 6pkqbs0EvhnAjByuNnlL3mUJBE7dnGknb2Fn/fCdUM0CawNxVwolGne35WlX7WKZXkAT UE1cdiKFddz1XeK+V59ljo9vta/87siqJI+kCdnwe6V8rByZ2f+0PfqnkPo5s70CO8Io gu8g== X-Gm-Message-State: ALoCoQktLQ8CsRQGW8fCQzrvjjv9OxPNQDWYXZkwLMTImwlZZpcVWCL0CRZJ+8Vohkvy1w47BDPs 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-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@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.