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-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

- Properly handle errors when file-backed I/O fails

- Fix compilation issues on ARM platform (arm-linux-gnueabi)

- Fix parsing of encoded extents

- Minor cleanup

* tag 'erofs-for-6.15-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: remove duplicate code
erofs: fix encoded extents handling
erofs: add __packed annotation to union(__le16..)
erofs: set error to bio if file-backed IO fails

+9 -7
+4 -4
fs/erofs/erofs_fs.h
··· 56 56 union { 57 57 __le16 rootnid_2b; /* nid of root directory */ 58 58 __le16 blocks_hi; /* (48BIT on) blocks count MSB */ 59 - } rb; 59 + } __packed rb; 60 60 __le64 inos; /* total valid ino # (== f_files - f_favail) */ 61 61 __le64 epoch; /* base seconds used for compact inodes */ 62 62 __le32 fixed_nsec; /* fixed nanoseconds for compact inodes */ ··· 148 148 __le16 nlink; /* if EROFS_I_NLINK_1_BIT is unset */ 149 149 __le16 blocks_hi; /* total blocks count MSB */ 150 150 __le16 startblk_hi; /* starting block number MSB */ 151 - }; 151 + } __packed; 152 152 153 153 /* 32-byte reduced form of an ondisk inode */ 154 154 struct erofs_inode_compact { ··· 369 369 * bit 7 : pack the whole file into packed inode 370 370 */ 371 371 __u8 h_clusterbits; 372 - }; 372 + } __packed; 373 373 __le16 h_extents_hi; /* extent count MSB */ 374 - }; 374 + } __packed; 375 375 }; 376 376 377 377 enum {
+2
fs/erofs/fileio.c
··· 32 32 ret = 0; 33 33 } 34 34 if (rq->bio.bi_end_io) { 35 + if (ret < 0 && !rq->bio.bi_status) 36 + rq->bio.bi_status = errno_to_blk_status(ret); 35 37 rq->bio.bi_end_io(&rq->bio); 36 38 } else { 37 39 bio_for_each_folio_all(fi, &rq->bio) {
-1
fs/erofs/zdata.c
··· 725 725 lockref_init(&pcl->lockref); /* one ref for this request */ 726 726 pcl->algorithmformat = map->m_algorithmformat; 727 727 pcl->pclustersize = map->m_plen; 728 - pcl->pageofs_in = pageofs_in; 729 728 pcl->length = 0; 730 729 pcl->partial = true; 731 730 pcl->next = fe->head;
+3 -2
fs/erofs/zmap.c
··· 559 559 pos += sizeof(__le64); 560 560 lstart = 0; 561 561 } else { 562 - lstart = map->m_la >> vi->z_lclusterbits; 562 + lstart = round_down(map->m_la, 1 << vi->z_lclusterbits); 563 + pos += (lstart >> vi->z_lclusterbits) * recsz; 563 564 pa = EROFS_NULL_ADDR; 564 565 } 565 566 ··· 615 614 if (last && (vi->z_advise & Z_EROFS_ADVISE_FRAGMENT_PCLUSTER)) { 616 615 map->m_flags |= EROFS_MAP_MAPPED | EROFS_MAP_FRAGMENT; 617 616 vi->z_fragmentoff = map->m_plen; 618 - if (recsz >= offsetof(struct z_erofs_extent, pstart_lo)) 617 + if (recsz > offsetof(struct z_erofs_extent, pstart_lo)) 619 618 vi->z_fragmentoff |= map->m_pa << 32; 620 619 } else if (map->m_plen) { 621 620 map->m_flags |= EROFS_MAP_MAPPED |