R_SECONDARY
{ .role = R_SECONDARY,
if (device->state.role == R_SECONDARY &&
device->state.peer == R_SECONDARY) {
if (device->state.conn == C_STANDALONE && device->state.role == R_SECONDARY) {
device->state.role == R_SECONDARY) {
retcode = drbd_set_role(peer_device->device, R_SECONDARY, 0);
if (new_role == R_SECONDARY) {
set_disk_ro(device->vdisk, new_role == R_SECONDARY);
rv = drbd_set_role(adm_ctx.device, R_SECONDARY, 0);
state.role == R_SECONDARY) {
if (hg == -1 && device->state.role == R_SECONDARY)
rv2 = drbd_change_state(device, CS_VERBOSE, NS(role, R_SECONDARY));
rv2 = drbd_change_state(device, CS_VERBOSE, NS(role, R_SECONDARY));
if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY)
os.peer == R_SECONDARY && ns.peer == R_PRIMARY)
if (os.peer == R_PRIMARY && ns.peer == R_SECONDARY)
if (os.role == R_PRIMARY && ns.role == R_SECONDARY &&
ns.role == R_SECONDARY) {
{ .role = R_SECONDARY,
.role = R_SECONDARY,
device->state.role != R_SECONDARY) {
if (role1 == R_SECONDARY || role2 == R_SECONDARY)
return R_SECONDARY;
if (role1 == R_SECONDARY || role2 == R_SECONDARY)
return R_SECONDARY;
enum drbd_role role = R_SECONDARY;
else if (ns.role == R_SECONDARY && device->open_cnt)
[R_SECONDARY] = "Secondary",
return s > R_SECONDARY ? "TOO_LARGE" : drbd_role_s_names[s];