Whamcloud - gitweb
LU-3647 hsm: Add support to drop all pages for ll_data_version
[fs/lustre-release.git] / lustre / llite / dir.c
index e9c35ba..870a94c 100644 (file)
@@ -947,7 +947,7 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy)
                }
 
                /* Read current file data version */
-               rc = ll_data_version(inode, &data_version, 1);
+               rc = ll_data_version(inode, &data_version, LL_DV_RD_FLUSH);
                iput(inode);
                if (rc != 0) {
                        CDEBUG(D_HSM, "Could not read file data version of "
@@ -1031,8 +1031,7 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)
                        GOTO(progress, rc = PTR_ERR(inode));
                }
 
-               rc = ll_data_version(inode, &data_version,
-                                    copy->hc_hai.hai_action == HSMA_ARCHIVE);
+               rc = ll_data_version(inode, &data_version, LL_DV_RD_FLUSH);
                iput(inode);
                if (rc) {
                        CDEBUG(D_HSM, "Could not read file data version. "