mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
Changes since last update:
- 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. -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmf77FERHHhpYW5nQGtl cm5lbC5vcmcACgkQUXZn5Zlu5qpaCA/9FJOs6vOXnXZE1DXiwHwi+0lFLfUV+zhS YW09BtYmrLj+gOuSQxXqha09xZdq0DN91hYCLYeFadGM8DPTSJqOWUFZrFNDBWJr GDnpTbkv6LtHz5oG7DRm7CvsFtQ61vkP5K+JFPEVFLlS4y/mVYXWK61VwEkqPk5M XSHKE2JGf9gD9zroRqrm/jwNKugGJnhGlZ/Q0F/6LmCVancPIaFd9lBrrGpgdHo4 Hg+w9uQLr+uGSHZLr1CF4/t6LaesxOmVYc8ajubQW4oekb2q+GmhyTSSwVjZUYT7 MKhLDmc7/rnSxPosnAGV5oZrnQVwj7L8Q2TQOEKNI8nFzpevQB6mEuei0Cg5YTvs uLz0mwaO3g9o5EnCmSCcLHdmQbBgJyTm9fZrziTBJC2bnBl2Ym0pzuQ6crJAlUdr vfSnRkD8UlEG9C0kJNwKtDEaylPSRAnmXcaEHgauQCWc9ECLn2gevbpecbgXSFGj 88Vr91VT4ormb6bA42TtNVxOP5bdrzX3UkxbWf+1ZLKmvQQQP7zl1PUJJlaqyfFW XLl4sKAnEuHvYPJUUw0k/fMuiR8g7+UVZVn+VFpkQUcmZ3oevwwBRPIndwDfErcY DcrWUm1qJpawKjIB1M2nfuFIgNeHm35bbS5YgBT0QM9Hf1wBB04JpbeN8YciEYpp taBpcHWZHrk= =FXwU -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
004a365eb8
@ -56,7 +56,7 @@ struct erofs_super_block {
|
||||
union {
|
||||
__le16 rootnid_2b; /* nid of root directory */
|
||||
__le16 blocks_hi; /* (48BIT on) blocks count MSB */
|
||||
} rb;
|
||||
} __packed rb;
|
||||
__le64 inos; /* total valid ino # (== f_files - f_favail) */
|
||||
__le64 epoch; /* base seconds used for compact inodes */
|
||||
__le32 fixed_nsec; /* fixed nanoseconds for compact inodes */
|
||||
@ -148,7 +148,7 @@ union erofs_inode_i_nb {
|
||||
__le16 nlink; /* if EROFS_I_NLINK_1_BIT is unset */
|
||||
__le16 blocks_hi; /* total blocks count MSB */
|
||||
__le16 startblk_hi; /* starting block number MSB */
|
||||
};
|
||||
} __packed;
|
||||
|
||||
/* 32-byte reduced form of an ondisk inode */
|
||||
struct erofs_inode_compact {
|
||||
@ -369,9 +369,9 @@ struct z_erofs_map_header {
|
||||
* bit 7 : pack the whole file into packed inode
|
||||
*/
|
||||
__u8 h_clusterbits;
|
||||
};
|
||||
} __packed;
|
||||
__le16 h_extents_hi; /* extent count MSB */
|
||||
};
|
||||
} __packed;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -32,6 +32,8 @@ static void erofs_fileio_ki_complete(struct kiocb *iocb, long ret)
|
||||
ret = 0;
|
||||
}
|
||||
if (rq->bio.bi_end_io) {
|
||||
if (ret < 0 && !rq->bio.bi_status)
|
||||
rq->bio.bi_status = errno_to_blk_status(ret);
|
||||
rq->bio.bi_end_io(&rq->bio);
|
||||
} else {
|
||||
bio_for_each_folio_all(fi, &rq->bio) {
|
||||
|
@ -725,7 +725,6 @@ static int z_erofs_register_pcluster(struct z_erofs_frontend *fe)
|
||||
lockref_init(&pcl->lockref); /* one ref for this request */
|
||||
pcl->algorithmformat = map->m_algorithmformat;
|
||||
pcl->pclustersize = map->m_plen;
|
||||
pcl->pageofs_in = pageofs_in;
|
||||
pcl->length = 0;
|
||||
pcl->partial = true;
|
||||
pcl->next = fe->head;
|
||||
|
@ -559,7 +559,8 @@ static int z_erofs_map_blocks_ext(struct inode *inode,
|
||||
pos += sizeof(__le64);
|
||||
lstart = 0;
|
||||
} else {
|
||||
lstart = map->m_la >> vi->z_lclusterbits;
|
||||
lstart = round_down(map->m_la, 1 << vi->z_lclusterbits);
|
||||
pos += (lstart >> vi->z_lclusterbits) * recsz;
|
||||
pa = EROFS_NULL_ADDR;
|
||||
}
|
||||
|
||||
@ -614,7 +615,7 @@ static int z_erofs_map_blocks_ext(struct inode *inode,
|
||||
if (last && (vi->z_advise & Z_EROFS_ADVISE_FRAGMENT_PCLUSTER)) {
|
||||
map->m_flags |= EROFS_MAP_MAPPED | EROFS_MAP_FRAGMENT;
|
||||
vi->z_fragmentoff = map->m_plen;
|
||||
if (recsz >= offsetof(struct z_erofs_extent, pstart_lo))
|
||||
if (recsz > offsetof(struct z_erofs_extent, pstart_lo))
|
||||
vi->z_fragmentoff |= map->m_pa << 32;
|
||||
} else if (map->m_plen) {
|
||||
map->m_flags |= EROFS_MAP_MAPPED |
|
||||
|
Loading…
x
Reference in New Issue
Block a user