본문 바로가기

Core BSP 분석/리눅스 커널 핵심 분석

아이노드 오퍼레이션 - ext4 파일 시스템

아이노드 오퍼레이션
iput(
    (register struct inode *) inode = 0xE7017A90 = __bss_stop+0x26161070 -> ((umode_t) i_mode = 33152 = 0x8180 = '..', (short unsigned int) i_opflags = 5 = 0x5 = '..',
  (register struct inode *) inode = 0xE7017A90 = __bss_stop+0x26161070 -> (
    (umode_t) i_mode = 33152 = 0x8180 = '..',
    (short unsigned int) i_opflags = 5 = 0x5 = '..',
    (uid_t) i_uid = 1000 = 0x03E8 = '....', //  소유자 사용자 아이디
    (gid_t) i_gid = 1000 = 0x03E8 = '....', // 소유자 그룹 아이디
    (unsigned int) i_flags = 2 = 0x2 = '....',
    (struct posix_acl *) i_acl = 0xFFFFFFFF = PRRR+0xF57657 -> ((atomic_t) a_refcount = ((int) counter = ERROR:MMUFAIL), (struct rcu_head) a_rcu = ((struct rcu_head *)
    (struct posix_acl *) i_default_acl = 0xFFFFFFFF = PRRR+0xF57657 -> ((atomic_t) a_refcount = ((int) counter = ERROR:MMUFAIL), (struct rcu_head) a_rcu = ((struct rcu_
    (struct inode_operations *) i_op = 0xC084DB00 = ext4_file_inode_operations -> ((struct dentry * (*)()) lookup = 0x0 = , (void * (*)()) follow_link = 0x0 = , (int (*
    (struct super_block *) i_sb = 0xE0E79800 = __bss_stop+0x1FFC2DE0 -> ((struct list_head) s_list = ((struct list_head *) next = 0xE0E79000 = __bss_stop+0x1FFC25E0, (s
    (struct address_space *) i_mapping = 0xE7017B68 = __bss_stop+0x26161148 -> ((struct inode *) host = 0xE7017A90 = __bss_stop+0x26161070, (struct radix_tree_root) pag
    (void *) i_security = 0xDFDCDA58 = __bss_stop+0x1EF17038 -> ,
    (long unsigned int) i_ino = 265595 = // 아이노드 번호
    (unsigned int) i_nlink = 0 = 0x0 = '....', //하드링크 갯수
    (unsigned int) __i_nlink = 0 = 0x0 = '....',
    (dev_t) i_rdev = 0 = 0x0 = '....',   // 실제 디바이스 노드
    (struct timespec) i_atime = // 마지막 접근 시간
    (struct timespec) i_mtime = // 마지막 수정 시간
    (struct timespec) i_ctime = // 마지막 변경 시간,
    (spinlock_t) i_lock = // 스핀락
    (short unsigned int) i_bytes = 0 = 0x0 = '..',
    (blkcnt_t) i_blocks = 0 = 0x0,
    (loff_t) i_size = 0 = 0x0,
    (seqcount_t) i_size_seqcount = ((unsigned int) sequence = 0 = 0x0 = '....'),
    (long unsigned int) i_state = 96 = 0x60 = '...`',
    (struct mutex) i_mutex = ((atomic_t) count = ((int) counter = 1 = 0x1 = '....'), (spinlock_t) wait_lock = ((struct raw_spinlock) rlock = ((arch_spinlock_t) raw_lock
    (long unsigned int) dirtied_when = 0 = 0x0 = '....',  // 최초 변경시간
    (struct hlist_node) i_hash = // 해시 리스트
    (struct list_head) i_wb_list = ((struct list_head *) next = 0xE7017B24 = __bss_stop+0x26161104 -> ((struct list_head *) next = 0xE7017B24 = __bss_stop+0x26161104, (
    (struct list_head) i_lru = ((struct list_head *) next = 0xE7017B2C = __bss_stop+0x2616110C -> ((struct list_head *) next = 0xE7017B2C = __bss_stop+0x2616110C, (stru
    (struct list_head) i_sb_list = ((struct list_head *) next = 0xE7017B34 = __bss_stop+0x26161114 -> ((struct list_head *) next = 0xE7017B34 = __bss_stop+0x26161114, (
    (struct list_head) i_dentry = ((struct list_head *) next = 0xE7017B3C = __bss_stop+0x2616111C -> ((struct list_head *) next = 0xE7017B3C = __bss_stop+0x2616111C, (s
    (struct rcu_head) i_rcu = ((struct rcu_head *) next = 0xE7017B3C = __bss_stop+0x2616111C -> ((struct rcu_head *) next = 0xE7017B3C = __bss_stop+0x2616111C, (void (*
    (atomic_t) i_count = ((int) counter = 0 = 0x0 = '....'), // 참조횟수
    (unsigned int) i_blkbits = 12 = 0x0C = '....',
    (u64) i_version = 1 = 0x1,  // 버젼 정보
    (atomic_t) i_dio_count = ((int) counter = 0 = 0x0 = '....'),
    (atomic_t) i_writecount = ((int) counter = 0 = 0x0 = '....'),
    (struct file_operations *) i_fop = 0xC084DB80 = ext4_file_operations -> ((struct module *) owner = 0x0 = , (loff_t (*)()) llseek = 0xC01E20C8 = ext4_llseek, (ssize_
    (struct file_lock *) i_flock = 0x0 =  -> NULL,
    (struct address_space) i_data = ((struct inode *) host = 0xE7017A90 = __bss_stop+0x26161070 -> ((umode_t) i_mode = 33152 = 0x8180 = '..', (short unsigned int) i_opf
    (struct list_head) i_devices = ((struct list_head *) next = 0xE7017BD4 = __bss_stop+0x261611B4 -> ((struct list_head *) next = 0xE7017BD4 = __bss_stop+0x261611B4, (
    (struct pipe_inode_info *) i_pipe = 0x0 =  -> NULL,
    (struct block_device *) i_bdev = 0x0 =  -> NULL,
    (struct cdev *) i_cdev = 0x0 =  -> NULL, // 캐릭터 장치 드라이버
    (__u32) i_generation = 3015412147 = 0xB3BB89B3 = '....',
    (__u32) i_fsnotify_mask = 0 = 0x0 = '....',
    (struct hlist_head) i_fsnotify_marks = ((struct hlist_node *) first = 0x0 =  -> NULL),
    (void *) i_private = 0x0 =  -> NULL)
  (register struct super_block *) sb = 0xE0E79800 = __bss_stop+0x1FFC2DE0 -> (
    (struct list_head) s_list = ((struct list_head *) next = 0xE0E79000 = __bss_stop+0x1FFC25E0 -> ((struct list_head *) next = 0xDFE3EC00 = __bss_stop+0x1EF881E0, (str
    (dev_t) s_dev = 271581186 = 0x10300002 = '.0..',
    (unsigned char) s_dirt = 0 = 0x0 = '.',
    (unsigned char) s_blocksize_bits = 12 = 0x0C = '.',

아이노드 동작 오퍼레이션
    (struct inode_operations *) i_op = 0xC084DB00 = ext4_file_inode_operations -> (
      (struct dentry * (*)()) lookup = 0x0 =  -> NULL,
      (void * (*)()) follow_link = 0x0 =  -> NULL,
      (int (*)()) permission = 0x0 =  -> NULL,
      (struct posix_acl * (*)()) get_acl = 0xC0225294 = ext4_get_acl -> ,
      (int (*)()) readlink = 0x0 =  -> NULL,
      (void (*)()) put_link = 0x0 =  -> NULL,
      (int (*)()) create = 0x0 =  -> NULL,
      (int (*)()) link = 0x0 =  -> NULL,
      (int (*)()) unlink = 0x0 =  -> NULL,
      (int (*)()) symlink = 0x0 =  -> NULL,
      (int (*)()) mkdir = 0x0 =  -> NULL,
      (int (*)()) rmdir = 0x0 =  -> NULL,
      (int (*)()) mknod = 0x0 =  -> NULL,
      (int (*)()) rename = 0x0 =  -> NULL,
      (void (*)()) truncate = 0x0 =  -> NULL,
      (int (*)()) setattr = 0xC01E99A4 = ext4_setattr -> ,
      (int (*)()) getattr = 0xC01E7EB8 = ext4_getattr -> ,
      (int (*)()) setxattr = 0xC0178FFC = generic_setxattr -> ,
      (ssize_t (*)()) getxattr = 0xC0178E98 = generic_getxattr -> ,
      (ssize_t (*)()) listxattr = 0xC0223864 = ext4_listxattr -> ,
      (int (*)()) removexattr = 0xC0179080 = generic_removexattr -> ,
      (void (*)()) truncate_range = 0x0 =  -> NULL,
      (int (*)()) fiemap = 0xC02128C0 = ext4_fiemap -> ),