@@ -316,7 +316,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
OBD_CONNECT2_CRUSH | OBD_CONNECT2_LSEEK |
OBD_CONNECT2_GETATTR_PFID |
OBD_CONNECT2_DOM_LVB |
- OBD_CONNECT2_REP_MBITS;
+ OBD_CONNECT2_REP_MBITS |
+ OBD_CONNECT2_ATOMIC_OPEN_LOCK;
if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
@@ -1145,7 +1145,9 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
* we only need to request open lock if it was requested
* for every open
*/
- if (ll_i2sbi(dir)->ll_oc_thrsh_count == 1)
+ if (ll_i2sbi(dir)->ll_oc_thrsh_count == 1 &&
+ exp_connect_flags2(ll_i2mdexp(dir)) &
+ OBD_CONNECT2_ATOMIC_OPEN_LOCK)
it->it_flags |= MDS_OPEN_LOCK;
/* Dentry added to dcache tree in ll_lookup_it */
@@ -131,6 +131,12 @@
"lseek", /* 0x40000 */
"dom_lvb", /* 0x80000 */
"reply_mbits", /* 0x100000 */
+ "mode_convert", /* 0x200000 */
+ "batch_rpc", /* 0x400000 */
+ "pcc_ro", /* 0x800000 */
+ "mne_nid_type", /* 0x1000000 */
+ "lock_contend", /* 0x2000000 */
+ "atomic_open_lock", /* 0x4000000 */
NULL
};
@@ -1252,6 +1252,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT2_DOM_LVB);
LASSERTF(OBD_CONNECT2_REP_MBITS == 0x100000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_REP_MBITS);
+ LASSERTF(OBD_CONNECT2_ATOMIC_OPEN_LOCK == 0x4000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_ATOMIC_OPEN_LOCK);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned int)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
@@ -840,6 +840,7 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT2_LSEEK 0x40000ULL /* SEEK_HOLE/DATA RPC */
#define OBD_CONNECT2_DOM_LVB 0x80000ULL /* pack DOM glimpse data in LVB */
#define OBD_CONNECT2_REP_MBITS 0x100000ULL /* match reply by mbits, not xid */
+#define OBD_CONNECT2_ATOMIC_OPEN_LOCK 0x4000000ULL/* request lock on 1st open */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
* flag value is not in use on some other branch. Please clear any such