fs_magic
switch (fs->fs_magic) {
switch (u.fs.fs_magic) {
switch(sbp->fs_magic) {
if (sblock->fs_magic == FS_UFS2_MAGIC)
switch(sblock->fs_magic) {
sblock->fs_magic = FS_UFS2_MAGIC;
sblock->fs_magic = FS_UFS2_MAGIC_SWAPPED;
if (altsblock->fs_magic == FS_UFS2EA_MAGIC) {
altsblock->fs_magic = FS_UFS2_MAGIC;
if (fs->fs_magic == FS_UFS2_MAGIC) {
if (sblock->fs_magic != FS_UFS1_MAGIC ||
(char *)(&sblock->fs_magic+1) -
if (sblockoff == SBLOCK_UFS2 && (fs->fs_magic == FS_UFS1_MAGIC ||
fs->fs_magic == FS_UFS1_MAGIC_SWAPPED))
if (fs->fs_magic == FS_UFS1_MAGIC || fs->fs_magic == FS_UFS2_MAGIC ||
fs->fs_magic == FS_UFS2EA_MAGIC) {
else if (fs->fs_magic == FS_UFS1_MAGIC_SWAPPED ||
fs->fs_magic == FS_UFS2_MAGIC_SWAPPED ||
fs->fs_magic == FS_UFS2EA_MAGIC_SWAPPED) {
if (fs->fs_magic == FS_UFS2_MAGIC) {
fs->fs_magic = FS_UFS2EA_MAGIC;
if (fs->fs_magic == FS_UFS2_MAGIC_SWAPPED) {
fs->fs_magic = FS_UFS2EA_MAGIC_SWAPPED;
if (fs->fs_magic == FS_UFS2EA_MAGIC) {
fs->fs_magic = FS_UFS2_MAGIC;
if (fs->fs_magic == FS_UFS2EA_MAGIC_SWAPPED) {
fs->fs_magic = FS_UFS2_MAGIC_SWAPPED;
if (sblock->fs_magic == FS_UFS2EA_MAGIC) {
sblock->fs_magic = FS_UFS2_MAGIC;
is_ufs2 = sblock->fs_magic == FS_UFS2_MAGIC;
if (altsblock->fs_magic == FS_UFS2EA_MAGIC) {
altsblock->fs_magic = FS_UFS2_MAGIC;
asb->fs_magic != sb->fs_magic)
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
switch(fs->fs_magic) {
if (sblock.fs_magic == FS_UFS1_MAGIC) {
if (sblock.fs_magic == FS_UFS1_MAGIC) {
if (sblock.fs_magic == FS_UFS1_MAGIC) {
((sblock.fs_magic == FS_UFS1_MAGIC) ? \
{offsetof(struct fs, fs_magic)/4, FS_UFS1_MAGIC, ~0u},
{offsetof(struct fs, fs_magic)/4, FS_UFS2_MAGIC, ~0u},
sblock.fs_magic = FS_UFS1_MAGIC;
sblock.fs_magic = FS_UFS2_MAGIC;
if (!mfs && sblock.fs_magic == FS_UFS1_MAGIC) {
((struct fs *)iobuf)->fs_magic = FS_UFS2EA_MAGIC;
if (sblock.fs_magic == FS_UFS1_MAGIC) {
if (sblock.fs_magic != FS_UFS1_MAGIC)
if (newsb->fs_magic == FS_UFS1_MAGIC &&
switch (oldsb->fs_magic) {
if (oldsb->fs_magic == FS_UFS1_MAGIC &&
switch (sbi->ffs->fs_magic) {
switch (sbi->ffs->fs_magic) {
switch(fs->fs_magic) {
magic = buf.sblk.fs_magic;
if (fp->fs_magic == FS_MAGIC) {
if (fs->fs_magic != FS_UFS1_MAGIC)
magic = buf.sblk.fs_magic;
n->fs_magic = bswap32(o->fs_magic);
if (fs->fs_magic == FS_UFS1_MAGIC
return fs->fs_magic == FS_UFS1_MAGIC;
return fs->fs_magic == bswap32(FS_UFS1_MAGIC);
return fs->fs_magic == FS_UFS2_MAGIC || fs->fs_magic == FS_UFS2EA_MAGIC;
return fs->fs_magic == bswap32(FS_UFS2_MAGIC) ||
fs->fs_magic == bswap32(FS_UFS2EA_MAGIC);
return fs->fs_magic == LFS_MAGIC;
return fs->fs_magic == bswap32(LFS_MAGIC);
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if (fs->fs_magic == FS_UFS2_MAGIC) {
if (fs->fs_magic == FS_UFS2_MAGIC && ibp == NULL) {
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if (VTOI(vp)->i_fs->fs_magic == FS_UFS2_MAGIC)
n->fs_magic = bswap32(o->fs_magic);
if ((fs->fs_magic != FS_UFS2_MAGIC) &&
if (fs->fs_magic == FS_UFS2_MAGIC)
if (fs->fs_magic == FS_UFS1_MAGIC && /* XXX */
if (fs->fs_magic == FS_UFS1_MAGIC) {
if (fs->fs_magic == FS_UFS2_MAGIC && oip->i_din2->di_extsize > 0) {
if (fs->fs_magic == FS_UFS1_MAGIC) {
if (fs->fs_magic == FS_UFS1_MAGIC)
if (fs->fs_magic == FS_UFS1_MAGIC)
if (fs->fs_magic == FS_UFS1_MAGIC)
DPRINTF("fs_magic 0x%x", fs->fs_magic);
if (fs->fs_magic == FS_UFS2EA_MAGIC) {
fs->fs_magic = FS_UFS2_MAGIC;
} else if (fs->fs_magic == FS_UFS2EA_MAGIC_SWAPPED) {
fs->fs_magic = FS_UFS2_MAGIC_SWAPPED;
if (fs->fs_magic == FS_UFS1_MAGIC) {
} else if (fs->fs_magic == FS_UFS1_MAGIC_SWAPPED) {
} else if (fs->fs_magic == FS_UFS2_MAGIC) {
} else if (fs->fs_magic == FS_UFS2_MAGIC_SWAPPED) {
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if (fs->fs_magic == FS_UFS1_MAGIC &&
if ((fs->fs_magic != FS_UFS1_MAGIC) ||
if (fs->fs_magic != FS_UFS2_MAGIC)
if (fs->fs_magic == FS_UFS1_MAGIC && /* XXX */
if (fs->fs_magic == FS_UFS2_MAGIC) {
KASSERT(bfs->fs_magic == FS_UFS2_MAGIC);
bfs->fs_magic = FS_UFS2EA_MAGIC;
if (newfs->fs_magic == FS_UFS2EA_MAGIC) {
newfs->fs_magic = FS_UFS2_MAGIC;
if ((newfs->fs_magic != FS_UFS1_MAGIC) &&
(newfs->fs_magic != FS_UFS2_MAGIC)) {
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
int32_t fs_magic; /* magic number */
? ((uint8_t *)(&(fs)->fs_magic+1)) \
#define cgstart(fs, c) ((fs)->fs_magic == FS_UFS2_MAGIC \
((fs)->fs_magic == FS_UFS2_MAGIC ? \
((fs)->fs_magic == FS_UFS2_MAGIC ? \
if (fs->fs_magic != FS_UFS1_MAGIC || fs->fs_bsize > MAXBSIZE ||
switch(afs.fs_magic) {
printold = (fs->fs_magic == FS_UFS1_MAGIC &&
fs->fs_magic == FS_UFS2EA_MAGIC ? "ea" : "");
fs->fs_magic, ctime(&t));
if (fs->fs_magic == FS_UFS2EA_MAGIC)
fs->fs_magic = FS_UFS2_MAGIC;
else if (fs->fs_magic == FS_UFS2EA_MAGIC_SWAPPED)
fs->fs_magic = FS_UFS2_MAGIC_SWAPPED;
if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_fsize > 0 &&
} else if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_fsize > 0 &&
if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_fsize > 0) {
} else if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_fsize > 0) {
switch (fs->fs_magic) {
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if ((fs->fs_magic == FS_UFS1_MAGIC) &&
if (ip->i_fs->fs_magic == FS_UFS2_MAGIC ||
ip->i_fs->fs_magic == FS_UFS2EA_MAGIC)
sblock.fs_magic = FS_UFS1_MAGIC;
sblock.fs_magic = FS_UFS2EA_MAGIC;
sblock.fs_magic = FS_UFS2_MAGIC;
if (sblock.fs_magic == FS_UFS1_MAGIC) {
if ((ip)->i_fs->fs_magic == FS_UFS1_MAGIC) \
if ((ip)->i_fs->fs_magic == FS_UFS1_MAGIC) \
(((ip)->i_fs->fs_magic == FS_UFS1_MAGIC) ? \
if (super->fs_magic == FS_UFS1_MAGIC)
if (fs->fs_magic == FS_UFS1_MAGIC &&
if (fs->fs_magic != FS_UFS1_MAGIC &&
fs->fs_magic != FS_UFS2_MAGIC &&
fs->fs_magic != FS_UFS2EA_MAGIC)
if (fs->fs_magic == FS_UFS2_MAGIC
|| fs->fs_magic == FS_UFS2EA_MAGIC
(((fs)->fs_magic == FS_UFS1_MAGIC ? sizeof(struct ufs1_dinode) : \
(((fs)->fs_magic == FS_UFS1_MAGIC) ? \
switch (sblock.fs_magic) {
sblock.fs_magic = FS_UFS2_MAGIC;
sblock.fs_magic = FS_UFS2_MAGIC_SWAPPED;
if (sblock.fs_magic == FS_UFS2_MAGIC) {
if (fs->fs_magic != FS_UFS1_MAGIC &&
fs->fs_magic != FS_UFS1_MAGIC_SWAPPED)
switch (SB->fs_magic) {