lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 24 Jan 2020 19:57:40 -0800 From: Randy Dunlap <rdunlap@...radead.org> To: Matthew Wilcox <willy@...radead.org>, linux-fsdevel@...r.kernel.org Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org, linux-erofs@...ts.ozlabs.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-xfs@...r.kernel.org, cluster-devel@...hat.com, ocfs2-devel@....oracle.com Subject: Re: [PATCH 04/12] mm: Add readahead address space operation On 1/24/20 5:35 PM, Matthew Wilcox wrote: > diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst > index 7d4d09dd5e6d..bb06fb7b120b 100644 > --- a/Documentation/filesystems/vfs.rst > +++ b/Documentation/filesystems/vfs.rst > @@ -706,6 +706,8 @@ cache in your filesystem. The following members are defined: > int (*readpage)(struct file *, struct page *); > int (*writepages)(struct address_space *, struct writeback_control *); > int (*set_page_dirty)(struct page *page); > + unsigned (*readahead)(struct file *filp, struct address_space *mapping, > + pgoff_t start, unsigned nr_pages); > int (*readpages)(struct file *filp, struct address_space *mapping, > struct list_head *pages, unsigned nr_pages); > int (*write_begin)(struct file *, struct address_space *mapping, > @@ -781,6 +783,15 @@ cache in your filesystem. The following members are defined: > If defined, it should set the PageDirty flag, and the > PAGECACHE_TAG_DIRTY tag in the radix tree. > > +``readahead`` > + called by the VM to read pages associated with the address_space > + object. The pages are consecutive in the page cache and are > + locked. The implementation should decrement the page refcount after > + attempting I/O on each page. Usually the page will be unlocked by > + the I/O completion handler. If the function does not attempt I/O on > + some pages, return the number of pages which were not read so the > + common code can unlock the pages for you. > + Please use consistent indentation (tabs). > ``readpages`` > called by the VM to read pages associated with the address_space > object. This is essentially just a vector version of readpage. cheers. -- ~Randy
Powered by blists - more mailing lists