Commit a9eb558
committed
afs: Stop implementing ->writepage()
We're trying to get rid of the ->writepage() hook[1]. Stop afs from using
it by unlocking the page and calling afs_writepages_region() rather than
folio_write_one().
A flag is passed to afs_writepages_region() to indicate that it should only
write a single region so that we don't flush the entire file in
->write_begin(), but do add other dirty data to the region being written to
try and reduce the number of RPC ops.
This requires ->migrate_folio() to be implemented, so point that at
filemap_migrate_folio() for files and also for symlinks and directories.
This can be tested by turning on the afs_folio_dirty tracepoint and then
doing something like:
xfs_io -c "w 2223 7000" -c "w 15000 22222" -c "w 23 7" /afs/my/test/foo
and then looking in the trace to see if the write at position 15000 gets
stored before page 0 gets dirtied for the write at position 23.
Signed-off-by: David Howells <[email protected]>
cc: Marc Dionne <[email protected]>
cc: Christoph Hellwig <[email protected]>
cc: Matthew Wilcox <[email protected]>
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]/ [1]
Link: https://lore.kernel.org/r/166876785552.222254.4403222906022558715.stgit@warthog.procyon.org.uk/ # v11 parent b3d3ca5 commit a9eb558
3 files changed
+50
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
| |||
80 | 104 | | |
81 | 105 | | |
82 | 106 | | |
83 | | - | |
| 107 | + | |
| 108 | + | |
84 | 109 | | |
85 | 110 | | |
86 | 111 | | |
| |||
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
102 | | - | |
103 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
104 | 136 | | |
105 | 137 | | |
106 | 138 | | |
| |||
663 | 695 | | |
664 | 696 | | |
665 | 697 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | 698 | | |
695 | 699 | | |
696 | 700 | | |
697 | 701 | | |
698 | 702 | | |
699 | | - | |
| 703 | + | |
| 704 | + | |
700 | 705 | | |
701 | 706 | | |
702 | 707 | | |
| |||
775 | 780 | | |
776 | 781 | | |
777 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
778 | 786 | | |
779 | 787 | | |
780 | 788 | | |
| |||
806 | 814 | | |
807 | 815 | | |
808 | 816 | | |
809 | | - | |
| 817 | + | |
| 818 | + | |
810 | 819 | | |
811 | 820 | | |
812 | 821 | | |
813 | 822 | | |
814 | | - | |
| 823 | + | |
815 | 824 | | |
816 | 825 | | |
817 | 826 | | |
818 | 827 | | |
819 | 828 | | |
820 | 829 | | |
821 | | - | |
| 830 | + | |
| 831 | + | |
822 | 832 | | |
823 | 833 | | |
824 | 834 | | |
825 | 835 | | |
826 | | - | |
| 836 | + | |
| 837 | + | |
827 | 838 | | |
828 | 839 | | |
829 | 840 | | |
| |||
0 commit comments