From patchwork Sat Dec 20 03:18:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 5521901 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 80C659F443 for ; Sat, 20 Dec 2014 03:19:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A89982014A for ; Sat, 20 Dec 2014 03:19:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BEF5920155 for ; Sat, 20 Dec 2014 03:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752745AbaLTDS6 (ORCPT ); Fri, 19 Dec 2014 22:18:58 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33955 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752811AbaLTDSv (ORCPT ); Fri, 19 Dec 2014 22:18:51 -0500 Received: by mail-pd0-f170.google.com with SMTP id v10so2373978pde.1 for ; Fri, 19 Dec 2014 19:18:51 -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=jjJcoLYVqoHiov2WdLl8d/Reg3iHadzwLrpthqWLS4A=; b=fMfhrrCljvFFfjoVEddIQuy2eBx1scGjtxn5YporoPyNw6ZRn3nn+a/AcJ2476TADY uu+ig6yrb7IcKWW8pXJLeomkWg9kCluQt2KkDLdDBrcRvjq9sdLxxfLxRA1xBiminHI6 msGEnznKKmCRvZOgJaY8T+6SeHY1DKthqeY4Y0hI9Dtt0rDEtN+9t6JYozPDh3KNeueZ LxrkTxiR4oudxge7lpQLH+7ANzJn1XVuWahNQXv29OuZWhGioC851xqoNPqKJDmrog5c 88ciPTd8MMhl/6O3tUGtzlgMox4beysM4gNd88wVSuBvy14/5WAyA/FJpTyaOJNHD/X4 l8VA== X-Gm-Message-State: ALoCoQlzduO+jGodgrhj+7Rba3qVHKCm4MarHxH0j3dIRdTw7fXp//U/tdDvqrk5A/IUg28eaWxm X-Received: by 10.70.129.233 with SMTP id nz9mr17435365pdb.114.1419045531363; Fri, 19 Dec 2014 19:18:51 -0800 (PST) Received: from mew.localdomain ([72.192.100.38]) by mx.google.com with ESMTPSA id uq15sm10972638pab.8.2014.12.19.19.18.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Dec 2014 19:18:50 -0800 (PST) From: Omar Sandoval To: Alexander Viro , Andrew Morton , Trond Myklebust , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Omar Sandoval Subject: [PATCH v2 5/5] vfs: update swap_{,de}activate documentation Date: Fri, 19 Dec 2014 19:18:29 -0800 Message-Id: <5bb833720e5f14f077e824c19d1213dd57a282c6.1419044605.git.osandov@osandov.com> X-Mailer: git-send-email 2.2.1 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 now we use ->{read,write}_iter. 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..9c793a7 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. + ->{read,write}_iter methods with O_DIRECT. swap_deactivate: Called during swapoff on files where swap_activate was successful.