summaryrefslogtreecommitdiff
path: root/include/linux/build-salt.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-03-27 11:51:38 +0300
committerDavid Howells <dhowells@redhat.com>2024-05-01 20:07:06 +0300
commit74e797d79cf131d9b1a54001cf64a0b492a83e60 (patch)
tree14e52b44526e1bc0af0f9168715a33082a0b46fd /include/linux/build-salt.h
parent120b878158cb2e98b167fef038f81c05efe2fd14 (diff)
downloadlinux-74e797d79cf131d9b1a54001cf64a0b492a83e60.tar.xz
mm: Provide a means of invalidation without using launder_folio
Implement a replacement for launder_folio. The key feature of invalidate_inode_pages2() is that it locks each folio individually, unmaps it to prevent mmap'd accesses interfering and calls the ->launder_folio() address_space op to flush it. This has problems: firstly, each folio is written individually as one or more small writes; secondly, adjacent folios cannot be added so easily into the laundry; thirdly, it's yet another op to implement. Instead, use the invalidate lock to cause anyone wanting to add a folio to the inode to wait, then unmap all the folios if we have mmaps, then, conditionally, use ->writepages() to flush any dirty data back and then discard all pages. The invalidate lock prevents ->read_iter(), ->write_iter() and faulting through mmap all from adding pages for the duration. This is then used from netfslib to handle the flusing in unbuffered and direct writes. Signed-off-by: David Howells <dhowells@redhat.com> cc: Matthew Wilcox <willy@infradead.org> cc: Miklos Szeredi <miklos@szeredi.hu> cc: Trond Myklebust <trond.myklebust@hammerspace.com> cc: Christoph Hellwig <hch@lst.de> cc: Andrew Morton <akpm@linux-foundation.org> cc: Alexander Viro <viro@zeniv.linux.org.uk> cc: Christian Brauner <brauner@kernel.org> cc: Jeff Layton <jlayton@kernel.org> cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org cc: netfs@lists.linux.dev cc: v9fs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: ceph-devel@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: devel@lists.orangefs.org
Diffstat (limited to 'include/linux/build-salt.h')
0 files changed, 0 insertions, 0 deletions