From d428a204a1cd923b96eb66710ea6c96389a00a12 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Mon, 28 Oct 2013 22:20:01 -0400 Subject: [PATCH] LU-3601 Do not create layout in lease-open leases are not real opens so it makes no sense to create layouts when the lease is taken. Change-Id: Ica2d6a348c360bd20bb7bd27061839df84dae84b Signed-off-by: Oleg Drokin Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/8084 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/include/lustre_mds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h index 9ec8424..6c6e164 100644 --- a/lustre/include/lustre_mds.h +++ b/lustre/include/lustre_mds.h @@ -69,8 +69,8 @@ struct mds_capa_info { static inline int md_should_create(__u64 flags) { - return !(flags & MDS_OPEN_DELAY_CREATE || - !(flags & FMODE_WRITE)); + return !(flags & MDS_OPEN_DELAY_CREATE) && (flags & FMODE_WRITE) && + !(flags & MDS_OPEN_LEASE); } /* these are local flags, used only on the client, private */ -- 1.8.3.1