Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/ext2fs/ext2_vfsops.c
Show First 20 Lines • Show All 459 Lines • ▼ Show 20 Lines | ext2_compute_sb_data(struct vnode *devvp, struct ext2fs *es, | ||||
struct m_ext2fs *fs) | struct m_ext2fs *fs) | ||||
{ | { | ||||
struct buf *bp; | struct buf *bp; | ||||
uint32_t e2fs_descpb, e2fs_gdbcount_alloc; | uint32_t e2fs_descpb, e2fs_gdbcount_alloc; | ||||
int i, j; | int i, j; | ||||
int g_count = 0; | int g_count = 0; | ||||
int error; | int error; | ||||
/* Check if dblock is zero */ | |||||
if (!fs->e2fs->e2fs_first_dblock) { | |||||
SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, | |||||
"dblock is zero"); | |||||
return (EINVAL); | |||||
} | |||||
/* Check checksum features */ | /* Check checksum features */ | ||||
if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) && | if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) && | ||||
EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) { | EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) { | ||||
SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, | SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, | ||||
"incorrect checksum features combination"); | "incorrect checksum features combination"); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 976 Lines • Show Last 20 Lines |