函数fil_node_create
2024-10-12 21:39:22
/*******************************************************************//** Appends a new file to the chain of files of a space. File must be closed. */ UNIV_INTERN void fil_node_create( /*============*/ const char* name, /*!< in: file name (file must be closed) */ ulint size, /*!< in: file size in database blocks, rounded downwards to an integer */ ulint id, /*!< in: space id where to append */ ibool is_raw) /*!< in: TRUE if a raw device or a raw disk partition */ { fil_node_t* node; fil_space_t* space; ut_a(fil_system); ut_a(name); mutex_enter(&fil_system->mutex); node = mem_alloc(sizeof(fil_node_t)); node->name = mem_strdup(name); node->open = FALSE; ut_a(!is_raw || srv_start_raw_disk_in_use); node->is_raw_disk = is_raw; node->size = size; node->magic_n = FIL_NODE_MAGIC_N; node->n_pending = ; node->n_pending_flushes = ; node->modification_counter = ; node->flush_counter = ; space = fil_space_get_by_id(id); if (!space) { return; } space->size += size; node->space = space; UT_LIST_ADD_LAST(chain, space->chain, node); if (id < SRV_LOG_SPACE_FIRST_ID && fil_system->max_assigned_id < id) { fil_system->max_assigned_id = id; } mutex_exit(&fil_system->mutex); }
最新文章
- 菜鸟学Struts2——零配置(Convention )
- 在 Linux 中使用 Git 及其 和 Eclipse 的集成
- 在Web工程中引入Jquery插件报错解决方案
- Linux 路线 推荐
- canvas调节视频颜色
- Java druid
- log4net.dll配置以及在项目中应用 zt
- SIM卡基础,各管脚意义,封装定义
- mysql升级后报Table &#39;mysql.servers&#39; doesn&#39;t exist
- zoj 2110
- 执行命令行并等待完成(使用WaitForSingleObject达到目的)
- js 正则学习小记之NFA引擎
- java框架之springboot
- npm 无法安装 ionic 解决办法
- Scaleform Gfx的Demo
- drupal
- .gitignore不生效解决办法
- 动态规划--最长上升子序列(Longest increasing subsequence)
- NOIP2017 游记
- 机器学习 Python实践-K近邻算法
热门文章
- 【转】android如何浏览并选择图片 音频 视频
- Openmeeting 网页打开缓慢,视频卡的一个解决方法
- Codeforces Round #360 (Div. 2) E. The Values You Can Make 01背包
- 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。例如,“student. a am I”。后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a student.”。Cat对一一的翻转这些单词顺序可不在行,你能帮助他么?
- 使用highcharts 绘制Web图表
- [转载]c# OpenFileDialog
- 从String类看写C++ class需要注意的地方
- BitNami一键安装Redmine(转)
- java基础知识回顾之javaIO类--管道流PipedOutputStream和PipedIutputStream
- Linux解压 tar命令