]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
raid1: use an int as the return value of raise_barrier()
authorHou Tao <houtao1@huawei.com>
Tue, 2 Jul 2019 14:35:48 +0000 (22:35 +0800)
committerSong Liu <songliubraving@fb.com>
Wed, 7 Aug 2019 17:25:02 +0000 (10:25 -0700)
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>
drivers/md/raid1.c

index 34e26834ad28bd15ab18a216ed324bf0aab090dc..108c75006cefefb891ae2391137023a713376046 100644 (file)
@@ -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);