unix filesystems evolution design and implementation phần 9

trong khi RFS là hạn chế trong các môi trường UNIX và đặc biệt là trong hệ thống V UNIX. RFS đảm bảo rằng khi các tập tin được mở thêm chế độ (O_APPEND) viết được thêm vào tập tin. Điều này không được bảo đảm trong NFS. | 350 UNIX Filesystems Evolution Design and Implementation 49 void 50 ux_read_inode struct inode inode 51 52 struct buffer_head bh 53 struct ux_inode di 54 unsigned long ino inode- i_ino 55 int block 56 57 if ino UX_ROOT_INO ino UX_MAXFILES 58 printk uxfs Bad inode number lu n ino and the stack backtrace is displayed to locate the flow through the kernel from function to function. In the stack backtrace below you can see the call from ux_read_super to iget to read the root inode. Notice the inode number 2 passed to iget . gdb bt 0 ux_read_inode inode 0xcd235460 at 54 1 0xc015411a in get_new_inode sb 0xcf15a400 ino 2 head 0xcfda3820 find_actor 0 opaque 0x0 at 871 2 0xc015439a in iget4 sb 0xcf15a400 ino 2 find_actor 0 opaque 0x0 at 984 3 0xd0855bfb in iget sb 0xcf15a400 ino 2 at usr src linux include linux 1328 4 0xd08558c3 in ux_read_super s 0xcf15a400 data 0x0 silent 0 at 272 5 0xc0143868 in get_sb_bdev fs_type 0xd0856a44 dev_name 0xccf35000 dev fd0 flags 0 data 0x0 at 697 6 0xc0143d2d in do_kern_mount type 0xccf36000 uxfs flags 0 Finally the inode structure passed to ux_read_inode can be displayed. Because the inode has not been read from disk the in-core inode is only partially initialized. The i_ino field is correct but some of the other fields are invalid at this stage. gdb print struct inode 0xcd235460 2 i_hash next 0xce2c7400 prev 0xcfda3820 i_list next 0xcf7aeba8 prev 0xc0293d84 i_dentry next 0xcd235470 prev 0xcd235470 i_dirty_buffers next 0xcd235478 prev 0xcd235478 i_dirty_data_buffers next 0xcd235480 prev 0xcd235480 i_ino 2 i_count counter 1 i_dev 512 i_mode 49663 i_nlink 1 i_uid 0 i_gid 0 i_rdev 512 i_size 0 Because the address of the inode structure is known it may be displayed at any time. Simply enter gdb and run the above command once more. Writing the Superblock to Disk The uxfs superblock contains information about which inodes and data blocks Developing a Filesystem for the Linux Kernel 351 have been

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
172    80    4    22-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.