beautypg.com

IBM Novell 10 SP1 EAL4 User Manual

Page 53

background image

ext3_group_desc: Disk blocks are partitioned into groups. Each group has its own group descriptor.
ext3_group_desc stores information such as the block number of the inode bitmap, and the

block number of the block bitmap.

ext3_inode: The on-disk counterpart of the inode structure of VFS, ext3_inode stores

information such as file owner, file type and access rights, file length in bytes, time of last file access,
number of data blocks, pointer to data blocks, and file access control list.

ext3_xattr_entry: This structure describes an extended attribute entry. The ext3_xattr_entry

stores information such as attribute name, attribute size, and the disk block that stores the attribute.
ACLs are stored on disk using this data structure, and associated to an inode by pointing the
inode’s i_file_acl field to this allocated extended attribute block.

ext3_create(): This routine is called when a file create operation makes a transition from VFS to a
disk-based file system. ext3_create() starts journaling, and then calls ext3_new_inode()

to create the new inode.

ext3_lookup(): This routine is called when VFS real_lookup() calls the disk-based file system

lookup routine of the disk-based file system through the inode operation vector. The
ext3_find_entry() is called by ext3_lookup() to locate an entry in a specified directory

with the given name.

ext3_permission(): This is the entry point for all Discretionary Access Checks (DACs). This routine
is invoked when VFS calls to the permission() routine are diverted based on the ext3 inode’s
inode operation vector i_op of the ext3 inode. ext3_permission() calls
generic_permission().

ext3_get_block(): This is the general-purpose routine for locating data that corresponds to a regular
file. ext3_get_block() is invoked when the kernel is looking for, or allocating, a new data

block. The routine is called from routines set up in the address-space operations vector, a_ops,

which is accessed through the inode’s i_mapping field of the inode. ext3_get_block() calls
ext3_get_block_handle(), which in turn calls ext3_alloc_branch() if a new data

block needs to be allocated. ext3_alloc_branch() explicitly calls memset() to zero-out the

newly allocated block, thus taking care of the object reuse requirement.

Figure 5-8 illustrates how new data blocks are allocated and initialized for an ext3 file.

41