Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d43f3612 authored by Evgeniy Polyakov's avatar Evgeniy Polyakov Committed by Greg Kroah-Hartman
Browse files

Staging: Pohmelfs: Add load balancing between network states with the same priority.

parent e0ca8739
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,8 @@ static int pohmelfs_send_lock_trans(struct pohmelfs_inode *pi,
	path_len = err;
	path_len = err;


	err = -ENOMEM;
	err = -ENOMEM;
	t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize, 0, 0);
	t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize,
			NETFS_TRANS_SINGLE_DST, 0);
	if (!t)
	if (!t)
		goto err_out_exit;
		goto err_out_exit;


+3 −0
Original line number Original line Diff line number Diff line
@@ -467,6 +467,9 @@ int netfs_trans_finish_send(struct netfs_trans *t, struct pohmelfs_sb *psb)
				continue;
				continue;
		}
		}


		if (psb->active_state && (psb->active_state->state.ctl.prio >= st->ctl.prio))
			st = &psb->active_state->state;

		err = netfs_trans_push(t, st);
		err = netfs_trans_push(t, st);
		if (!err && (t->flags & NETFS_TRANS_SINGLE_DST))
		if (!err && (t->flags & NETFS_TRANS_SINGLE_DST))
			break;
			break;