From patchwork Mon Dec 15 05:27:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 5490551 Return-Path: X-Original-To: patchwork-linux-nfs@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 92E499F1D4 for ; Mon, 15 Dec 2014 05:29:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3177209E7 for ; Mon, 15 Dec 2014 05:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBC4F209E5 for ; Mon, 15 Dec 2014 05:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751365AbaLOF3S (ORCPT ); Mon, 15 Dec 2014 00:29:18 -0500 Received: from mail-pd0-f176.google.com ([209.85.192.176]:36117 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbaLOF1m (ORCPT ); Mon, 15 Dec 2014 00:27:42 -0500 Received: by mail-pd0-f176.google.com with SMTP id r10so8977048pdi.21 for ; Sun, 14 Dec 2014 21:27:40 -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=E3w2t5XtKUQaSirkOEMT4oxEuiVjPkY3gLAPkihKdEY=; b=cGTg6Yvof9tHiTcwfwcDhL5WREVWLuPIPzF62+Kdl4oB8UQy400A1QYaJzYFMuIGAX BrNN8IZYG3xy2+Mfa1n6py3jEkZUZe+EmVUqB36rSo7mQgT1EbTDcfiQLlF327oIGbNK aooSZtke3ybXxidc1nJ/mjZwC87WOBoXHCdSrDG94bhWLvNUufy0ro3Ee56XsKCv5Jej rx5q2qU+fuI/z1i8HEz2gsfllZY6h/hPt6V4K9PnaMNnYi9+Ds8zAbxcPi9c0w0RJcIC +y3JU4lyrS2DEJyy/uRov+FaP/B4/iZXm7ug+V8fAv1wKqB651TlQrxv8T7vb9wIJ4Iv Ix7A== X-Gm-Message-State: ALoCoQkOv0mAG24q5sYFx54hYoD+1BLvHWK+NwscHt6BZ0fTUvXFyGyvIuGdp1GNH3MIhOCyeq7k X-Received: by 10.70.33.71 with SMTP id p7mr47775622pdi.111.1418621260452; Sun, 14 Dec 2014 21:27:40 -0800 (PST) Received: from mew.localdomain ([72.192.100.38]) by mx.google.com with ESMTPSA id f12sm7915174pdm.90.2014.12.14.21.27.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Dec 2014 21:27:39 -0800 (PST) From: Omar Sandoval To: Alexander Viro , Andrew Morton , Trond Myklebust , Christoph Hellwig , David Sterba , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Omar Sandoval Subject: [PATCH 8/8] vfs: update swap_{,de}activate documentation Date: Sun, 14 Dec 2014 21:27:02 -0800 Message-Id: <4bec542e3fd52d66d3381cd8b37decd9c28f3aad.1418618044.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 43ce050..a7c7974 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.