Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'erofs-for-6.15-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

- Add a new reviewer, Hongbo Li, for better community development

- Fix an I/O hang out of file-backed mounts

- Address a rare data corruption caused by concurrent I/Os on the same
deduplicated compressed data

- Minor cleanup

* tag 'erofs-for-6.15-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: ensure the extra temporary copy is valid for shortened bvecs
erofs: remove unused enum type
fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()
MAINTAINERS: erofs: add myself as reviewer

+16 -19
+1
MAINTAINERS
··· 8727 8727 R: Yue Hu <zbestahu@gmail.com> 8728 8728 R: Jeffle Xu <jefflexu@linux.alibaba.com> 8729 8729 R: Sandeep Dhavale <dhavale@google.com> 8730 + R: Hongbo Li <lihongbo22@huawei.com> 8730 8731 L: linux-erofs@lists.ozlabs.org 8731 8732 S: Maintained 8732 8733 W: https://erofs.docs.kernel.org
+2 -2
fs/erofs/fileio.c
··· 150 150 io->rq->bio.bi_iter.bi_sector = io->dev.m_pa >> 9; 151 151 attached = 0; 152 152 } 153 - if (!attached++) 154 - erofs_onlinefolio_split(folio); 155 153 if (!bio_add_folio(&io->rq->bio, folio, len, cur)) 156 154 goto io_retry; 155 + if (!attached++) 156 + erofs_onlinefolio_split(folio); 157 157 io->dev.m_pa += len; 158 158 } 159 159 cur += len;
-1
fs/erofs/super.c
··· 357 357 enum { 358 358 Opt_user_xattr, Opt_acl, Opt_cache_strategy, Opt_dax, Opt_dax_enum, 359 359 Opt_device, Opt_fsid, Opt_domain_id, Opt_directio, 360 - Opt_err 361 360 }; 362 361 363 362 static const struct constant_table erofs_param_cache_strategy[] = {
+13 -16
fs/erofs/zdata.c
··· 79 79 /* L: whether partial decompression or not */ 80 80 bool partial; 81 81 82 - /* L: indicate several pageofs_outs or not */ 83 - bool multibases; 84 - 85 82 /* L: whether extra buffer allocations are best-effort */ 86 83 bool besteffort; 87 84 ··· 1043 1046 break; 1044 1047 1045 1048 erofs_onlinefolio_split(folio); 1046 - if (f->pcl->pageofs_out != (map->m_la & ~PAGE_MASK)) 1047 - f->pcl->multibases = true; 1048 1049 if (f->pcl->length < offset + end - map->m_la) { 1049 1050 f->pcl->length = offset + end - map->m_la; 1050 1051 f->pcl->pageofs_out = map->m_la & ~PAGE_MASK; ··· 1088 1093 struct page *onstack_pages[Z_EROFS_ONSTACK_PAGES]; 1089 1094 struct super_block *sb; 1090 1095 struct z_erofs_pcluster *pcl; 1091 - 1092 1096 /* pages with the longest decompressed length for deduplication */ 1093 1097 struct page **decompressed_pages; 1094 1098 /* pages to keep the compressed data */ ··· 1096 1102 struct list_head decompressed_secondary_bvecs; 1097 1103 struct page **pagepool; 1098 1104 unsigned int onstack_used, nr_pages; 1105 + /* indicate if temporary copies should be preserved for later use */ 1106 + bool keepxcpy; 1099 1107 }; 1100 1108 1101 1109 struct z_erofs_bvec_item { ··· 1108 1112 static void z_erofs_do_decompressed_bvec(struct z_erofs_backend *be, 1109 1113 struct z_erofs_bvec *bvec) 1110 1114 { 1115 + int poff = bvec->offset + be->pcl->pageofs_out; 1111 1116 struct z_erofs_bvec_item *item; 1112 - unsigned int pgnr; 1117 + struct page **page; 1113 1118 1114 - if (!((bvec->offset + be->pcl->pageofs_out) & ~PAGE_MASK) && 1115 - (bvec->end == PAGE_SIZE || 1116 - bvec->offset + bvec->end == be->pcl->length)) { 1117 - pgnr = (bvec->offset + be->pcl->pageofs_out) >> PAGE_SHIFT; 1118 - DBG_BUGON(pgnr >= be->nr_pages); 1119 - if (!be->decompressed_pages[pgnr]) { 1120 - be->decompressed_pages[pgnr] = bvec->page; 1119 + if (!(poff & ~PAGE_MASK) && (bvec->end == PAGE_SIZE || 1120 + bvec->offset + bvec->end == be->pcl->length)) { 1121 + DBG_BUGON((poff >> PAGE_SHIFT) >= be->nr_pages); 1122 + page = be->decompressed_pages + (poff >> PAGE_SHIFT); 1123 + if (!*page) { 1124 + *page = bvec->page; 1121 1125 return; 1122 1126 } 1127 + } else { 1128 + be->keepxcpy = true; 1123 1129 } 1124 1130 1125 1131 /* (cold path) one pcluster is requested multiple times */ ··· 1287 1289 .alg = pcl->algorithmformat, 1288 1290 .inplace_io = overlapped, 1289 1291 .partial_decoding = pcl->partial, 1290 - .fillgaps = pcl->multibases, 1292 + .fillgaps = be->keepxcpy, 1291 1293 .gfp = pcl->besteffort ? GFP_KERNEL : 1292 1294 GFP_NOWAIT | __GFP_NORETRY 1293 1295 }, be->pagepool); ··· 1344 1346 1345 1347 pcl->length = 0; 1346 1348 pcl->partial = true; 1347 - pcl->multibases = false; 1348 1349 pcl->besteffort = false; 1349 1350 pcl->bvset.nextpage = NULL; 1350 1351 pcl->vcnt = 0;