if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;
+ /* this is cfs's dev_rdonly check */
-+ if (bio->bi_rw == WRITE &&
++ if (bio_rw(bio) == WRITE &&
+ dev_check_rdonly(bio->bi_bdev)) {
+ bio_endio(bio, bio->bi_size, 0);
+ break;
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;
+ /* this is cfs's dev_rdonly check */
-+ if (bio->bi_rw == WRITE &&
++ if (bio_rw(bio) == WRITE &&
+ dev_check_rdonly(bio->bi_bdev)) {
+ bio_endio(bio, bio->bi_size, 0);
+ break;
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;
+ /* this is cfs's dev_rdonly check */
-+ if (bio->bi_rw == WRITE &&
++ if (bio_rw(bio) == WRITE &&
+ dev_check_rdonly(bio->bi_bdev)) {
+ bio_endio(bio, 0);
+ break;
if (!med->med_lcd)
RETURN(0);
+ /* Do not erase record for recoverable client. */
+ if (obd->obd_fail && !exp->exp_failed)
+ GOTO(free, 0);
+
/* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
if (!strcmp(med->med_lcd->lcd_uuid, obd->obd_uuid.uuid))
GOTO(free, 0);
obd->obd_fail = 1;
obd->obd_no_transno = 1;
obd->obd_no_recov = 1;
- /* Set the obd readonly if we can */
- if (OBP(obd, iocontrol))
- obd_iocontrol(OBD_IOC_SET_READONLY,
+ if (OBP(obd, iocontrol)) {
+ obd_iocontrol(OBD_IOC_SYNC,
obd->obd_self_export,
0, NULL, NULL);
+ }
break;
default:
CERROR("unrecognised flag '%c'\n",
if (fed->fed_lcd == NULL)
RETURN(0);
+ /* Do not erase record for recoverable client. */
+ if (obd->obd_fail && !exp->exp_failed)
+ GOTO(free, 0);
+
/* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
if (strcmp(fed->fed_lcd->lcd_uuid, obd->obd_uuid.uuid ) == 0)
GOTO(free, 0);