Skip to content
Snippets Groups Projects
Commit 1c7d69ec authored by girish's avatar girish
Browse files

Set MDS_BFLAG_EXT_FLAGS on MDS in open call path.

b=17465
i=adilger
i=johann
parent 867af18e
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,8 @@ struct obd_export {
exp_connecting:1,
exp_replay_needed:1,
exp_need_sync:1, /* needs sync from connect */
exp_bflag:1, /* for 1.6 only to track
MDS_BFLAG_EXT_FLAGS */
exp_libclient:1; /* liblustre client? */
struct list_head exp_queued_rpc; /* RPC to be handled */
union {
......
......@@ -764,6 +764,18 @@ static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry,
mds_pack_inode2fid(&body->fid1, inode);
body->flags = reqbody->flags; /* copy MDS_BFLAG_EXT_FLAGS if present */
/* Compatibility for clients that do not set BLFAG_EXT_FLAGS in
* intent lock requests even though they check it in the reply.
* In 1.8+ this is set unconditionally, but 1.4.6- clients do
* not understand this flag. b=17465 */
if ((reqbody->flags & MDS_BFLAG_EXT_FLAGS) &&
!obd->obd_self_export->exp_bflag) {
spin_lock(&obd->obd_self_export->exp_lock);
obd->obd_self_export->exp_bflag = 1;
spin_unlock(&obd->obd_self_export->exp_lock);
}
mds_pack_inode2body(body, inode);
reply_off++;
......
......@@ -1177,6 +1177,8 @@ int mds_open(struct mds_update_record *rec, int offset,
found_child:
mds_pack_inode2fid(&body->fid1, dchild->d_inode);
if (obd->obd_self_export->exp_bflag)
body->flags |= MDS_BFLAG_EXT_FLAGS;
mds_pack_inode2body(body, dchild->d_inode);
if (S_ISREG(dchild->d_inode->i_mode)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment