*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
LASSERT(page != NULL);
LASSERT(pageoffset >= 0);
LASSERT(len > 0);
- LASSERT(pageoffset + len <= PAGE_CACHE_SIZE);
+ LASSERT(pageoffset + len <= PAGE_SIZE);
LASSERT(ptlrpc_is_bulk_desc_kiov(desc->bd_type));
kiov = &BD_GET_KIOV(desc, desc->bd_iov_count);
desc->bd_nob += len;
if (pin)
- page_cache_get(page);
+ get_page(page);
kiov->kiov_page = page;
kiov->kiov_offset = pageoffset;
lnet_nid_t nid = imp->imp_connection->c_peer.nid;
__u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
- if (ptlrpc_console_allow(req))
+ /* -EAGAIN is normal when using POSIX flocks */
+ if (ptlrpc_console_allow(req) &&
+ !(opc == LDLM_ENQUEUE && err == -EAGAIN))
LCONSOLE_ERROR_MSG(0x11, "%s: operation %s to node %s "
"failed: rc = %d\n",
imp->imp_obd->obd_name,
} else { /* needs to generate a new matchbits for resend */
__u64 old_mbits = req->rq_mbits;
- if ((bd->bd_import->imp_connect_data.ocd_connect_flags &
- OBD_CONNECT_BULK_MBITS) != 0) {
+ if (OCD_HAS_FLAG(&bd->bd_import->imp_connect_data, BULK_MBITS)){
req->rq_mbits = ptlrpc_next_xid();
} else {/* old version transfers rq_xid to peer as matchbits */
spin_lock(&req->rq_import->imp_lock);
* see LU-1431 */
req->rq_mbits += ((bd->bd_iov_count + LNET_MAX_IOV - 1) /
LNET_MAX_IOV) - 1;
+
+ /* Set rq_xid as rq_mbits to indicate the final bulk for the old
+ * server which does not support OBD_CONNECT_BULK_MBITS. LU-6808 */
+ if (!OCD_HAS_FLAG(&bd->bd_import->imp_connect_data, BULK_MBITS))
+ req->rq_xid = req->rq_mbits;
}
/**