int vnlayer_remount_fs( struct super_block *super_p, int *flags, char *data ) { VFS_T *vfsp = SBTOVFS(super_p); VFS_LOG(vfsp, VFS_LOG_ERR, "Vnode/VFS does not support remounting of file systems (sb=%p)\n", super_p); return -EINVAL; }
void vnlayer_put_super(struct super_block *super_p) { int err; CALL_DATA_T cd; ASSERT_KERNEL_LOCKED(); ASSERT_SB_LOCKED(super_p); mdki_linux_init_call_data(&cd); err = VFS_UNMOUNT(SBTOVFS(super_p), &cd); mdki_linux_destroy_call_data(&cd); if (err != 0) { VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "Linux file system interface doesn't let vnode/vfs reject unmounts: error %d\n", err); } return /* mdki_errno_unix_to_linux(err)*/; }
void vnlayer_put_super(struct super_block *super_p) { int err; CRED_T *cred; ASSERT_KERNEL_LOCKED(); ASSERT_SB_LOCKED(super_p); cred = MDKI_GET_UCRED(); err = VFS_UNMOUNT(SBTOVFS(super_p), cred); MDKI_CRFREE(cred); if (err != 0) { VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "Linux file system interface doesn't let vnode/vfs reject unmounts: error %d\n", err); } return /* mdki_errno_unix_to_linux(err)*/; }
void vnlayer_write_super(struct super_block *super_p) { CALL_DATA_T cd; int err; ASSERT_SB_LOCKED(super_p); mdki_linux_init_call_data(&cd); err = VFS_SYNC(SBTOVFS(super_p), SBTOVFS(super_p), 0, &cd); mdki_linux_destroy_call_data(&cd); /* They rewrote sync_supers so that it won't proceed through their loop * until the dirty bit is cleared. */ super_p->s_dirt = 0; if (err != 0) VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "%s: error %d syncing\n", __func__, err); return /* mdki_errno_unix_to_linux(err) */; }
void vnlayer_write_super(struct super_block *super_p) { CRED_T *cred; int err; ASSERT_SB_LOCKED(super_p); cred = MDKI_GET_UCRED(); err = VFS_SYNC(SBTOVFS(super_p), SBTOVFS(super_p), 0, cred); MDKI_CRFREE(cred); /* They rewrote sync_supers so that it won't proceed through their loop * until the dirty bit is cleared. */ super_p->s_dirt = 0; if (err != 0) VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "%s: error %d syncing\n", __func__, err); return /* mdki_errno_unix_to_linux(err) */; }
/* They rewrote sync_supers so that it won't proceed through their loop * until the dirty bit is cleared. */ super_p->s_dirt = 0; if (err != 0) VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "%s: error %d syncing\n", __func__, err); return /* mdki_errno_unix_to_linux(err) */; } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ int vnlayer_sync_super( struct super_block *super_p, int wait ) { CALL_DATA_T cd; int err; /* if wait is not allowed, do nothing */ if (wait == 0) { return 0; } ASSERT_SB_LOCKED(super_p); mdki_linux_init_call_data(&cd); err = VFS_SYNC(SBTOVFS(super_p), SBTOVFS(super_p), 0, &cd); mdki_linux_destroy_call_data(&cd); if (err != 0) { VFS_LOG(SBTOVFS(super_p), VFS_LOG_ERR, "%s: error %d syncing\n", __func__, err); } return mdki_errno_unix_to_linux(err); }