obd_time ctime;
__u64 blocks; /* XID, in the case of MDS_READPAGE */
__u64 ioepoch;
- __u64 ino;
+ __u64 unused1; /* was "ino" until 2.4.0 */
__u32 fsuid;
__u32 fsgid;
__u32 capability;
__u32 flags; /* from vfs for pin/unpin, LUSTRE_BFLAG close */
__u32 rdev;
__u32 nlink; /* #bytes to read in the case of MDS_READPAGE */
- __u32 generation;
+ __u32 unused2; /* was "generation" until 2.4.0 */
__u32 suppgid;
__u32 eadatasize;
__u32 aclsize;
MDS_RECOV_OPEN = 1 << 8,
MDS_DATA_MODIFIED = 1 << 9,
MDS_CREATE_VOLATILE = 1 << 10,
+ MDS_OWNEROVERRIDE = 1 << 11,
};
/* instance of mdt_reint_rec */
int eadatalen;
} sp_ea;
} u;
- /** don't create lov objects or llog cookie - this replay */
- int no_create;
/** Create flag from client: such as MDS_OPEN_CREAT, and others. */
__u64 sp_cr_flags;
- /** Should mdd do lookup sanity check or not. */
- int sp_cr_lookup;
+ /** don't create lov objects or llog cookie - this replay */
+ unsigned int no_create:1,
+ /** Should mdd do lookup sanity check or not. */
+ sp_cr_lookup:1;
/** Current lock mode for parent dir where create is performing. */
mdl_mode_t sp_cr_mode;
struct lu_fid *fid = &info->mti_fid;
struct mdd_object *obj = md2mdd_obj(pobj);
struct mdd_device *m = mdo2mdd(pobj);
- int lookup = spec->sp_cr_lookup;
int rc;
ENTRY;
* exists or not because MDT performs lookup for it.
* name length check is done in lookup.
*/
- if (lookup) {
+ if (spec->sp_cr_lookup) {
/*
* Check if the name already exist, though it will be checked in
* _index_insert also, for avoiding rolling back if exists
la->la_valid &= ~(LA_MTIME | LA_CTIME);
} else {
if (la->la_valid & (LA_SIZE | LA_BLOCKS)) {
- if (!((flags & MDS_OPEN_OWNEROVERRIDE) &&
+ if (!((flags & MDS_OWNEROVERRIDE) &&
(uc->uc_fsuid == tmp_la->la_uid)) &&
!(flags & MDS_PERM_BYPASS)) {
rc = mdd_permission_internal(env, obj,
tmp_la, MAY_WRITE);
- if (rc)
- RETURN(rc);
- }
+ if (rc != 0)
+ RETURN(rc);
+ }
}
if (la->la_valid & LA_CTIME) {
/* The pure setattr, it has the priority over what is
if (fid) {
b->fid1 = *fid;
b->valid |= OBD_MD_FLID;
-
- /* FIXME: these should be fixed when new igif ready.*/
- b->ino = fid_oid(fid); /* 1.6 compatibility */
- b->generation = fid_ver(fid); /* 1.6 compatibility */
- b->valid |= OBD_MD_FLGENER; /* 1.6 compatibility */
-
CDEBUG(D_INODE, DFID": nlink=%d, mode=%o, size="LPU64"\n",
PFID(fid), b->nlink, b->mode, b->size);
}
acl_size = body->aclsize;
/* this replay - not send info to client */
- if (info->mti_spec.no_create == 1) {
- md_size = 0;
- acl_size = 0;
- }
+ if (info->mti_spec.no_create) {
+ md_size = 0;
+ acl_size = 0;
+ }
CDEBUG(D_INFO, "Shrink to md_size = %d cookie/acl_size = %d"
" MDSCAPA = %llx, OSSCAPA = %llx\n",
if (in & ATTR_KILL_SGID)
out |= LA_KILL_SGID;
- if (in & MDS_OPEN_OWNEROVERRIDE)
- ma->ma_attr_flags |= MDS_OPEN_OWNEROVERRIDE;
+ if (in & MDS_OPEN_OWNEROVERRIDE)
+ ma->ma_attr_flags |= MDS_OWNEROVERRIDE;
if (in & ATTR_FORCE)
ma->ma_attr_flags |= MDS_PERM_BYPASS;
out_proc:
ptlrpc_lprocfs_unregister_obd(obd);
lprocfs_obd_cleanup(obd);
- class_destroy_import(obd->u.cli.cl_import);
+ obd_cleanup_client_import(obd);
client_obd_cleanup(obd);
out_ref:
ptlrpcd_decref();
__swab64s (&b->ctime);
__swab64s (&b->blocks);
__swab64s (&b->ioepoch);
- __swab64s (&b->ino);
+ CLASSERT(offsetof(typeof(*b), unused1) != 0);
__swab32s (&b->fsuid);
__swab32s (&b->fsgid);
__swab32s (&b->capability);
__swab32s (&b->flags);
__swab32s (&b->rdev);
__swab32s (&b->nlink);
- __swab32s (&b->generation);
+ CLASSERT(offsetof(typeof(*b), unused2) != 0);
__swab32s (&b->suppgid);
__swab32s (&b->eadatasize);
__swab32s (&b->aclsize);
(long long)(int)offsetof(struct mdt_body, blocks));
LASSERTF((int)sizeof(((struct mdt_body *)0)->blocks) == 8, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->blocks));
- LASSERTF((int)offsetof(struct mdt_body, ino) == 96, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, ino));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->ino) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->ino));
+ LASSERTF((int)offsetof(struct mdt_body, unused1) == 96, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, unused1));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->unused1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->unused1));
LASSERTF((int)offsetof(struct mdt_body, fsuid) == 104, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, fsuid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->fsuid) == 4, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, nlink));
LASSERTF((int)sizeof(((struct mdt_body *)0)->nlink) == 4, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->nlink));
- LASSERTF((int)offsetof(struct mdt_body, generation) == 140, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, generation));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->generation) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->generation));
+ LASSERTF((int)offsetof(struct mdt_body, unused2) == 140, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, unused2));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->unused2) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->unused2));
LASSERTF((int)offsetof(struct mdt_body, suppgid) == 144, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, suppgid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->suppgid) == 4, "found %lld\n",
# that the number of skipped files is less than 1.5x the number of files
local MAXIMUM=$((CREATED * 3 / 2))
local MINIMUM=$((CREATED + 1)) # files + directory
- [ $SKIPPED -ge $MAXIMUM -o $SKIPPED -lt $MINIMUM] &&
+ [ $SKIPPED -ge $MAXIMUM -o $SKIPPED -lt $MINIMUM ] &&
error "(5) Expect [ $MINIMUM , $MAXIMUM ) objects skipped, got $SKIPPED"
# reset OI scrub start point by force
}
run_test 11 "OI scrub skips the new created objects only once"
-# restore the ${facet}_MKFS_OPTS variables
-for facet in MGS MDS OST; do
- opts=SAVED_${facet}_MKFS_OPTS
- if [[ -n ${!opts} ]]; then
- eval ${facet}_MKFS_OPTS=\"${!opts}\"
- fi
-done
-
# restore MDS/OST size
MDSSIZE=${SAVED_MDSSIZE}
OSTSIZE=${SAVED_OSTSIZE}
done
}
-export CACHE_MAX=`$LCTL get_param -n llite.*.max_cached_mb | head -n 1`
+export CACHE_MAX=$($LCTL get_param -n llite.*.max_cached_mb |
+ awk '/^max_cached_mb/ { print $2 }')
+
cleanup_101a() {
$LCTL set_param -n llite.*.max_cached_mb $CACHE_MAX
trap 0
CHECK_MEMBER(mdt_body, atime);
CHECK_MEMBER(mdt_body, ctime);
CHECK_MEMBER(mdt_body, blocks);
- CHECK_MEMBER(mdt_body, ino);
+ CHECK_MEMBER(mdt_body, unused1);
CHECK_MEMBER(mdt_body, fsuid);
CHECK_MEMBER(mdt_body, fsgid);
CHECK_MEMBER(mdt_body, capability);
CHECK_MEMBER(mdt_body, flags);
CHECK_MEMBER(mdt_body, rdev);
CHECK_MEMBER(mdt_body, nlink);
- CHECK_MEMBER(mdt_body, generation);
+ CHECK_MEMBER(mdt_body, unused2);
CHECK_MEMBER(mdt_body, suppgid);
CHECK_MEMBER(mdt_body, eadatasize);
CHECK_MEMBER(mdt_body, aclsize);
(long long)(int)offsetof(struct mdt_body, blocks));
LASSERTF((int)sizeof(((struct mdt_body *)0)->blocks) == 8, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->blocks));
- LASSERTF((int)offsetof(struct mdt_body, ino) == 96, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, ino));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->ino) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->ino));
+ LASSERTF((int)offsetof(struct mdt_body, unused1) == 96, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, unused1));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->unused1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->unused1));
LASSERTF((int)offsetof(struct mdt_body, fsuid) == 104, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, fsuid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->fsuid) == 4, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, nlink));
LASSERTF((int)sizeof(((struct mdt_body *)0)->nlink) == 4, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->nlink));
- LASSERTF((int)offsetof(struct mdt_body, generation) == 140, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, generation));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->generation) == 4, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->generation));
+ LASSERTF((int)offsetof(struct mdt_body, unused2) == 140, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, unused2));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->unused2) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->unused2));
LASSERTF((int)offsetof(struct mdt_body, suppgid) == 144, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, suppgid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->suppgid) == 4, "found %lld\n",