aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/vvp_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/vvp_io.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/vvp_io.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c
index 697cbfbe9374..4c57755e06e7 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_io.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
@@ -288,7 +288,7 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)
io->ci_ignore_layout, io->ci_verify_layout,
vio->vui_layout_gen, io->ci_restore_needed);
- if (io->ci_restore_needed == 1) {
+ if (io->ci_restore_needed) {
int rc;
/* file was detected release, we need to restore it
@@ -657,7 +657,15 @@ static void vvp_io_setattr_end(const struct lu_env *env,
static void vvp_io_setattr_fini(const struct lu_env *env,
const struct cl_io_slice *ios)
{
+ bool restore_needed = ios->cis_io->ci_restore_needed;
+ struct inode *inode = vvp_object_inode(ios->cis_obj);
+
vvp_io_fini(env, ios);
+
+ if (restore_needed && !ios->cis_io->ci_restore_needed) {
+ /* restore finished, set data modified flag for HSM */
+ set_bit(LLIF_DATA_MODIFIED, &(ll_i2info(inode))->lli_flags);
+ }
}
static int vvp_io_read_start(const struct lu_env *env,
@@ -1006,7 +1014,7 @@ static int vvp_io_kernel_fault(struct vvp_fault_io *cfio)
{
struct vm_fault *vmf = cfio->ft_vmf;
- cfio->ft_flags = filemap_fault(cfio->ft_vma, vmf);
+ cfio->ft_flags = filemap_fault(vmf);
cfio->ft_flags_valid = 1;
if (vmf->page) {
@@ -1340,13 +1348,6 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
io->ci_lockreq = CILR_MANDATORY;
}
- /* ignore layout change for generic CIT_MISC but not for glimpse.
- * io context for glimpse must set ci_verify_layout to true,
- * see cl_glimpse_size0() for details.
- */
- if (io->ci_type == CIT_MISC && !io->ci_verify_layout)
- io->ci_ignore_layout = 1;
-
/* Enqueue layout lock and get layout version. We need to do this
* even for operations requiring to open file, such as read and write,
* because it might not grant layout lock in IT_OPEN.