/*******************************************************************//**
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);
}

最新文章

  1. 菜鸟学Struts2——零配置(Convention )
  2. 在 Linux 中使用 Git 及其 和 Eclipse 的集成
  3. 在Web工程中引入Jquery插件报错解决方案
  4. Linux 路线 推荐
  5. canvas调节视频颜色
  6. Java druid
  7. log4net.dll配置以及在项目中应用 zt
  8. SIM卡基础,各管脚意义,封装定义
  9. mysql升级后报Table &#39;mysql.servers&#39; doesn&#39;t exist
  10. zoj 2110
  11. 执行命令行并等待完成(使用WaitForSingleObject达到目的)
  12. js 正则学习小记之NFA引擎
  13. java框架之springboot
  14. npm 无法安装 ionic 解决办法
  15. Scaleform Gfx的Demo
  16. drupal
  17. .gitignore不生效解决办法
  18. 动态规划--最长上升子序列(Longest increasing subsequence)
  19. NOIP2017 游记
  20. 机器学习 Python实践-K近邻算法

热门文章

  1. 【转】android如何浏览并选择图片 音频 视频
  2. Openmeeting 网页打开缓慢,视频卡的一个解决方法
  3. Codeforces Round #360 (Div. 2) E. The Values You Can Make 01背包
  4. 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。例如,“student. a am I”。后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a student.”。Cat对一一的翻转这些单词顺序可不在行,你能帮助他么?
  5. 使用highcharts 绘制Web图表
  6. [转载]c# OpenFileDialog
  7. 从String类看写C++ class需要注意的地方
  8. BitNami一键安装Redmine(转)
  9. java基础知识回顾之javaIO类--管道流PipedOutputStream和PipedIutputStream
  10. Linux解压 tar命令