]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Wrap page->private manipulations in inline functions
authorDavid Howells <dhowells@redhat.com>
Mon, 26 Oct 2020 13:22:47 +0000 (13:22 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 29 Oct 2020 13:53:04 +0000 (13:53 +0000)
commit01dc7371cdf288fc4a78147803c74017f6aca83c
tree01355ebab583d813e1a38823473626d0eb9aa046
parent9d4ac2f464e84f1ac87cfefe0a3d1bc997f0fd0b
afs: Wrap page->private manipulations in inline functions

The afs filesystem uses page->private to store the dirty range within a
page such that in the event of a conflicting 3rd-party write to the server,
we write back just the bits that got changed locally.

However, there are a couple of problems with this:

 (1) I need a bit to note if the page might be mapped so that partial
     invalidation doesn't shrink the range.

 (2) There aren't necessarily sufficient bits to store the entire range of
     data altered (say it's a 32-bit system with 64KiB pages or transparent
     huge pages are in use).

So wrap the accesses in inline functions so that future commits can change
how this works.

Also move them out of the tracing header into the in-directory header.
There's not really any need for them to be in the tracing header.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/internal.h
fs/afs/write.c
include/trace/events/afs.h