---
title: 更改填充值模式
description: "更改填充值模式以提高写入性能。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/userg_hyperio_0046.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/userg_hyperio_0046.html
indexId: b1c252697e88d19f63094c9927799bd2ae4c1c2755fb883544fe34c8d9939fcb58
---
# 更改填充值模式

#### 函数定义

更改填充值模式以提高写入性能。


nc_set_fill(int ncid, int fillmode, int *old_modep)

#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| ncid | 文件ID | 非负整数 | 输入 |
| fillmode | 填充模式 | 0或0x100 | 输入 |
| \*old\_modep | 返回之前填充模式的指针 | 非空 | 输出 |


#### 返回值

- 成功：返回NC_NOERR。
- 失败：返回错误码。


#### 错误码

| 错误码 | 描述 |
| --- | --- |
| NC\_EBADID | 无效ncid |
| NC\_EINVAL | 无效参数 |
| NC\_ENOMEM | 内存不足 |
