更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
vfs_force_umount.c 文件参考

浏览源代码.

函数

static int ErrorVopCreate (struct Vnode *parent, const char *name, int mode, struct Vnode **vnode)
 
static int ErrorVopLookup (struct Vnode *parent, const char *name, int len, struct Vnode **vnode)
 
static int ErrorVopOpen (struct Vnode *vnode, int fd, int mode, int flags)
 
static int ErrorVopClose (struct Vnode *vnode)
 
static int ErrorVopReclaim (struct Vnode *vnode)
 
static int ErrorVopUnlink (struct Vnode *parent, struct Vnode *vnode, const char *fileName)
 
static int ErrorVopRmdir (struct Vnode *parent, struct Vnode *vnode, const char *dirName)
 
static int ErrorVopMkdir (struct Vnode *parent, const char *dirName, mode_t mode, struct Vnode **vnode)
 
static int ErrorVopReaddir (struct Vnode *vnode, struct fs_dirent_s *dir)
 
static int ErrorVopOpendir (struct Vnode *vnode, struct fs_dirent_s *dir)
 
static int ErrorVopRewinddir (struct Vnode *vnode, struct fs_dirent_s *dir)
 
static int ErrorVopClosedir (struct Vnode *vnode, struct fs_dirent_s *dir)
 
static int ErrorVopGetattr (struct Vnode *vnode, struct stat *st)
 
static int ErrorVopSetattr (struct Vnode *vnode, struct stat *st)
 
static int ErrorVopChattr (struct Vnode *vnode, struct IATTR *attr)
 
static int ErrorVopRename (struct Vnode *src, struct Vnode *dstParent, const char *srcName, const char *dstName)
 
static int ErrorVopTruncate (struct Vnode *vnode, off_t len)
 
static int ErrorVopTruncate64 (struct Vnode *vnode, off64_t len)
 
static int ErrorVopFscheck (struct Vnode *vnode, struct fs_dirent_s *dir)
 
static int ErrorVopLink (struct Vnode *src, struct Vnode *dstParent, struct Vnode **dst, const char *dstName)
 
static int ErrorVopSymlink (struct Vnode *parentVnode, struct Vnode **newVnode, const char *path, const char *target)
 
static ssize_t ErrorVopReadlink (struct Vnode *vnode, char *buffer, size_t bufLen)
 
static int ErrorFopOpen (struct file *filep)
 
static int ErrorFopClose (struct file *filep)
 
static ssize_t ErrorFopRead (struct file *filep, char *buffer, size_t buflen)
 
static ssize_t ErrorFopWrite (struct file *filep, const char *buffer, size_t buflen)
 
static off_t ErrorFopSeek (struct file *filep, off_t offset, int whence)
 
static int ErrorFopIoctl (struct file *filep, int cmd, unsigned long arg)
 
static int ErrorFopMmap (struct file *filep, struct VmMapRegion *region)
 
static int ErrorFopPoll (struct file *filep, poll_table *fds)
 
static int ErrorFopStat (struct file *filep, struct stat *st)
 
static int ErrorFopFallocate (struct file *filep, int mode, off_t offset, off_t len)
 
static int ErrorFopFallocate64 (struct file *filep, int mode, off64_t offset, off64_t len)
 
static int ErrorFopFsync (struct file *filep)
 
static ssize_t ErrorFopReadpage (struct file *filep, char *buffer, size_t buflen)
 
static int ErrorFopUnlink (struct Vnode *vnode)
 
static struct MountGetDevMountPoint (struct Vnode *dev)
 
static void DirPreClose (struct fs_dirent_s *dirp)
 
static void FilePreClose (struct file *filep, const struct file_operations_vfs *ops)
 
static void FileDisableAndClean (struct Mount *mnt)
 
static void VnodeTryFree (struct Vnode *vnode)
 
static void VnodeTryFreeAll (struct Mount *mount)
 
int ForceUmountDev (struct Vnode *dev)
 

变量

static struct VnodeOps g_errorVnodeOps
 
static struct file_operations_vfs g_errorFileOps
 

函数说明

◆ DirPreClose()

static void DirPreClose ( struct fs_dirent_s *  dirp)
static

在文件 vfs_force_umount.c372 行定义.

373{
374 struct Vnode *node = NULL;
375 if (dirp == NULL || dirp->fd_root == NULL) {
376 return;
377 }
378
379 node = dirp->fd_root;
380 if (node->vop && node->vop->Closedir) {
381 node->vop->Closedir(node, dirp);
382 }
383}
vnode并不包含文件名,因为 vnode和文件名是 1:N 的关系
Definition: vnode.h:164
struct VnodeOps * vop
Definition: vnode.h:174
int(* Closedir)(struct Vnode *vnode, struct fs_dirent_s *dir)
关闭目录节点
Definition: vnode.h:211
这是这个函数的调用关系图:

◆ ErrorFopClose()

static int ErrorFopClose ( struct file filep)
static

在文件 vfs_force_umount.c241 行定义.

242{
243 (void)filep;
244 /* already closed at force umount, do nothing here */
245 return OK;
246}
ARG_NUM_3 ARG_NUM_1 ARG_NUM_2 ARG_NUM_2 ARG_NUM_3 ARG_NUM_1 ARG_NUM_4 ARG_NUM_2 ARG_NUM_2 ARG_NUM_5 ARG_NUM_2 void

◆ ErrorFopFallocate()

static int ErrorFopFallocate ( struct file filep,
int  mode,
off_t  offset,
off_t  len 
)
static

在文件 vfs_force_umount.c301 行定义.

302{
303 (void)filep;
304 (void)mode;
305 (void)offset;
306 (void)len;
307 return -EIO;
308}

◆ ErrorFopFallocate64()

static int ErrorFopFallocate64 ( struct file filep,
int  mode,
off64_t  offset,
off64_t  len 
)
static

在文件 vfs_force_umount.c310 行定义.

311{
312 (void)filep;
313 (void)mode;
314 (void)offset;
315 (void)len;
316 return -EIO;
317}

◆ ErrorFopFsync()

static int ErrorFopFsync ( struct file filep)
static

在文件 vfs_force_umount.c319 行定义.

320{
321 (void)filep;
322 return -EIO;
323}

◆ ErrorFopIoctl()

static int ErrorFopIoctl ( struct file filep,
int  cmd,
unsigned long  arg 
)
static

在文件 vfs_force_umount.c272 行定义.

273{
274 (void)filep;
275 (void)cmd;
276 (void)arg;
277 return -EIO;
278}

◆ ErrorFopMmap()

static int ErrorFopMmap ( struct file filep,
struct VmMapRegion region 
)
static

在文件 vfs_force_umount.c280 行定义.

281{
282 (void)filep;
283 (void)region;
284 return -EIO;
285}

◆ ErrorFopOpen()

static int ErrorFopOpen ( struct file filep)
static

在文件 vfs_force_umount.c235 行定义.

236{
237 (void)filep;
238 return -EIO;
239}

◆ ErrorFopPoll()

static int ErrorFopPoll ( struct file filep,
poll_table *  fds 
)
static

在文件 vfs_force_umount.c287 行定义.

288{
289 (void)filep;
290 (void)fds;
291 return -EIO;
292}

◆ ErrorFopRead()

static ssize_t ErrorFopRead ( struct file filep,
char *  buffer,
size_t  buflen 
)
static

在文件 vfs_force_umount.c248 行定义.

249{
250 (void)filep;
251 (void)buffer;
252 (void)buflen;
253 return -EIO;
254}

◆ ErrorFopReadpage()

static ssize_t ErrorFopReadpage ( struct file filep,
char *  buffer,
size_t  buflen 
)
static

在文件 vfs_force_umount.c325 行定义.

326{
327 (void)filep;
328 (void)buffer;
329 (void)buflen;
330 return -EIO;
331}

◆ ErrorFopSeek()

static off_t ErrorFopSeek ( struct file filep,
off_t  offset,
int  whence 
)
static

在文件 vfs_force_umount.c264 行定义.

265{
266 (void)filep;
267 (void)offset;
268 (void)whence;
269 return -EIO;
270}

◆ ErrorFopStat()

static int ErrorFopStat ( struct file filep,
struct stat *  st 
)
static

在文件 vfs_force_umount.c294 行定义.

295{
296 (void)filep;
297 (void)st;
298 return -EIO;
299}

◆ ErrorFopUnlink()

static int ErrorFopUnlink ( struct Vnode vnode)
static

在文件 vfs_force_umount.c333 行定义.

334{
335 (void)vnode;
336 return -EIO;
337}

◆ ErrorFopWrite()

static ssize_t ErrorFopWrite ( struct file filep,
const char *  buffer,
size_t  buflen 
)
static

在文件 vfs_force_umount.c256 行定义.

257{
258 (void)filep;
259 (void)buffer;
260 (void)buflen;
261 return -EIO;
262}

◆ ErrorVopChattr()

static int ErrorVopChattr ( struct Vnode vnode,
struct IATTR attr 
)
static

在文件 vfs_force_umount.c146 行定义.

147{
148 (void)vnode;
149 (void)attr;
150 return -EIO;
151}

◆ ErrorVopClose()

static int ErrorVopClose ( struct Vnode vnode)
static

在文件 vfs_force_umount.c65 行定义.

66{
67 (void)vnode;
68 /* already closed at force umount, do nothing here */
69 return OK;
70}

◆ ErrorVopClosedir()

static int ErrorVopClosedir ( struct Vnode vnode,
struct fs_dirent_s *  dir 
)
static

在文件 vfs_force_umount.c124 行定义.

125{
126 (void)vnode;
127 (void)dir;
128 /* already closed at force umount, do nothing here */
129 return OK;
130}

◆ ErrorVopCreate()

static int ErrorVopCreate ( struct Vnode parent,
const char *  name,
int  mode,
struct Vnode **  vnode 
)
static

在文件 vfs_force_umount.c38 行定义.

39{
40 (void)parent;
41 (void)name;
42 (void)mode;
43 (void)vnode;
44 return -EIO;
45}

◆ ErrorVopFscheck()

static int ErrorVopFscheck ( struct Vnode vnode,
struct fs_dirent_s *  dir 
)
static

在文件 vfs_force_umount.c176 行定义.

177{
178 (void)vnode;
179 (void)dir;
180 return -EIO;
181}

◆ ErrorVopGetattr()

static int ErrorVopGetattr ( struct Vnode vnode,
struct stat *  st 
)
static

在文件 vfs_force_umount.c132 行定义.

133{
134 (void)vnode;
135 (void)st;
136 return -EIO;
137}

◆ ErrorVopLink()

static int ErrorVopLink ( struct Vnode src,
struct Vnode dstParent,
struct Vnode **  dst,
const char *  dstName 
)
static

在文件 vfs_force_umount.c183 行定义.

184{
185 (void)src;
186 (void)dstParent;
187 (void)dst;
188 (void)dstName;
189 return -EIO;
190}

◆ ErrorVopLookup()

static int ErrorVopLookup ( struct Vnode parent,
const char *  name,
int  len,
struct Vnode **  vnode 
)
static

在文件 vfs_force_umount.c47 行定义.

48{
49 (void)parent;
50 (void)name;
51 (void)len;
52 (void)vnode;
53 return -EIO;
54}

◆ ErrorVopMkdir()

static int ErrorVopMkdir ( struct Vnode parent,
const char *  dirName,
mode_t  mode,
struct Vnode **  vnode 
)
static

在文件 vfs_force_umount.c94 行定义.

95{
96 (void)parent;
97 (void)dirName;
98 (void)mode;
99 (void)vnode;
100 return -EIO;
101}

◆ ErrorVopOpen()

static int ErrorVopOpen ( struct Vnode vnode,
int  fd,
int  mode,
int  flags 
)
static

在文件 vfs_force_umount.c56 行定义.

57{
58 (void)vnode;
59 (void)fd;
60 (void)mode;
61 (void)flags;
62 return -EIO;
63}

◆ ErrorVopOpendir()

static int ErrorVopOpendir ( struct Vnode vnode,
struct fs_dirent_s *  dir 
)
static

在文件 vfs_force_umount.c110 行定义.

111{
112 (void)vnode;
113 (void)dir;
114 return -EIO;
115}

◆ ErrorVopReaddir()

static int ErrorVopReaddir ( struct Vnode vnode,
struct fs_dirent_s *  dir 
)
static

在文件 vfs_force_umount.c103 行定义.

104{
105 (void)vnode;
106 (void)dir;
107 return -EIO;
108}

◆ ErrorVopReadlink()

static ssize_t ErrorVopReadlink ( struct Vnode vnode,
char *  buffer,
size_t  bufLen 
)
static

在文件 vfs_force_umount.c201 行定义.

202{
203 (void)vnode;
204 (void)buffer;
205 (void)bufLen;
206 return -EIO;
207}

◆ ErrorVopReclaim()

static int ErrorVopReclaim ( struct Vnode vnode)
static

在文件 vfs_force_umount.c72 行定义.

73{
74 (void)vnode;
75 return -EIO;
76}

◆ ErrorVopRename()

static int ErrorVopRename ( struct Vnode src,
struct Vnode dstParent,
const char *  srcName,
const char *  dstName 
)
static

在文件 vfs_force_umount.c153 行定义.

154{
155 (void)src;
156 (void)dstParent;
157 (void)srcName;
158 (void)dstName;
159 return -EIO;
160}

◆ ErrorVopRewinddir()

static int ErrorVopRewinddir ( struct Vnode vnode,
struct fs_dirent_s *  dir 
)
static

在文件 vfs_force_umount.c117 行定义.

118{
119 (void)vnode;
120 (void)dir;
121 return -EIO;
122}

◆ ErrorVopRmdir()

static int ErrorVopRmdir ( struct Vnode parent,
struct Vnode vnode,
const char *  dirName 
)
static

在文件 vfs_force_umount.c86 行定义.

87{
88 (void)parent;
89 (void)vnode;
90 (void)dirName;
91 return -EIO;
92}

◆ ErrorVopSetattr()

static int ErrorVopSetattr ( struct Vnode vnode,
struct stat *  st 
)
static

在文件 vfs_force_umount.c139 行定义.

140{
141 (void)vnode;
142 (void)st;
143 return -EIO;
144}

◆ ErrorVopSymlink()

static int ErrorVopSymlink ( struct Vnode parentVnode,
struct Vnode **  newVnode,
const char *  path,
const char *  target 
)
static

在文件 vfs_force_umount.c192 行定义.

193{
194 (void)parentVnode;
195 (void)newVnode;
196 (void)path;
197 (void)target;
198 return -EIO;
199}

◆ ErrorVopTruncate()

static int ErrorVopTruncate ( struct Vnode vnode,
off_t  len 
)
static

在文件 vfs_force_umount.c162 行定义.

163{
164 (void)vnode;
165 (void)len;
166 return -EIO;
167}

◆ ErrorVopTruncate64()

static int ErrorVopTruncate64 ( struct Vnode vnode,
off64_t  len 
)
static

在文件 vfs_force_umount.c169 行定义.

170{
171 (void)vnode;
172 (void)len;
173 return -EIO;
174}

◆ ErrorVopUnlink()

static int ErrorVopUnlink ( struct Vnode parent,
struct Vnode vnode,
const char *  fileName 
)
static

在文件 vfs_force_umount.c78 行定义.

79{
80 (void)parent;
81 (void)vnode;
82 (void)fileName;
83 return -EIO;
84}

◆ FileDisableAndClean()

static void FileDisableAndClean ( struct Mount mnt)
static

在文件 vfs_force_umount.c397 行定义.

398{
399 struct filelist *flist = &tg_filelist;
400 struct file *filep = NULL;
401 const struct file_operations_vfs *originOps = NULL;
402
403 for (int i = 3; i < CONFIG_NFILE_DESCRIPTORS; i++) {
404 if (!get_bit(i)) {
405 continue;
406 }
407 filep = &flist->fl_files[i];
408 if (filep == NULL || filep->f_vnode == NULL) {
409 continue;
410 }
411 if (filep->f_vnode->originMount != mnt) {
412 continue;
413 }
414 originOps = filep->ops;
415 filep->ops = &g_errorFileOps;
416 FilePreClose(filep, originOps);
417 }
418}
static void FilePreClose(struct file *filep, const struct file_operations_vfs *ops)
static struct file_operations_vfs g_errorFileOps
函数调用图:
这是这个函数的调用关系图:

◆ FilePreClose()

static void FilePreClose ( struct file filep,
const struct file_operations_vfs *  ops 
)
static

在文件 vfs_force_umount.c385 行定义.

386{
387 if (filep->f_oflags & O_DIRECTORY) {
388 DirPreClose(filep->f_dir);
389 return;
390 }
391
392 if (ops && ops->close) {
393 ops->close(filep);
394 }
395}
int f_oflags
void * f_dir
static void DirPreClose(struct fs_dirent_s *dirp)
函数调用图:
这是这个函数的调用关系图:

◆ ForceUmountDev()

int ForceUmountDev ( struct Vnode dev)

在文件 vfs_force_umount.c451 行定义.

452{
453 int ret;
454 struct Vnode *origin = NULL;
455 struct filelist *flist = &tg_filelist;
456 if (dev == NULL) {
457 return -EINVAL;
458 }
459
460 (void)sem_wait(&flist->fl_sem);
461 VnodeHold();
462
463 struct Mount *mnt = GetDevMountPoint(dev);
464 if (mnt == NULL) {
465 VnodeDrop();
466 (void)sem_post(&flist->fl_sem);
467 return -ENXIO;
468 }
469 origin = mnt->vnodeBeCovered;
470
472 VnodeTryFreeAll(mnt);
473 ret = mnt->ops->Unmount(mnt, &dev);
474 if (ret != OK) {
475 PRINT_ERR("unmount in fs failed, ret = %d, errno = %d\n", ret, errno);
476 }
477
479 free(mnt);
480 origin->newMount = NULL;
481 origin->flag &= ~(VNODE_FLAG_MOUNT_ORIGIN);
482
483 VnodeDrop();
484 (void)sem_post(&flist->fl_sem);
485
486 return OK;
487}
LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListDelete(LOS_DL_LIST *node)
Definition: los_list.h:292
void free(void *ptr)
释放ptr所指向的内存空间
Definition: malloc.c:66
int sem_post(sem_t *sem)
增加信号量计数
Definition: semaphore.c:139
int sem_wait(sem_t *sem)
获取信号量
Definition: semaphore.c:77
举例: mount /dev/mmcblk0p0 /bin1/vs/sd vfat 将/dev/mmcblk0p0 挂载到/bin1/vs/sd目录
Definition: mount.h:68
LIST_ENTRY mountList
Definition: mount.h:69
struct Vnode * vnodeBeCovered
Definition: mount.h:71
const struct MountOps * ops
Definition: mount.h:70
int(* Unmount)(struct Mount *mount, struct Vnode **blkdriver)
卸载分区
Definition: mount.h:91
struct Mount * newMount
Definition: vnode.h:181
uint32_t flag
Definition: vnode.h:177
int VnodeDrop(void)
归还锁
Definition: vnode.c:292
int VnodeHold(void)
拿锁,封装互斥量
Definition: vnode.c:283
static void FileDisableAndClean(struct Mount *mnt)
static struct Mount * GetDevMountPoint(struct Vnode *dev)
static void VnodeTryFreeAll(struct Mount *mount)
函数调用图:
这是这个函数的调用关系图:

◆ GetDevMountPoint()

static struct Mount * GetDevMountPoint ( struct Vnode dev)
static

在文件 vfs_force_umount.c356 行定义.

357{
358 struct Mount *mnt = NULL;
359 LIST_HEAD *mntList = GetMountList();
360 if (mntList == NULL) {
361 return NULL;
362 }
363
364 LOS_DL_LIST_FOR_EACH_ENTRY(mnt, mntList, struct Mount, mountList) {
365 if (mnt->vnodeDev == dev) {
366 return mnt;
367 }
368 }
369 return NULL;
370}
LIST_HEAD * GetMountList(void)
获取装载链表,并初始化
Definition: mount.c:71
struct Vnode * vnodeDev
Definition: mount.h:73
函数调用图:
这是这个函数的调用关系图:

◆ VnodeTryFree()

static void VnodeTryFree ( struct Vnode vnode)
static

在文件 vfs_force_umount.c420 行定义.

421{
422 if (vnode->useCount == 0) {
423 VnodeFree(vnode);
424 return;
425 }
426
427 VnodePathCacheFree(vnode);
428 LOS_ListDelete(&(vnode->hashEntry));
430
431 if (vnode->vop->Reclaim) {
432 vnode->vop->Reclaim(vnode);
433 }
434 vnode->vop = &g_errorVnodeOps;
435 vnode->fop = &g_errorFileOps;
436}
void VnodePathCacheFree(struct Vnode *vnode)
和长辈,晚辈告别,从此不再是父亲和孩子.
Definition: path_cache.c:199
int useCount
Definition: vnode.h:166
LIST_ENTRY hashEntry
Definition: vnode.h:178
struct file_operations_vfs * fop
Definition: vnode.h:175
LIST_ENTRY actFreeEntry
Definition: vnode.h:179
int(* Reclaim)(struct Vnode *vnode)
回 收节点
Definition: vnode.h:197
int VnodeFree(struct Vnode *vnode)
是否 vnode 节点
Definition: vnode.c:212
static struct VnodeOps g_errorVnodeOps
函数调用图:
这是这个函数的调用关系图:

◆ VnodeTryFreeAll()

static void VnodeTryFreeAll ( struct Mount mount)
static

在文件 vfs_force_umount.c438 行定义.

439{
440 struct Vnode *vnode = NULL;
441 struct Vnode *nextVnode = NULL;
442
443 LOS_DL_LIST_FOR_EACH_ENTRY_SAFE(vnode, nextVnode, GetVnodeActiveList(), struct Vnode, actFreeEntry) {
444 if ((vnode->originMount != mount) || (vnode->flag & VNODE_FLAG_MOUNT_NEW)) {
445 continue;
446 }
447 VnodeTryFree(vnode);
448 }
449}
struct Mount * originMount
Definition: vnode.h:180
LIST_HEAD * GetVnodeActiveList(void)
Definition: vnode.c:736
static void VnodeTryFree(struct Vnode *vnode)
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ g_errorFileOps

struct file_operations_vfs g_errorFileOps
static
初始值:
= {
.open = ErrorFopOpen,
.close = ErrorFopClose,
.read = ErrorFopRead,
.write = ErrorFopWrite,
.seek = ErrorFopSeek,
.ioctl = ErrorFopIoctl,
.mmap = ErrorFopMmap,
.poll = ErrorFopPoll,
.stat = ErrorFopStat,
.fallocate = ErrorFopFallocate,
.fallocate64 = ErrorFopFallocate64,
.fsync = ErrorFopFsync,
.readpage = ErrorFopReadpage,
.unlink = ErrorFopUnlink,
}
static int ErrorFopStat(struct file *filep, struct stat *st)
static ssize_t ErrorFopWrite(struct file *filep, const char *buffer, size_t buflen)
static int ErrorFopOpen(struct file *filep)
static int ErrorFopMmap(struct file *filep, struct VmMapRegion *region)
static int ErrorFopFallocate(struct file *filep, int mode, off_t offset, off_t len)
static ssize_t ErrorFopReadpage(struct file *filep, char *buffer, size_t buflen)
static int ErrorFopIoctl(struct file *filep, int cmd, unsigned long arg)
static int ErrorFopUnlink(struct Vnode *vnode)
static int ErrorFopFsync(struct file *filep)
static ssize_t ErrorFopRead(struct file *filep, char *buffer, size_t buflen)
static int ErrorFopClose(struct file *filep)
static int ErrorFopFallocate64(struct file *filep, int mode, off64_t offset, off64_t len)
static int ErrorFopPoll(struct file *filep, poll_table *fds)
static off_t ErrorFopSeek(struct file *filep, off_t offset, int whence)

在文件 vfs_force_umount.c339 行定义.

◆ g_errorVnodeOps

struct VnodeOps g_errorVnodeOps
static
初始值:
= {
.Create = ErrorVopCreate,
.Lookup = ErrorVopLookup,
.Open = ErrorVopOpen,
.Close = ErrorVopClose,
.Reclaim = ErrorVopReclaim,
.Unlink = ErrorVopUnlink,
.Rmdir = ErrorVopRmdir,
.Mkdir = ErrorVopMkdir,
.Readdir = ErrorVopReaddir,
.Opendir = ErrorVopOpendir,
.Rewinddir = ErrorVopRewinddir,
.Closedir = ErrorVopClosedir,
.Getattr = ErrorVopGetattr,
.Setattr = ErrorVopSetattr,
.Chattr = ErrorVopChattr,
.Rename = ErrorVopRename,
.Truncate = ErrorVopTruncate,
.Truncate64 = ErrorVopTruncate64,
.Fscheck = ErrorVopFscheck,
.Link = ErrorVopLink,
.Symlink = ErrorVopSymlink,
.Readlink = ErrorVopReadlink,
}
static int ErrorVopTruncate64(struct Vnode *vnode, off64_t len)
static int ErrorVopChattr(struct Vnode *vnode, struct IATTR *attr)
static int ErrorVopOpen(struct Vnode *vnode, int fd, int mode, int flags)
static int ErrorVopClosedir(struct Vnode *vnode, struct fs_dirent_s *dir)
static int ErrorVopRewinddir(struct Vnode *vnode, struct fs_dirent_s *dir)
static int ErrorVopGetattr(struct Vnode *vnode, struct stat *st)
static int ErrorVopMkdir(struct Vnode *parent, const char *dirName, mode_t mode, struct Vnode **vnode)
static int ErrorVopReclaim(struct Vnode *vnode)
static int ErrorVopSymlink(struct Vnode *parentVnode, struct Vnode **newVnode, const char *path, const char *target)
static int ErrorVopOpendir(struct Vnode *vnode, struct fs_dirent_s *dir)
static int ErrorVopLookup(struct Vnode *parent, const char *name, int len, struct Vnode **vnode)
static int ErrorVopRename(struct Vnode *src, struct Vnode *dstParent, const char *srcName, const char *dstName)
static int ErrorVopCreate(struct Vnode *parent, const char *name, int mode, struct Vnode **vnode)
static ssize_t ErrorVopReadlink(struct Vnode *vnode, char *buffer, size_t bufLen)
static int ErrorVopClose(struct Vnode *vnode)
static int ErrorVopUnlink(struct Vnode *parent, struct Vnode *vnode, const char *fileName)
static int ErrorVopRmdir(struct Vnode *parent, struct Vnode *vnode, const char *dirName)
static int ErrorVopReaddir(struct Vnode *vnode, struct fs_dirent_s *dir)
static int ErrorVopFscheck(struct Vnode *vnode, struct fs_dirent_s *dir)
static int ErrorVopSetattr(struct Vnode *vnode, struct stat *st)
static int ErrorVopTruncate(struct Vnode *vnode, off_t len)
static int ErrorVopLink(struct Vnode *src, struct Vnode *dstParent, struct Vnode **dst, const char *dstName)

在文件 vfs_force_umount.c209 行定义.