提交 4675719d 编写于 作者: H Hou Tao 提交者: Song Liu

raid1: use an int as the return value of raise_barrier()

Using a sector_t as the return value is misleading, because
raise_barrier() only return 0 or -EINTR.

Also add comments for the return values of raise_barrier().
Signed-off-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NSong Liu <songliubraving@fb.com>
上级 00ec4f30
...@@ -872,8 +872,11 @@ static void flush_pending_writes(struct r1conf *conf) ...@@ -872,8 +872,11 @@ static void flush_pending_writes(struct r1conf *conf)
* backgroup IO calls must call raise_barrier. Once that returns * backgroup IO calls must call raise_barrier. Once that returns
* there is no normal IO happeing. It must arrange to call * there is no normal IO happeing. It must arrange to call
* lower_barrier when the particular background IO completes. * lower_barrier when the particular background IO completes.
*
* If resync/recovery is interrupted, returns -EINTR;
* Otherwise, returns 0.
*/ */
static sector_t raise_barrier(struct r1conf *conf, sector_t sector_nr) static int raise_barrier(struct r1conf *conf, sector_t sector_nr)
{ {
int idx = sector_to_idx(sector_nr); int idx = sector_to_idx(sector_nr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册