Home
last modified time | relevance | path

Searched refs:inode (Results 1 – 17 of 17) sorted by relevance

/DragonOS-0.1.2/docs/kernel/filesystem/vfs/
Doverview.md11 …emsp;dentry的全称为directory entry,是VFS中对于目录项的一种抽象数据结构。当读取具体文件系统时,将会由创建dentry对象。dentry对象中包含了指向inode的指针。
15 ### inode对象
17   inode的全称叫做index node,即索引节点。一般来说,每个dentry都应当包含指向其inode的指针。inode是VFS提供的对文件对象的抽象。inode中的信息…
19   要查找某个路径下的inode,我们需要调用父目录的inode的lookup()方法。请注意,该方法与具体文件系统有关,需要在具体文件系统之中实现。
121 void (*write_inode)(struct vfs_index_node_t *inode); // 将inode信息写入磁盘
135   将inode的信息写入磁盘
139 ## 索引结点(inode)对象
141   每个inode对象代表了具体的文件系统之中的一个对象(目录项)。
145   该数据结构为inode对象的数据结构,与文件系统中的具体的文件结点对象具有一对一映射的关系。
174   inode的属性。可选值如下:
[all …]
/DragonOS-0.1.2/kernel/src/filesystem/procfs/
Dprocfs.c60 static void procfs_write_inode(struct vfs_index_node_t *inode) in procfs_write_inode() argument
82 static long procfs_iput(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode) in procfs_iput() argument
105 static long procfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in procfs_open() argument
107 if (inode->attribute & VFS_IF_DIR) in procfs_open()
112 struct procfs_inode_info_t *finode = inode->private_inode_info; in procfs_open()
167 inode->file_size = fdata->readlen; in procfs_open()
171 static long procfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in procfs_close() argument
232 struct vfs_index_node_t *inode = file_ptr->dEntry->dir_inode; in procfs_lseek() local
258 static long procfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd,… in procfs_ioctl() argument
350 struct vfs_index_node_t *inode = vfs_alloc_inode(); in procfs_create() local
[all …]
/DragonOS-0.1.2/kernel/src/filesystem/VFS/
Ddcache.c122 int vfs_free_inode(struct vfs_index_node_t *inode) in vfs_free_inode() argument
124 --inode->lockref.count; in vfs_free_inode()
125 BUG_ON(inode->lockref.count < 0); in vfs_free_inode()
126 if (inode->lockref.count == 0) in vfs_free_inode()
128 kfree(inode->private_inode_info); in vfs_free_inode()
129 kfree(inode); in vfs_free_inode()
133 return inode->lockref.count; in vfs_free_inode()
DVFS.h125 void (*write_inode)(struct vfs_index_node_t *inode); // 将inode信息写入磁盘
154 long (*mkdir)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry, int mode);
155 long (*rmdir)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry);
167 long (*unlink)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dentry);
175 long (*iput)(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode);
186 long (*open)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr);
187 long (*close)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr);
191 …long (*ioctl)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, uint64_t …
Dinternal.h45 int vfs_free_inode(struct vfs_index_node_t * inode);
DVFS.c882 struct vfs_index_node_t *inode = kzalloc(sizeof(struct vfs_index_node_t), 0); in vfs_alloc_inode() local
883 spin_init(&inode->lockref.lock); in vfs_alloc_inode()
884 inode->lockref.count = 1; // 初始化引用计数为1 in vfs_alloc_inode()
885 return inode; in vfs_alloc_inode()
/DragonOS-0.1.2/kernel/src/driver/tty/
Dtty.c15 long tty_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_open() argument
28 long tty_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_close() argument
43 long tty_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint64_t arg) in tty_ioctl() argument
/DragonOS-0.1.2/kernel/src/filesystem/fat32/
Dfat32.c23 static int fat32_detach_inode(struct vfs_index_node_t *inode);
480 void fat32_write_inode(struct vfs_index_node_t *inode) in fat32_write_inode() argument
482 fat32_inode_info_t *finode = inode->private_inode_info; in fat32_write_inode()
490 fat32_sb_info_t *fsbi = (fat32_sb_info_t *)inode->sb->private_sb_info; in fat32_write_inode()
498inode->sb->blk_device->bd_disk->fops->transfer(inode->sb->blk_device->bd_disk, AHCI_CMD_READ_DMA_E… in fat32_write_inode()
504 fdEntry->DIR_FileSize = inode->file_size; in fat32_write_inode()
509inode->sb->blk_device->bd_disk->fops->transfer(inode->sb->blk_device->bd_disk, AHCI_CMD_WRITE_DMA_… in fat32_write_inode()
536 long fat32_iput(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode) in fat32_iput() argument
553 long fat32_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in fat32_open() argument
559 long fat32_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in fat32_close() argument
[all …]
Dfat_ent.h15 int fat32_alloc_clusters(struct vfs_index_node_t *inode, uint32_t *clusters, int32_t num_clusters);
24 int fat32_free_clusters(struct vfs_index_node_t *inode, int32_t cluster);
Dfat_ent.c17 int fat32_alloc_clusters(struct vfs_index_node_t *inode, uint32_t *clusters, int32_t num_clusters) in fat32_alloc_clusters() argument
21 fat32_sb_info_t *fsbi = (fat32_sb_info_t *)inode->sb->private_sb_info; in fat32_alloc_clusters()
22 struct fat32_inode_info_t *finode = (struct fat32_inode_info_t *)inode->private_inode_info; in fat32_alloc_clusters()
23 struct block_device *blk = inode->sb->blk_device; in fat32_alloc_clusters()
64 inode->sb->sb_ops->write_inode(inode); in fat32_alloc_clusters()
98 fat32_free_clusters(inode, clusters[0]); in fat32_alloc_clusters()
112 int fat32_free_clusters(struct vfs_index_node_t *inode, int32_t cluster) in fat32_free_clusters() argument
362 struct vfs_index_node_t *inode = dEntry->dir_inode; in fat32_fill_shortname() local
364 if (inode->attribute & VFS_IF_DIR) in fat32_fill_shortname()
/DragonOS-0.1.2/kernel/src/filesystem/devfs/
Dinternal.h72 …devfs_fill_inode(struct vfs_dir_entry_t *dentry, struct vfs_index_node_t *inode, uint64_t inode_at… in __devfs_fill_inode() argument
74 dentry->dir_inode = inode; in __devfs_fill_inode()
82 private_inode_data->inode = dentry->dir_inode; in __devfs_fill_inode()
Ddevfs.c50 static void devfs_write_inode(struct vfs_index_node_t *inode) { return; } in devfs_write_inode() argument
64 static long devfs_iput(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode) { return 0; } in devfs_iput() argument
74 static long devfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in devfs_open() argument
78 static long devfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) { return 0; } in devfs_close() argument
82 static long devfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, … in devfs_ioctl() argument
157 static long devfs_mkdir(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry, int mode) in devfs_mkdir() argument
170 static long devfs_rmdir(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry) { return 0;… in devfs_rmdir() argument
304 if (target_dentry->dir_inode == private_inode_info->inode) in devfs_unregister_device()
Ddevfs-types.h46 struct vfs_index_node_t * inode; // 当前私有信息所绑定的inode member
/DragonOS-0.1.2/kernel/src/driver/keyboard/
Dps2_keyboard.c49 long ps2_keyboard_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_open() argument
63 long ps2_keyboard_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_close() argument
79 long ps2_keyboard_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint… in ps2_keyboard_ioctl() argument
/DragonOS-0.1.2/kernel/src/filesystem/rootfs/
Drootfs.c41 static long rootfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in rootfs_open() argument
45 static long rootfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) { return 0; } in rootfs_close() argument
49 static long rootfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd,… in rootfs_ioctl() argument
87 static long rootfs_iput(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode) { return 0;… in rootfs_iput() argument
/DragonOS-0.1.2/docs/kernel/filesystem/fat32/
Dindex.md192 &emsp;&emsp;该结构体是VFS的inode结构体的私有信息部分的具体实现。
/DragonOS-0.1.2/kernel/src/ipc/
Dpipe.c97 long pipe_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in pipe_close() argument