Do we need to keep these coccinelle scripts for posterity? Or can they just
be included in the patch description of the patch that generates them?
David
Al Viro wrote:
> What's wrong with
> p_occupancy = pipe_occupancy(head, tail);
> if (p_occupancy >= pipe->max_usage)
> return 0;
> else
> return pipe->max_usage - p_occupancy;
Because "pipe->max_usage - p_occupancy" can be negative.
post_one_n
Hi Linus,
I posted a pull request for a fix for CVE-2020-26541:
https://lore.kernel.org/keyrings/1884195.1615482...@warthog.procyon.org.uk/
[GIT PULL] Add EFI_CERT_X509_GUID support for dbx/mokx entries
I'm guessing you're not going to pull it now for 5.12, so should I just
re
compound_head() in all the functions to make them THP safe[6].
v5:
- Add set and end functions, calling the end function end rather than
unlock[3].
- Keep a ref on the page when PG_private_2 is set[4][5].
v4:
- Remove extern from the declaration[2].
Suggested-by: Linus Torvalds
Signed-off-by: David
Drop the X argument from iterate_all_kinds() and use the B argument instead
as it's always the same unless the ITER_XARRAY is handled specially.
Signed-off-by: David Howells
---
lib/iov_iter.c | 42 --
1 file changed, 12 insertions(+), 30 dele
Remove iov_iter_for_each_range() as it's no longer used with the removal of
lustre.
Signed-off-by: David Howells
---
include/linux/uio.h |4
lib/iov_iter.c | 27 ---
2 files changed, 31 deletions(-)
diff --git a/include/linux/uio.h b/include/linux/
David Howells wrote:
> add/remove: 2/2 grow/shrink: 15/16 up/down: 408/-599 (-191)
> Function old new delta
> iomap_write_end_inline - 128+128
I can get rid of the iomap_write_end_inline() increase for my
Matthew Wilcox wrote:
> iirc i looked at doing this as part of the folio work, and it ended up
> increasing the size of the kernel. Did you run bloat-o-meter on the
> result of doing this?
add/remove: 2/2 grow/shrink: 15/16 up/down: 408/-599 (-191)
Function o
Matthew Wilcox wrote:
> On Fri, Apr 09, 2021 at 11:59:17AM +0100, David Howells wrote:
> > Make functions that test page bits return a bool, not an int. This means
> > that the value is definitely 0 or 1 if they're used in arithmetic, rather
> > than rely on test_b
"if (page_has_private()) try_to_release_page()"
combos. Does it make sense to have a pot this into an inline
function?
Signed-off-by: David Howells
cc: Linus Torvalds
cc: Matthew Wilcox
cc: Christoph Hellwig
cc: Josef Bacik
cc: Alexander Viro
cc: Andrew Morton
cc: linux
Make functions that test page bits return a bool, not an int. This means
that the value is definitely 0 or 1 if they're used in arithmetic, rather
than rely on test_bit() and friends to return this (though they probably
should).
Signed-off-by: David Howells
cc: Linus Torvalds
cc: Ma
Make the generic bitops return bool when returning the value of a tested
bit.
Signed-off-by: David Howells
cc: Linus Torvalds
cc: Matthew Wilcox
cc: Akinobu Mita
cc: Arnd Bergmann
cc: Will Deacon
---
include/asm-generic/bitops/atomic.h |6 +++---
include/asm-generic/bitops/le.h
Al Viro wrote:
> > +#define iterate_all_kinds(i, n, v, I, B, K, X) { \
>
> Do you have any users that would pass different B and X?
>
> > @@ -1440,7 +1665,7 @@ ssize_t iov_iter_get_pages_alloc(struct iov_iter *i,
> > return v.bv_len;
> > }),({
> > return -E
Linus Torvalds wrote:
> > #define PAGE_FLAGS_PRIVATE \
> > (1UL << PG_private | 1UL << PG_private_2)
>
> I think this should be re-named to be PAGE_FLAGS_CLEANUP, because I
> don't think it makes any other sense to "combine" the two PG_private*
> bits any more
it make sense to create a inline function for this?
Signed-off-by: David Howells
Link:
https://lore.kernel.org/linux-fsdevel/CAHk-=whwojhgemn85loh9fx-5d2-upzmv1m2zmyxvd31tkp...@mail.gmail.com/
[1]
---
fs/btrfs/disk-io.c |2 +-
fs/btrfs/inode.c |2 +-
f
a75
Author: David Howells
Date: Thu Apr 8 16:33:20 2021 +0100
netfs: Fix PG_private_2 helper functions to consistently use compound_head()
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index ef511364cc0c..63ca6430aef5 100644
--- a/include/linux/pagemap.h
+++ b/include/linux
Matthew Wilcox wrote:
> > +void end_page_private_2(struct page *page)
> > +{
> > + page = compound_head(page);
> > + VM_BUG_ON_PAGE(!PagePrivate2(page), page);
> > + clear_bit_unlock(PG_private_2, &page->flags);
> > + wake_up_page_bit(page, PG_private_2);
>
> ... but when we try to end o
Varad Gautam wrote:
> The test harness is available at [5].
Can you add this to the keyutils testsuite?
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git
David
Varad Gautam wrote:
> + Opt_slen, /* "slen=" eg. "slen=32" */
"slen" seems a bit unobvious. Maybe "saltlen=..."?
David
more advanced version of this could be made that does
generic_perform_write() for a whole cache granule. This would make it
easier to avoid doing the download/read for the data to be overwritten.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux
ded in error handling fixes to afs_req_issue_op().
- Added flag to netfs_subreq_terminated() to indicate that the caller may
have been running async and stuff that might sleep needs punting to a
workqueue.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.
e call
delivery handler.
This means the done function will be called back on error also, not just on
successful completion.
This allows motion towards asynchronous data reception on data fetch calls
and allows any error to be handed off to the fscache read helper in the
same place as a successful com
As a prelude to supporting transparent huge pages, use thp_size() and
similar rather than PAGE_SIZE/SHIFT.
Further, try and frame everything in terms of file positions and lengths
rather than page indices and numbers of pages.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc
Extract writeback extension into its own function to break up the writeback
function a bit.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/160588538471.3465195.782513375683399583.st
PG_fscache is going to be used to indicate that a page is being written to
the cache, and that the page should not be modified or released until it's
finished.
Make afs_invalidatepage() and afs_releasepage() wait for it.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc:
potentially allocating a huge array of bio_vec structs (max 256 per page)
when in fact the pagecache already has a structure listing all the relevant
pages (radix_tree/xarray) that can be walked over.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux
This will allow O_DIRECT calls to be supported in future patches.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/152898380012.11616.12094591785228251717.st...@warthog.procyon.org.uk/
Log unmarshalling errors reported by the peer (ie. it can't parse what we
sent it). Limit the maximum number of messages to 3.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.
e the
iterator.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/158861249201.340223.13035445866976590375.st...@warthog.procyon.org.uk/
# rfc
Link:
https://lore.kernel.
Stash the key used to authenticate read operations in the afs_read struct.
This will be necessary to reissue the operation against the server if a
read from the cache fails in upcoming cache changes.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc
Print the afs_operation debug_id when logging an unexpected change in the
data version. This allows the logged message to be matched against
tracelines.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https
e index or private
data as these can be retrieved directly from the page struct.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/160588527183.3465195.16107942526481976308.st...@warthog.proc
Add a tracepoint to log internal failures (such as cache errors) that we
don't otherwise want to pass back to the netfs.
Signed-off-by: David Howells
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc:
Disable use of the fscache I/O routined by the AFS filesystem. It's about
to transition to passing iov_iters down and fscache is about to have its
I/O path to use iov_iter, so all that needs to change.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redha
)[2].
- Remove explicit NULL initialiser[2].
- Remove extern on func decl[2].
- Put in param names on func decl[2].
- Remove redundant else[2].
- Fill out the kdoc comment for fscache_begin_read_operation().
- Rename fs/fscache/page2.c to io.c to match later patches.
Signed-off-by: David Howells
Revie
stuff that might sleep needs punting to a
workqueue (can't use in_softirq()[1]).
- Add missing inc of netfs_n_rh_read stat.
- Move initial definition of fscache_begin_read_operation() elsewhere.
- Need to call op->begin_cache_operation() from netfs_write_begin().
Signed-off-by: David Ho
Zheng Zengkai wrote:
> static int afs_dir_set_page_dirty(struct page *page)
> {
> BUG(); /* This should never happen. */
> + return 0;
> }
That shouldn't be necessary. BUG() should be marked as 'no return' to the
compiler. What arch and compiler are you using?
David
() to indicate that the caller may
have been running async and stuff that might sleep needs punting to a
workqueue (can't use in_softirq()[1]).
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc:
Gather statistics from the netfs interface that can be exported through a
seqfile. This is intended to be called by a later patch when viewing
/proc/fs/fscache/stats.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
requests. A read request may be a compound of multiple
subrequests.
(3) netfs/netfs_sreq
This logs the progress of netfs_read_subrequest objects, which track
the contributions from various sources to a read request.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew
nning async and stuff that might sleep needs punting to a
workqueue (can't use in_softirq()[1]).
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc:
functions into the
caching-specific headers rather than pagemap.h[1]]
Changes:
v5:
- Mirror the changes to the core routines[2].
Signed-off-by: David Howells
cc: Linus Torvalds
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux
Move the PG_fscache related helper funcs (such as SetPageFsCache()) to
linux/netfs.h rather than linux/fscache.h as the intention is to move to a
model where they're used by the network filesystem and the helper library,
but not by fscache/cachefiles itself.
Signed-off-by: David Howell
Add interface documentation for the netfs helper library.
Signed-off-by: David Howells
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc: linux-c...@vger.kernel.org
cc: ceph-de...@vger.kernel.org
cc: v9fs-develo
Make a netfs helper module to manage read request segmentation, caching
support and transparent huge page support on behalf of a network
filesystem.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux
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
Link: https://lore.kernel.org/r/20210407201857.3582797-3-wi...@infradead.org/
---
include/linux/fs.h | 24
declaration of readahead_expand() to a better place[1].
Suggested-by: Matthew Wilcox (Oracle)
Signed-off-by: David Howells
cc: Matthew Wilcox (Oracle)
cc: Alexander Viro
cc: Christoph Hellwig
cc: Mike Marshall
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc
d-off-by: David Howells
Link: https://lore.kernel.org/r/20210407201857.3582797-2-wi...@infradead.org/
---
fs/ext4/verity.c|2 +-
fs/f2fs/file.c |2 +-
fs/f2fs/verity.c|2 +-
include/linux/pagemap.h | 20 +++-
mm/filemap.c|4 ++-
end functions, calling the end function end rather than
unlock[3].
- Keep a ref on the page when PG_private_2 is set[4][5].
v4:
- Remove extern from the declaration[2].
Suggested-by: Linus Torvalds
Signed-off-by: David Howells
cc: Matthew Wilcox (Oracle)
cc: Alexander Viro
cc: Christoph
that would require
a bio_vec array to be allocated to refer to all the pages - which should be
redundant if inode->i_pages also points to all these pages.
Note that older versions of this patch implemented an ITER_MAPPING instead,
which was almost the same.
Signed-off-by: David Howells
cc: Alexan
017.1612263...@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/270998.1612265...@warthog.procyon.org.uk/
David
---
David Howells (28):
iov_iter: Add ITER_XARRAY
mm: Add set/end/wait functions for PG_private_2
mm: Implement readahead_control pageset expansion
netfs: Ma
Add a tracepoint to log internal failures (such as cache errors) that we
don't otherwise want to pass back to the netfs.
Signed-off-by: David Howells
---
fs/netfs/read_helper.c | 14 +-
include/trace/events/netfs.h | 58 ++
2
nough
data.
Instead, we only need to deal with contiguous subreqs and then ask the
cache to round off as it needs - which also means we don't have to make any
assumptions about the cache granularity.
Signed-off-by: David Howells
---
fs/cachefiles/io.c | 17
Don't record the copy termination error in the subrequest. We shouldn't
return it through netfs_readpage() or netfs_write_begin() as we don't let
the netfs see cache errors.
Signed-off-by: David Howells
---
fs/netfs/read_helper.c |2 --
1 file changed, 2 deletions(-)
Reorder the netfs library API functions slightly to log the netfs_read
tracepoint after calling out to the network filesystem to begin a caching
operation. This sets rreq->cookie_debug_id so that it can be logged in
tracepoints.
Signed-off-by: David Howells
---
fs/netfs/read_helper.c |
netfs_write_begin() needs to drop a ref on the read request if the network
filesystem gives an error when called to begin the caching op.
Signed-off-by: David Howells
---
fs/netfs/read_helper.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/netfs/read_helper.c b/fs/netfs
Hi Jeff,
Here's a bunch of fixes plus a tracepoint for the netfs library. I'm going
to roll them into other patches, but I'm posting them here for separate
review.
David
---
David Howells (5):
netfs: Fix a missing rreq put in netfs_write_begin()
netfs: Call t
Lv Yunlong wrote:
> In the case RXRPC_PACKET_TYPE_DATA of rxrpc_input_packet, if
> skb_unshare(skb,..) failed, it will free the skb and return NULL.
> But if skb_unshare() return NULL, the freed skb will be used by
> rxrpc_eaten_skb(skb,..).
That's not precisely the case:
void rxrpc_eat
Richard Weinberger wrote:
> On Wed, Mar 17, 2021 at 3:08 PM Ahmad Fatoum wrote:
> > keyctl add trusted $KEYNAME "load $(cat ~/kmk.blob)" @s
>
> Is there a reason why we can't pass the desired backend name in the
> trusted key parameters?
> e.g.
> keyctl add trusted $KEYNAME "backendtype caam
nership of the files wouldn't match to what they
expressed in the idmapping. Block cache files on idmapped mounts until
the fscache rework is done and we have ported it to support idmapped
mounts.
Signed-off-by: Christian Brauner
Signed-off-by: David Howells
Cc: linux-cach...@redhat.com
Link
Hi Linus,
Could you pull these patches from Matthew Wilcox to fix page
waiting-related issues in cachefiles and afs as extracted from his folio
series[1]:
(1) In cachefiles, remove the use of the wait_bit_key struct to access
something that's actually in wait_page_key format. The proper st
more advanced version of this could be made that does
generic_perform_write() for a whole cache granule. This would make it
easier to avoid doing the download/read for the data to be overwritten.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux
v4:
- Folded in error handling fixes to afs_req_issue_op().
- Added flag to netfs_subreq_terminated() to indicate that the caller may
have been running async and stuff that might sleep needs punting to a
workqueue.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-c
e call
delivery handler.
This means the done function will be called back on error also, not just on
successful completion.
This allows motion towards asynchronous data reception on data fetch calls
and allows any error to be handed off to the fscache read helper in the
same place as a successful com
As a prelude to supporting transparent huge pages, use thp_size() and
similar rather than PAGE_SIZE/SHIFT.
Further, try and frame everything in terms of file positions and lengths
rather than page indices and numbers of pages.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc
Extract writeback extension into its own function to break up the writeback
function a bit.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/160588538471.3465195.782513375683399583.st
PG_fscache is going to be used to indicate that a page is being written to
the cache, and that the page should not be modified or released until it's
finished.
Make afs_invalidatepage() and afs_releasepage() wait for it.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc:
potentially allocating a huge array of bio_vec structs (max 256 per page)
when in fact the pagecache already has a structure listing all the relevant
pages (radix_tree/xarray) that can be walked over.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux
This will allow O_DIRECT calls to be supported in future patches.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/152898380012.11616.12094591785228251717.st...@warthog.procyon.org.uk/
Log unmarshalling errors reported by the peer (ie. it can't parse what we
sent it). Limit the maximum number of messages to 3.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.
e the
iterator.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/158861249201.340223.13035445866976590375.st...@warthog.procyon.org.uk/
# rfc
Link:
https://lore.kernel.
Print the afs_operation debug_id when logging an unexpected change in the
data version. This allows the logged message to be matched against
tracelines.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https
Stash the key used to authenticate read operations in the afs_read struct.
This will be necessary to reissue the operation against the server if a
read from the cache fails in upcoming cache changes.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc
e index or private
data as these can be retrieved directly from the page struct.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redhat.com
cc: linux-fsde...@vger.kernel.org
Link:
https://lore.kernel.org/r/160588527183.3465195.16107942526481976308.st...@warthog.proc
Disable use of the fscache I/O routined by the AFS filesystem. It's about
to transition to passing iov_iters down and fscache is about to have its
I/O path to use iov_iter, so all that needs to change.
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux-cach...@redha
l[2].
- Remove redundant else[2].
- Fill out the kdoc comment for fscache_begin_read_operation().
- Rename fs/fscache/page2.c to io.c to match later patches.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Christoph Hellwig
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
ue (can't use in_softirq()[1]).
- Add missing inc of netfs_n_rh_read stat.
- Move initial definition of fscache_begin_read_operation() elsewhere.
- Need to call op->begin_cache_operation() from netfs_write_begin().
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matt
needs punting to a
workqueue (can't use in_softirq()[1]).
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc: linux-c...@vger.kernel.org
cc: ce
Gather statistics from the netfs interface that can be exported through a
seqfile. This is intended to be called by a later patch when viewing
/proc/fs/fscache/stats.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
requests. A read request may be a compound of multiple
subrequests.
(3) netfs/netfs_sreq
This logs the progress of netfs_read_subrequest objects, which track
the contributions from various sources to a read request.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew
nning async and stuff that might sleep needs punting to a
workqueue (can't use in_softirq()[1]).
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc:
functions into the
caching-specific headers rather than pagemap.h[1]]
Changes:
v5:
- Mirror the changes to the core routines[2].
Signed-off-by: David Howells
cc: Linus Torvalds
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux
Move the PG_fscache related helper funcs (such as SetPageFsCache()) to
linux/netfs.h rather than linux/fscache.h as the intention is to move to a
model where they're used by the network filesystem and the helper library,
but not by fscache/cachefiles itself.
Signed-off-by: David Howell
Add interface documentation for the netfs helper library.
Signed-off-by: David Howells
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc: linux-c...@vger.kernel.org
cc: ceph-de...@vger.kernel.org
cc: v9fs-develo
Make a netfs helper module to manage read request segmentation, caching
support and transparent huge page support on behalf of a network
filesystem.
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Matthew Wilcox
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux
boundaries, thereby allowing whole granules to be stored in the cache, but
there are other potential users also.
Changes:
- Moved the declaration of readahead_expand() to a better place[1].
Suggested-by: Matthew Wilcox (Oracle)
Signed-off-by: David Howells
cc: Matthew Wilcox (Oracle)
cc: Alexander Viro
end functions, calling the end function end rather than
unlock[3].
- Keep a ref on the page when PG_private_2 is set[4][5].
v4:
- Remove extern from the declaration[2].
Suggested-by: Linus Torvalds
Signed-off-by: David Howells
cc: Matthew Wilcox (Oracle)
cc: Alexander Viro
cc: Christoph
Add a function to wait killably on the PG_writeback page flag.
Signed-off-by: David Howells
cc: Matthew Wilcox (Oracle)
cc: Alexander Viro
cc: Christoph Hellwig
cc: linux...@kvack.org
cc: linux-cach...@redhat.com
cc: linux-...@lists.infradead.org
cc: linux-...@vger.kernel.org
cc: linux-c
that would require
a bio_vec array to be allocated to refer to all the pages - which should be
redundant if inode->i_pages also points to all these pages.
Note that older versions of this patch implemented an ITER_MAPPING instead,
which was almost the same.
Signed-off-by: David Howells
cc: Alexan
rnel.org/r/1514086.1605697...@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/1794123.1605713...@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/241017.1612263...@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/270998.1612265...@warthog.procyon.org.uk/
David
---
David Howell
David Howells wrote:
> > > - wait_on_page_writeback(page);
> > > + if (wait_on_page_writeback_killable(page) < 0)
> > > + return VM_FAULT_RETRY | VM_FAULT_LOCKED;
> >
> > You forgot to unlock the page.
>
> Do I need to? Doesn't V
Johannes Weiner wrote:
> So I fully agree with the motivation behind this patch. But I do
> wonder why it's special-casing the commmon case instead of the rare
> case. It comes at a huge cost. Short term, the churn of replacing
> 'page' with 'folio' in pretty much all instances is enormous.
>
>
Matthew Wilcox wrote:
> On Tue, Mar 23, 2021 at 01:17:20PM +0000, David Howells wrote:
> > +++ b/fs/afs/write.c
> > @@ -846,7 +846,7 @@ vm_fault_t afs_page_mkwrite(struct vm_fault *vmf)
> > */
> > #ifdef CONFIG_AFS_FSCACHE
&
David Howells wrote:
> Matthew Wilcox wrote:
>
> > That also brings up that there is no set_page_private_2(). I think
> > that's OK -- you only set PageFsCache() immediately after reading the
> > page from the server. But I feel this "
]
Fixes: 1cf7a1518aef ("afs: Implement shared-writeable mmap")
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux...@kvack.org
Link: https://lore.kernel.org/r/20210320054104.1300774-4-wi...@infr
From: Matthew Wilcox (Oracle)
This is the killable version of wait_on_page_writeback.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
Signed-off-by: David Howells
cc: linux-...@lists.infradead.org
cc: linux...@kvack.org
Link: https://lore.kernel.org/r
Linus[1] and that is no longer applicable.
Fixes: 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a
page bit")
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
Signed-off-by: David Howells
cc: linux-cach...@redhat.com
cc: linux...@kvack.org
L
Here are some patches to fix page waiting-related issues in cachefiles and
afs[1]:
(1) In cachefiles, remove the use of the wait_bit_key struct to access
something that's actually in wait_page_key format. The proper struct
is now available in the header, so that should be used instea
Matthew Wilcox (Oracle) wrote:
> Open-coding this function meant it missed out on the recent bugfix
Would that be:
c2407cf7d22d0c0d94cf20342b3b8f06f1d904e7
mm: make wait_on_page_writeback() wait for multiple pending writebacks
David
Matthew Wilcox wrote:
> > + while ((page = readahead_page(ractl)))
> > + put_page(page);
>
> You don't need this pair of lines (unless I'm missing something).
> read_pages() in mm/readahead.c puts the reference and unlocks any
> pages which are not read by the readahead op. Indeed,
1 - 100 of 4355 matches
Mail list logo