Commit 491b110
committed
erofs: adapt folios for z_erofs_readahead()
It's a straight-forward conversion except that readahead_folio()
will do folio_put() in advance but it doesn't matter since folios
are still locked.
As before, since file-backed folios (pages for now) are locked, so
we could temporarily use folio->private as an internal counter to
indicate split parts of each folio for the corresponding pclusters
to decompress.
When such counter becomes zero, the folio will be finally unlocked
(see compress.h and z_erofs_onlinepage_endio()).
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230817082813.81180-7-hsiangkao@linux.alibaba.com1 parent 06ec036 commit 491b110
1 file changed
Lines changed: 15 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1853 | 1853 | | |
1854 | 1854 | | |
1855 | 1855 | | |
1856 | | - | |
1857 | | - | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1858 | 1859 | | |
1859 | 1860 | | |
1860 | 1861 | | |
1861 | 1862 | | |
1862 | | - | |
1863 | | - | |
| 1863 | + | |
| 1864 | + | |
1864 | 1865 | | |
1865 | | - | |
1866 | | - | |
1867 | | - | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1868 | 1869 | | |
1869 | 1870 | | |
| 1871 | + | |
1870 | 1872 | | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
1875 | | - | |
| 1873 | + | |
| 1874 | + | |
1876 | 1875 | | |
1877 | | - | |
| 1876 | + | |
1878 | 1877 | | |
1879 | | - | |
1880 | | - | |
1881 | | - | |
| 1878 | + | |
| 1879 | + | |
1882 | 1880 | | |
1883 | 1881 | | |
1884 | 1882 | | |
1885 | 1883 | | |
1886 | | - | |
| 1884 | + | |
1887 | 1885 | | |
1888 | 1886 | | |
1889 | 1887 | | |
| |||
0 commit comments