Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On 2003-12-31T17:46:12, Lars Ellenberg <l.g.e at web.de> said: > to avoid the common case where people think drbd is HA-filesharing: > fail IO requests unless Primary > syslogd in the default setting most often does a wall for KERN_EMERG. > KERN_ALERT might be good enough, too. Pretty please! Yes! ;-) This is very important. Failing IO requests on the secondary is very helpful and will confuse users much less than the current state. > Is this acceptable? Yes. But I'd only add it to 0.7 and not introduce new code into 0.6... > - if(mdev->cstate < StandAlone || MINOR(bh->b_rdev) >= minor_count) { > + if ( mdev->cstate < StandAlone > + || mdev->state != Primary > + || MINOR(bh->b_rdev) >= minor_count ) > + { > + if (mdev->state != Primary) { > + printk(KERN_EMERG DEVICE_NAME > + "%d: not in Primary state, " > + "failing IO-request [%s/%d]\n", > + (int)(mdev-drbd_conf), > + current->comm,current->pid); > + } This is good, but failing the device opening first would be even better? Sincerely, Lars Marowsky-Brée <lmb at suse.de> -- High Availability & Clustering \ ever tried. ever failed. no matter. SUSE Labs | try again. fail again. fail better. Research & Development, SUSE LINUX AG \ -- Samuel Beckett