• Vivek Goyal's avatar
    ovl: Open file with data except for the case of fsync · 8c444d2a
    Vivek Goyal authored
    ovl_open() should open file which contains data and not open metacopy
    inode.  With the introduction of metacopy inodes, with current
    implementaion we will end up opening metacopy inode as well.
    
    But there can be certain circumstances like ovl_fsync() where we want to
    allow opening a metacopy inode instead.
    
    Hence, change ovl_open_realfile() and and add extra parameter which
    specifies whether to allow opening metacopy inode or not.  If this
    parameter is false, we look for data inode and open that.
    
    This should allow covering both the cases.
    Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    8c444d2a
file.c 11 KB