mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-25 01:39:56 +07:00
drbd: drbd_send_ov_request(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
fa79abd893
commit
5b9f499c66
@ -1342,15 +1342,13 @@ int drbd_send_drequest_csum(struct drbd_conf *mdev, sector_t sector, int size,
|
|||||||
|
|
||||||
int drbd_send_ov_request(struct drbd_conf *mdev, sector_t sector, int size)
|
int drbd_send_ov_request(struct drbd_conf *mdev, sector_t sector, int size)
|
||||||
{
|
{
|
||||||
int ok;
|
|
||||||
struct p_block_req p;
|
struct p_block_req p;
|
||||||
|
|
||||||
p.sector = cpu_to_be64(sector);
|
p.sector = cpu_to_be64(sector);
|
||||||
p.block_id = ID_SYNCER /* unused */;
|
p.block_id = ID_SYNCER /* unused */;
|
||||||
p.blksize = cpu_to_be32(size);
|
p.blksize = cpu_to_be32(size);
|
||||||
|
|
||||||
ok = !drbd_send_cmd(mdev, &mdev->tconn->data, P_OV_REQUEST, &p.head, sizeof(p));
|
return drbd_send_cmd(mdev, &mdev->tconn->data, P_OV_REQUEST, &p.head, sizeof(p));
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called on sndtimeo
|
/* called on sndtimeo
|
||||||
|
@ -695,7 +695,7 @@ static int w_make_ov_request(struct drbd_work *w, int cancel)
|
|||||||
size = (capacity-sector)<<9;
|
size = (capacity-sector)<<9;
|
||||||
|
|
||||||
inc_rs_pending(mdev);
|
inc_rs_pending(mdev);
|
||||||
if (!drbd_send_ov_request(mdev, sector, size)) {
|
if (drbd_send_ov_request(mdev, sector, size)) {
|
||||||
dec_rs_pending(mdev);
|
dec_rs_pending(mdev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user