Figure 5-9shows how for a file on the ext3 file system, inode_operations map to

ext3_file_inode_operations.

Figure 5-9: Access control on ext3 file system

Similarly, for directory, symlink, and special-file types of objects, inode operations map to ext3_dir_inode_operations, ext3_symlink_inode_operations, and ext3_special_inode_operations, respectively.

ext3_truncate() is the entry point for truncating a file. The ext3_truncate() routine is invoked when VFS calls to the sys_truncate() routine are diverted based on the ext3 inode’s inode operation vector i_op of the ext3 inode. This routine prevents the truncation of inodes whose extended attributes mark them as being append-only or immutable.

5.1.2.2ISO 9660 file system for CD-ROM

The SLES kernel supports the ISO 9660 file system for CD-ROM. Refer to the HOWTO document by Martin Hinner on the Linux Documentation Project Web site for a detailed specification of the ISO 9660 file system: http://www.tldp.org/HOWTO/Filesystems-HOWTO.html.

5.1.2.2.1Data structures and algorithms

The following data structures and inode operations implement the file system on the SLES kernel.

vfs_permission(): Because the file system is a read-only file system, there are no object reuse implications with respect to allocating data blocks. The discretionary access check is performed at the VFS layer with the vfs_permission() routine, which grants permission based on a process’s fsuid field.

isofs_sb_info: The CD-ROM file system super block isofs_sb_info stores file system-specific information, such as the number of inodes, number of zones, maximum size, and fields for the mount command line option to prohibit the execution of suid programs.

iso_inode_info: The iso_inode_info is in-core inode information for CD-ROM file objects.

iso_inode_info stores information, such as file format, extent location, and a link to the next inode.

isofs_lookup(): The isofs_lookup() on inode is called when the pathname translation routine is diverted from the VFS layer to the isofs layer. isofs_lookup() sets the inode operation vector

43

Page 55
Image 55
IBM 10 SP1 EAL4 manual ISO 9660 file system for CD-ROM, Data structures and algorithms