Whamcloud - gitweb
LU-3205 llite: Set layout_gen before compatibility check
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 23 Apr 2013 23:59:56 +0000 (16:59 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 27 Apr 2013 20:08:39 +0000 (16:08 -0400)
We should set IO's layout generation to current generation of inode,
no matter what it is. Otherwise, it will go into an infinite loop
on layout change check.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9f1f0d9ae0dd53dea130db46bbcbdbd29526b6eb
Reviewed-on: http://review.whamcloud.com/6137
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/file.c

index 09f9905..e61b696 100644 (file)
@@ -3437,7 +3437,7 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
        int rc;
        ENTRY;
 
        int rc;
        ENTRY;
 
-       *gen = LL_LAYOUT_GEN_NONE;
+       *gen = lli->lli_layout_gen;
        if (!(sbi->ll_flags & LL_SBI_LAYOUT_LOCK))
                RETURN(0);
 
        if (!(sbi->ll_flags & LL_SBI_LAYOUT_LOCK))
                RETURN(0);