summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2019-07-02 16:35:48 +0200
committerSong Liu <songliubraving@fb.com>2019-08-07 19:25:02 +0200
commit4675719d0f47d18bc13db62bd21cffd4e4ec8001 (patch)
treeedaccec92cd9d7816f75bf6237c74ce180824371 /drivers/md/raid1.c
parentblock: stop exporting bio_map_kern (diff)
downloadlinux-4675719d0f47d18bc13db62bd21cffd4e4ec8001.tar.xz
linux-4675719d0f47d18bc13db62bd21cffd4e4ec8001.zip
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: Hou Tao <houtao1@huawei.com> Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 34e26834ad28..108c75006cef 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -872,8 +872,11 @@ static void flush_pending_writes(struct r1conf *conf)
* backgroup IO calls must call raise_barrier. Once that returns
* there is no normal IO happeing. It must arrange to call
* 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);