mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Changes since last update:
- Fix sanity checks for ztailpacking tail pclusters to avoid
false corruption reports
- Use more informative s_id for file-backed mounts
- Hide the meaningless "cache_strategy=" mount option on plain
(uncompressed) filesystems
- Remove the unneeded erofs_is_ishare_inode() helper
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmpY47QRHHhpYW5nQGtl
cm5lbC5vcmcACgkQUXZn5Zlu5qoPzQ//Rjcp/c9wAegDZG+Y5qwquAqIVtiO582a
DlimqGXP/+XIOx8IqhIzqXx9R1GpIjIT6xpWrqhXr+Xcics2W48CE6G/0xg+Mh0h
GDtf836rolHeeqJNG6gmEaWik3C91MDbZY3hwYJIQmS+gTVUBx1hwWvi22hauPZI
qGJ9wVEKlv6yAOC5KORx5hQidMeNblAI+z9MWWV/lm5Zf4w1Ve2wp0298utBzcnR
xVk6r+sEarqnHZ6O/ncM72S0OmyD/PrdfJkHUqF3RPjMVI4PSnlfQD+1IOGAmmy+
m0JnBUUylWI7c3Lg3e7RjgVT7Qbytn3iBp9UeMUNXsWHy6bG3zbuTmYTuWXckL79
YMOHdRpZ33scOts7+7D0hsp63dDErs1ALyNv9a8Mw2pO1ITxCs9D+omhzjwwL2Y/
XchOFuLMCBqfgigwGOvKOX5IBwdLpQxCMJVZsBGfpWNXcE0YqGJ77XaatoUt5gdu
FdUP7zwFTjTiMhXlBSPCYm1fID/e0+rqcEeztSsvIGlu0DClrXItCYTlhThSU3nr
eu/YmMZw/6vsXI8cPSX1Elkr52Q6bp2jlL2mCfvSEKgRTmNXrxgGWHLVsEb9i1aa
lON+F5B/lDMt9hV7RL7eINRG1Ov7ADm1wyt14oVSBSgh2dx2PzAUL2YpWsmpVsCz
K8HBfmru4lg=
=3hh+
-----END PGP SIGNATURE-----
Merge tag 'erofs-for-7.2-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs fixes from Gao Xiang:
- Fix sanity checks for ztailpacking tail pclusters to avoid
false corruption reports
- Use more informative s_id for file-backed mounts
- Hide the meaningless "cache_strategy=" mount option on plain
(uncompressed) filesystems
- Remove the unneeded erofs_is_ishare_inode() helper
* tag 'erofs-for-7.2-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: hide "cache_strategy=" for plain filesystems
erofs: get rid of erofs_is_ishare_inode() helper
erofs: relax sanity check for tail pclusters due to ztailpacking
erofs: use more informative s_id for file-backed mounts
This commit is contained in:
commit
133fc7aacc
|
|
@ -12,12 +12,6 @@
|
|||
|
||||
static struct vfsmount *erofs_ishare_mnt;
|
||||
|
||||
static inline bool erofs_is_ishare_inode(struct inode *inode)
|
||||
{
|
||||
/* assumed FS_ONDEMAND is excluded with FS_PAGE_CACHE_SHARE feature */
|
||||
return inode->i_sb->s_type == &erofs_anon_fs_type;
|
||||
}
|
||||
|
||||
static int erofs_ishare_iget5_eq(struct inode *inode, void *data)
|
||||
{
|
||||
struct erofs_inode_fingerprint *fp1 = &EROFS_I(inode)->fingerprint;
|
||||
|
|
@ -179,7 +173,7 @@ struct inode *erofs_real_inode(struct inode *inode, bool *need_iput)
|
|||
struct inode *realinode;
|
||||
|
||||
*need_iput = false;
|
||||
if (!erofs_is_ishare_inode(inode))
|
||||
if (inode->i_sb != erofs_ishare_mnt->mnt_sb)
|
||||
return inode;
|
||||
|
||||
vi_share = EROFS_I(inode);
|
||||
|
|
|
|||
|
|
@ -595,17 +595,6 @@ static const struct export_operations erofs_export_ops = {
|
|||
.get_parent = erofs_get_parent,
|
||||
};
|
||||
|
||||
static void erofs_set_sysfs_name(struct super_block *sb)
|
||||
{
|
||||
struct erofs_sb_info *sbi = EROFS_SB(sb);
|
||||
|
||||
if (erofs_is_fileio_mode(sbi))
|
||||
super_set_sysfs_name_generic(sb, "%s",
|
||||
bdi_dev_name(sb->s_bdi));
|
||||
else
|
||||
super_set_sysfs_name_id(sb);
|
||||
}
|
||||
|
||||
static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
@ -657,12 +646,14 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||
err = super_setup_bdi(sb);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
snprintf(sb->s_id, sizeof(sb->s_id),
|
||||
"%u:%u", MAJOR(sb->s_dev), MINOR(sb->s_dev));
|
||||
} else {
|
||||
if (!sb_set_blocksize(sb, PAGE_SIZE)) {
|
||||
errorfc(fc, "failed to set initial blksize");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sbi->dif0.dax_dev = fs_dax_get_by_bdev(sb->s_bdev,
|
||||
&sbi->dif0.dax_part_off, NULL, NULL);
|
||||
}
|
||||
|
|
@ -740,7 +731,7 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
erofs_set_sysfs_name(sb);
|
||||
super_set_sysfs_name_id(sb);
|
||||
err = erofs_register_sysfs(sb);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
@ -1038,7 +1029,7 @@ static int erofs_show_options(struct seq_file *seq, struct dentry *root)
|
|||
",user_xattr" : ",nouser_xattr");
|
||||
if (IS_ENABLED(CONFIG_EROFS_FS_POSIX_ACL))
|
||||
seq_puts(seq, test_opt(opt, POSIX_ACL) ? ",acl" : ",noacl");
|
||||
if (IS_ENABLED(CONFIG_EROFS_FS_ZIP))
|
||||
if (IS_ENABLED(CONFIG_EROFS_FS_ZIP) && sbi->available_compr_algs)
|
||||
seq_printf(seq, ",cache_strategy=%s",
|
||||
erofs_param_cache_strategy[opt->cache_strategy].name);
|
||||
if (test_opt(opt, DAX_ALWAYS))
|
||||
|
|
|
|||
|
|
@ -732,7 +732,8 @@ static int z_erofs_map_sanity_check(struct inode *inode,
|
|||
map->m_algorithmformat, EROFS_I(inode)->nid);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
if (EROFS_MAP_FULL(map->m_flags) && map->m_llen < map->m_plen) {
|
||||
if (EROFS_MAP_FULL(map->m_flags) && map->m_llen < map->m_plen &&
|
||||
map->m_la + map->m_llen < inode->i_size) {
|
||||
erofs_err(inode->i_sb, "too much compressed data @ la %llu of nid %llu",
|
||||
map->m_la, EROFS_I(inode)->nid);
|
||||
return -EFSCORRUPTED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user