/* The client set in ocd_cksum_types the checksum types it
* supports. We have to mask off the algorithms that we don't
* support */
- if (cksum_types & OBD_CKSUM_ALL)
- data->ocd_cksum_types &= OBD_CKSUM_ALL;
- else
+ data->ocd_cksum_types &= cksum_types_supported();
+
+ /* 1.6.4- only support CRC32 and didn't set ocd_cksum_types */
+ if (unlikely(data->ocd_cksum_types == 0))
data->ocd_cksum_types = OBD_CKSUM_CRC32;
CDEBUG(D_RPCTRACE, "%s: cli %s supports cksum type %x, return "
LPU64"\n", obd->obd_name, osfs->os_bavail <<
obd->u.obt.obt_vfsmnt->mnt_sb->s_blocksize_bits);
*num = 0;
+ if (oa->o_valid & OBD_MD_FLFLAGS)
+ oa->o_flags |= OBD_FL_NOSPC_BLK;
+ else {
+ oa->o_valid |= OBD_MD_FLFLAGS;
+ oa->o_flags = OBD_FL_NOSPC_BLK;
+ }
+
rc = -ENOSPC;
}
OBD_FREE(osfs, sizeof(*osfs));
CERROR("create failed rc = %d\n", rc);
if (rc == -ENOSPC) {
os_ffree = filter_calc_free_inodes(obd);
- if (os_ffree != -1)
+ if (os_ffree == -1)
+ GOTO(cleanup, rc);
+
+ if (obd->obd_osfs.os_bavail <
+ (obd->obd_osfs.os_blocks >> 10)) {
+ if (oa->o_valid & OBD_MD_FLFLAGS)
+ oa->o_flags |= OBD_FL_NOSPC_BLK;
+ else {
+ oa->o_valid |= OBD_MD_FLFLAGS;
+ oa->o_flags = OBD_FL_NOSPC_BLK;
+ }
+
CERROR("%s: free inode "LPU64"\n",
obd->obd_name, os_ffree);
+ }
}
GOTO(cleanup, rc);
}
fed = &exp->exp_filter_data;
filter = &obd->u.filter;
- if (fed->fed_group != oa->o_seq) {
+ /* 1.8 client doesn't carry the ocd_group with connect request,
+ * so the fed_group will always be zero for 1.8 client. */
+ if (!(exp->exp_connect_flags & OBD_CONNECT_FULL20)) {
+ if (oa->o_seq != FID_SEQ_OST_MDT0 &&
+ oa->o_seq != FID_SEQ_LLOG &&
+ oa->o_seq != FID_SEQ_ECHO) {
+ CERROR("The request from older client has invalid"
+ " group "LPU64"!\n", oa->o_seq);
+ RETURN(-EINVAL);
+ }
+ } else if (fed->fed_group != oa->o_seq) {
CERROR("%s: this export (nid %s) used object group %d "
"earlier; now it's trying to use group "LPU64"!"
" This could be a bug in the MDS. Please report to "