Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1362813pxy; Fri, 23 Apr 2021 06:30:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxup7SCrA7vrVXdM6aGVe8q9zC0pktUHw6Ih5c8PYQ0CNlbku8svw5uG5VJOUTkD/bLc2DX X-Received: by 2002:a17:906:2c19:: with SMTP id e25mr4225543ejh.483.1619184641357; Fri, 23 Apr 2021 06:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619184641; cv=none; d=google.com; s=arc-20160816; b=TFnTZfzQ8/LKQGB2ANoB3DBb17VXD9uXrClUtSDR5P5+JupPTtUDuoCPlPQamEXi9H WTTxeTO+khMZkmI+sPh+a6UraeNtqvRT5kg2BITzUe2WzJ/tQGc30Dp0eTpaKYg58YeX u5gK4JEzOzPKO5k0MwL+hsgHO6AlHFjZ8DxMD0lyKjtKgHH9P/YOT59JIruBZpcDRaBM JwksMqpaHcxHk28vuGVneUxuVuzHZmoNWlpSeqpiHVa4UMMRliJoq2LBAbSd6B7ARSfc /wdcmSlPAPPkXMtpYRRHSUjIeY/eOSfjHcx8Tbscao+riyw9fX1vVYk/lfSyveaPzaLe iWBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=ZP14ALIYuZPou0SxoZZoF8mp5d1cnxDivk0AIESLRJ8=; b=yu4/noP96ZzzioVlwlO3C3HBM+49xZ3X0w1luFMorkRZXcl3SroOZ2SfRuXMaqg90d AXICSe3kh+jOBO66zMfNAbqkQLaPj1VPIDuiJ3v6gKsanQNGG0QdEctKvuCClGQmWcKz Hov9MLjrlz/VPkcBCr7QUouDqreTN7MAQ89IUmD19iWzcGvVcai5tz/NVW0fqgYX0EJh kUUt+hD2qpzBr4FV2/LaWVqCS3iLt3QfokBRJGwOMORYYiVOb3YDAKqZn28/2kHpCI/l BGgw+I194xDEZyNvqg8OkShUSdDR8QPyTfBqJ2eTnQ3L1TKVJWJI35tALoGhvhRKjKr+ 09ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fih4um4B; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si5051764eja.292.2021.04.23.06.30.18; Fri, 23 Apr 2021 06:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fih4um4B; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242783AbhDWNaE (ORCPT + 99 others); Fri, 23 Apr 2021 09:30:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59193 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242794AbhDWN31 (ORCPT ); Fri, 23 Apr 2021 09:29:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619184530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZP14ALIYuZPou0SxoZZoF8mp5d1cnxDivk0AIESLRJ8=; b=Fih4um4BYfy1UfaiJTkRQwfDTq7O5C65UQA8aj4nFW2toTJHALzqlTh+MnTa3Hv9c1PHdM 3cbLgSnRL5WfrxFjC7BLHn/9Ux14/zKBHAzbStR2oCJGvjGofZnKuY3Oj6sHLHn4MIdb+L SzxTRkluyoC84+40fI2Ei5KXg1f02mg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-552-tgNvLuqxOayAlSAX8AFf-g-1; Fri, 23 Apr 2021 09:28:48 -0400 X-MC-Unique: tgNvLuqxOayAlSAX8AFf-g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A3E4100A605; Fri, 23 Apr 2021 13:28:46 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-124.rdu2.redhat.com [10.10.112.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBFB160BE5; Fri, 23 Apr 2021 13:28:39 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH v7 04/31] fs: Document file_ra_state From: David Howells To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , Dave Wysochanski , Marc Dionne , dhowells@redhat.com, Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Jeff Layton , David Wysochanski , "Matthew Wilcox (Oracle)" , Alexander Viro , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org Date: Fri, 23 Apr 2021 14:28:39 +0100 Message-ID: <161918451911.3145707.17437110084860609102.stgit@warthog.procyon.org.uk> In-Reply-To: <161918446704.3145707.14418606303992174310.stgit@warthog.procyon.org.uk> References: <161918446704.3145707.14418606303992174310.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Matthew Wilcox (Oracle) Turn the comments into kernel-doc and improve the wording slightly. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne Link: https://lore.kernel.org/r/20210407201857.3582797-3-willy@infradead.org/ Link: https://lore.kernel.org/r/161789068619.6155.1397999970593531574.stgit@warthog.procyon.org.uk/ # v6 --- include/linux/fs.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index ec8f3ddf4a6a..33831a8bda52 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -891,18 +891,22 @@ struct fown_struct { int signum; /* posix.1b rt signal to be delivered on IO */ }; -/* - * Track a single file's readahead state +/** + * struct file_ra_state - Track a file's readahead state. + * @start: Where the most recent readahead started. + * @size: Number of pages read in the most recent readahead. + * @async_size: Start next readahead when this many pages are left. + * @ra_pages: Maximum size of a readahead request. + * @mmap_miss: How many mmap accesses missed in the page cache. + * @prev_pos: The last byte in the most recent read request. */ struct file_ra_state { - pgoff_t start; /* where readahead started */ - unsigned int size; /* # of readahead pages */ - unsigned int async_size; /* do asynchronous readahead when - there are only # of pages ahead */ - - unsigned int ra_pages; /* Maximum readahead window */ - unsigned int mmap_miss; /* Cache miss stat for mmap accesses */ - loff_t prev_pos; /* Cache last read() position */ + pgoff_t start; + unsigned int size; + unsigned int async_size; + unsigned int ra_pages; + unsigned int mmap_miss; + loff_t prev_pos; }; /*