This pull request contains changes for JFFS2, UBI and UBIFS
JFFS2: - Use splice_write() - Fix for a slab-out-of-bounds bug UBI: - Fix for clang related warnings - Code cleanup UBIFS: - Fix for inode rebirth at replay - Set s_uuid - Use zstd for default filesystem -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEEdgfidid8lnn52cLTZvlZhesYu8EFAmCRqNcWHHJpY2hhcmRA c2lnbWEtc3Rhci5hdAAKCRBm+VmF6xi7wcGbEACLv9Qm7N5z3CAG0aGC2LagEx4c u6fiL3EQx+wI82NKMG/KRdGeR3J18JA4xoM9FJ1ZLil9aUSvUjtLBq+wBRiKHnDn Oj4rgRVgwAMc1UdE00UAttCnorKXlsVWxg2+iD1CEZkkKbDN3dk7BkgtwJCjUmCy iD2oM02S0csLu0Uk400BaNFwOHG3AFVOU0xXeqyO2MgXcClEwfXNH8qmDQpZPmwy b42jd0FXxfWBnzPmrURZ163Yt/iXlNLFaHkMdJgJ23A+4eNWk5+BCjxMzj08u+mn XLIBGEegC/rHPYnBGqb/AhsQwoGxTqRTA0gmhkMX4j0goWpj7bO4+fwBu7DsOv/S kC09sobx+E8xIgoMPXwcr4twWBcbTctclZgoBRNa0BUILTVa6ifwdRxt0LlNmLLr wwZpRuekSBnKTEyD2c2rKnuCMZlg7f7dz6OXa+/HINy0YFvr2yFs0uF4RXpwaARz yR0iC80hrhGDrUA1+A2uIUZdNOI4ymR//9Of/9Qj+3o41Kl/0FpLPg8pH+CCLVTG iw2D3qJeX2N3VLdhb1ynQ5mLkzc3NWqEjf9bR1Aif3ti6FA5duueOctHhZTsC6Uq uzGQPXCpRqLbF1LoPtcmajUrgvl8tWIu9lVce5ncMA5D0q4VVc8t2yPFNdsBRyXl t5siLiHUdWIDvWQFmQ== =IwH7 -----END PGP SIGNATURE----- Merge tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull JFFS2, UBI and UBIFS updates from Richard Weinberger: "JFFS2: - Use splice_write() - Fix for a slab-out-of-bounds bug UBI: - Fix for clang related warnings - Code cleanup UBIFS: - Fix for inode rebirth at replay - Set s_uuid - Use zstd for default filesystem" * tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Remove unnecessary struct declaration jffs2: Hook up splice_write callback jffs2: avoid Wempty-body warnings jffs2: Fix kasan slab-out-of-bounds problem ubi: Fix fall-through warnings for Clang ubifs: Report max LEB count at mount time ubifs: Set s_uuid in super block to support ima/evm uuid options ubifs: Default to zstd compression ubifs: Only check replay with inode type to judge if inode linked
This commit is contained in:
commit
51f629446c
|
@ -1350,6 +1350,7 @@ static int bytes_str_to_int(const char *str)
|
|||
fallthrough;
|
||||
case 'K':
|
||||
result *= 1024;
|
||||
break;
|
||||
case '\0':
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -388,8 +388,6 @@ struct ubi_volume_desc {
|
|||
int mode;
|
||||
};
|
||||
|
||||
struct ubi_wl_entry;
|
||||
|
||||
/**
|
||||
* struct ubi_debug_info - debugging information for an UBI device.
|
||||
*
|
||||
|
|
|
@ -57,6 +57,7 @@ const struct file_operations jffs2_file_operations =
|
|||
.mmap = generic_file_readonly_mmap,
|
||||
.fsync = jffs2_fsync,
|
||||
.splice_read = generic_file_splice_read,
|
||||
.splice_write = iter_file_splice_write,
|
||||
};
|
||||
|
||||
/* jffs2_file_inode_operations */
|
||||
|
|
|
@ -1079,7 +1079,7 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo
|
|||
memcpy(&fd->name, rd->name, checkedlen);
|
||||
fd->name[checkedlen] = 0;
|
||||
|
||||
crc = crc32(0, fd->name, rd->nsize);
|
||||
crc = crc32(0, fd->name, checkedlen);
|
||||
if (crc != je32_to_cpu(rd->name_crc)) {
|
||||
pr_notice("%s(): Name CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n",
|
||||
__func__, ofs, je32_to_cpu(rd->name_crc), crc);
|
||||
|
|
|
@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
|
|||
|
||||
#define jffs2_sum_active() (0)
|
||||
#define jffs2_sum_init(a) (0)
|
||||
#define jffs2_sum_exit(a)
|
||||
#define jffs2_sum_exit(a) do { } while (0)
|
||||
#define jffs2_sum_disable_collecting(a)
|
||||
#define jffs2_sum_is_disabled(a) (0)
|
||||
#define jffs2_sum_reset_collected(a)
|
||||
#define jffs2_sum_reset_collected(a) do { } while (0)
|
||||
#define jffs2_sum_add_kvec(a,b,c,d) (0)
|
||||
#define jffs2_sum_move_collected(a,b)
|
||||
#define jffs2_sum_move_collected(a,b) do { } while (0)
|
||||
#define jffs2_sum_write_sumnode(a) (0)
|
||||
#define jffs2_sum_add_padding_mem(a,b)
|
||||
#define jffs2_sum_add_inode_mem(a,b,c)
|
||||
#define jffs2_sum_add_dirent_mem(a,b,c)
|
||||
#define jffs2_sum_add_xattr_mem(a,b,c)
|
||||
#define jffs2_sum_add_xref_mem(a,b,c)
|
||||
#define jffs2_sum_add_padding_mem(a,b) do { } while (0)
|
||||
#define jffs2_sum_add_inode_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_dirent_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_xattr_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_xref_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_scan_sumnode(a,b,c,d,e) (0)
|
||||
|
||||
#endif /* CONFIG_JFFS2_SUMMARY */
|
||||
|
|
|
@ -223,7 +223,8 @@ static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
|
|||
*/
|
||||
list_for_each_entry_reverse(r, &c->replay_list, list) {
|
||||
ubifs_assert(c, r->sqnum >= rino->sqnum);
|
||||
if (key_inum(c, &r->key) == key_inum(c, &rino->key))
|
||||
if (key_inum(c, &r->key) == key_inum(c, &rino->key) &&
|
||||
key_type(c, &r->key) == UBIFS_INO_KEY)
|
||||
return r->deletion == 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
|
||||
static int get_default_compressor(struct ubifs_info *c)
|
||||
{
|
||||
if (ubifs_compr_present(c, UBIFS_COMPR_ZSTD))
|
||||
return UBIFS_COMPR_ZSTD;
|
||||
|
||||
if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
|
||||
return UBIFS_COMPR_LZO;
|
||||
|
||||
|
|
|
@ -1552,8 +1552,8 @@ static int mount_ubifs(struct ubifs_info *c)
|
|||
ubifs_msg(c, "LEB size: %d bytes (%d KiB), min./max. I/O unit sizes: %d bytes/%d bytes",
|
||||
c->leb_size, c->leb_size >> 10, c->min_io_size,
|
||||
c->max_write_size);
|
||||
ubifs_msg(c, "FS size: %lld bytes (%lld MiB, %d LEBs), journal size %lld bytes (%lld MiB, %d LEBs)",
|
||||
x, x >> 20, c->main_lebs,
|
||||
ubifs_msg(c, "FS size: %lld bytes (%lld MiB, %d LEBs), max %d LEBs, journal size %lld bytes (%lld MiB, %d LEBs)",
|
||||
x, x >> 20, c->main_lebs, c->max_leb_cnt,
|
||||
y, y >> 20, c->log_lebs + c->max_bud_cnt);
|
||||
ubifs_msg(c, "reserved for root: %llu bytes (%llu KiB)",
|
||||
c->report_rp_size, c->report_rp_size >> 10);
|
||||
|
@ -2232,6 +2232,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
goto out_umount;
|
||||
}
|
||||
|
||||
import_uuid(&sb->s_uuid, c->uuid);
|
||||
|
||||
mutex_unlock(&c->umount_mutex);
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue