}
}
- req_capsule_set_size(&req->rq_pill, &RMF_RCS, RCL_SERVER, 0);
rc = req_capsule_server_pack(&req->rq_pill);
if (rc)
GOTO(out, rc);
repbody->oa.o_gid = o_gid;
}
+ /*
+ * Disable sending mtime back to the client. If the client locked the
+ * whole object, then it has already updated the mtime on its side,
+ * otherwise it will have to glimpse anyway (see bug 21489, comment 32)
+ */
+ repbody->oa.o_valid &= ~(OBD_MD_FLMTIME | OBD_MD_FLATIME);
+
if (unlikely(client_cksum != server_cksum && rc == 0)) {
int new_cksum = ost_checksum_bulk(desc, OST_WRITE, cksum_type);
char *msg;
if (desc)
ptlrpc_free_bulk(desc);
out:
+ /* XXX: don't send reply if obd rdonly mode, this can cause data loss
+ * on client, see bug 22190. Remove this when async bulk will be done.
+ * Meanwhile, if this is umount then don't reply anything. */
+ if (req->rq_export->exp_obd->obd_no_transno) {
+ no_reply = req->rq_export->exp_obd->obd_stopping;
+ rc = -EIO;
+ }
+
if (rc == 0) {
oti_to_request(oti, req);
target_committed_to_req(req);
* it doesn't change).
*/
req_capsule_init(&req->rq_pill, req, RCL_SERVER);
- req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
+ if (opc == OST_READ)
+ req_capsule_set(&req->rq_pill,
+ &RQF_OST_BRW_READ);
+ else
+ req_capsule_set(&req->rq_pill,
+ &RQF_OST_BRW_WRITE);
body = req_capsule_client_get(&req->rq_pill,
&RMF_OST_BODY);
req_capsule_init(&req->rq_pill, req, RCL_SERVER);
if (lustre_msg_get_opc(req->rq_reqmsg) != OST_CONNECT) {
- int recovering;
-
if (!class_connected_export(req->rq_export)) {
CDEBUG(D_HA,"operation %d on unconnected OST from %s\n",
lustre_msg_get_opc(req->rq_reqmsg),
obd = req->rq_export->exp_obd;
/* Check for aborted recovery. */
- cfs_spin_lock_bh(&obd->obd_processing_task_lock);
- recovering = obd->obd_recovering;
- cfs_spin_unlock_bh(&obd->obd_processing_task_lock);
- if (recovering) {
+ if (obd->obd_recovering) {
rc = ost_filter_recovery_request(req, obd,
&should_process);
if (rc || !should_process)
rc = ost_setattr(req->rq_export, req, oti);
break;
case OST_WRITE:
- req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
+ req_capsule_set(&req->rq_pill, &RQF_OST_BRW_WRITE);
CDEBUG(D_INODE, "write\n");
/* req->rq_request_portal would be nice, if it was set */
if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){
/* ost_brw_write sends its own replies */
RETURN(rc);
case OST_READ:
- req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
+ req_capsule_set(&req->rq_pill, &RQF_OST_BRW_READ);
CDEBUG(D_INODE, "read\n");
/* req->rq_request_portal would be nice, if it was set */
if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){