fs/jfs/jfs_mount.c
Source file repositories/reference/linux-study-clean/fs/jfs/jfs_mount.c
File Facts
- System
- Linux kernel
- Corpus path
fs/jfs/jfs_mount.c- Extension
.c- Size
- 12693 bytes
- Lines
- 503
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/buffer_head.hlinux/blkdev.hlinux/log2.hjfs_incore.hjfs_filsys.hjfs_superblock.hjfs_dmap.hjfs_imap.hjfs_metapage.hjfs_debug.h
Detected Declarations
function jfs_mountfunction INOSPEREXTfunction jfs_mount_rwfunction chkSuperfunction le32_to_cpufunction cpu_to_le32function le32_to_cpufunction updateSuperfunction readSuperfunction logMOUNT
Annotated Snippet
if (!ipaimap2) {
jfs_err("jfs_mount: Failed to read AGGREGATE_I");
rc = -EIO;
goto err_umount_ipbmap;
}
sbi->ipaimap2 = ipaimap2;
jfs_info("jfs_mount: ipaimap2:0x%p", ipaimap2);
/*
* initialize secondary aggregate inode allocation map
*/
if ((rc = diMount(ipaimap2))) {
jfs_err("jfs_mount: diMount(ipaimap2) failed, rc = %d",
rc);
goto err_ipaimap2;
}
} else
/* Secondary aggregate inode table is not valid */
sbi->ipaimap2 = NULL;
/*
* mount (the only/single) fileset
*/
/*
* open fileset inode allocation map (aka fileset inode)
*/
ipimap = diReadSpecial(sb, FILESYSTEM_I, 0);
if (ipimap == NULL) {
jfs_err("jfs_mount: Failed to read FILESYSTEM_I");
/* open fileset secondary inode allocation map */
rc = -EIO;
goto err_umount_ipaimap2;
}
jfs_info("jfs_mount: ipimap:0x%p", ipimap);
/* initialize fileset inode allocation map */
if ((rc = diMount(ipimap))) {
jfs_err("jfs_mount: diMount failed w/rc = %d", rc);
goto err_ipimap;
}
/* map further access of per fileset inodes by the fileset inode */
sbi->ipimap = ipimap;
return rc;
/*
* unwind on error
*/
err_ipimap:
/* close fileset inode allocation map inode */
diFreeSpecial(ipimap);
err_umount_ipaimap2:
/* close secondary aggregate inode allocation map */
if (ipaimap2)
diUnmount(ipaimap2, 1);
err_ipaimap2:
/* close aggregate inodes */
if (ipaimap2)
diFreeSpecial(ipaimap2);
err_umount_ipbmap: /* close aggregate block allocation map */
dbUnmount(ipbmap, 1);
err_ipbmap: /* close aggregate inodes */
diFreeSpecial(ipbmap);
err_umount_ipaimap: /* close aggregate inode allocation map */
diUnmount(ipaimap, 1);
err_ipaimap: /* close aggregate inodes */
diFreeSpecial(ipaimap);
out:
if (rc)
jfs_err("Mount JFS Failure: %d", rc);
return rc;
}
/*
* NAME: jfs_mount_rw(sb, remount)
*
* FUNCTION: Completes read-write mount, or remounts read-only volume
* as read-write
*/
int jfs_mount_rw(struct super_block *sb, int remount)
{
struct jfs_sb_info *sbi = JFS_SBI(sb);
int rc;
/*
* If we are re-mounting a previously read-only volume, we want to
* re-read the inode and block maps, since fsck.jfs may have updated
Annotation
- Immediate include surface: `linux/fs.h`, `linux/buffer_head.h`, `linux/blkdev.h`, `linux/log2.h`, `jfs_incore.h`, `jfs_filsys.h`, `jfs_superblock.h`, `jfs_dmap.h`.
- Detected declarations: `function jfs_mount`, `function INOSPEREXT`, `function jfs_mount_rw`, `function chkSuper`, `function le32_to_cpu`, `function cpu_to_le32`, `function le32_to_cpu`, `function updateSuper`, `function readSuper`, `function logMOUNT`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.