ENTRY;
spin_lock(&lli->lli_lock);
lli->lli_flags |= LLIF_SOM_DIRTY;
- lli->lli_flags |= LLIF_DATA_MODIFIED;
if (page != NULL && cfs_list_empty(&page->cpg_pending_linkage))
cfs_list_add(&page->cpg_pending_linkage,
&club->cob_pending_list);
struct cl_page *pg = slice->cpl_page;
struct inode *inode = ccc_object_inode(obj);
struct ll_sb_info *sbi = ll_i2sbi(inode);
+ struct ll_inode_info *lli = ll_i2info(inode);
cfs_page_t *vmpage = cp->cpg_page;
int result;
}
ll_stats_ops_tally(sbi, tallyop, 1);
+ /* Inode should be marked DIRTY even if no new page was marked DIRTY
+ * because page could have been not flushed between 2 modifications.
+ * It is important the file is marked DIRTY as soon as the I/O is done
+ * Indeed, when cache is flushed, file could be already closed and it
+ * is too late to warn the MDT.
+ * It is acceptable that file is marked DIRTY even if I/O is dropped
+ * for some reasons before being flushed to OST.
+ */
+ if (result == 0) {
+ spin_lock(&lli->lli_lock);
+ lli->lli_flags |= LLIF_DATA_MODIFIED;
+ spin_unlock(&lli->lli_lock);
+ }
+
size = cl_offset(obj, pg->cp_index) + to;
ll_inode_size_lock(inode);
$LFS hsm_set --exists $TESTFILE.append ||
error "user could not change hsm flags"
dd if=/etc/passwd of=$TESTFILE.append bs=1 count=3 \
- conv=notrunc,fdatasync oflag=append status=noxfer ||
+ conv=notrunc oflag=append status=noxfer ||
error "could not append to test file"
$LFS hsm_state $TESTFILE.append | grep -q " (0x00000003)" ||
error "wrong hsm state: !0x3"
$LFS hsm_set --exists $TESTFILE.modify ||
error "user could not change hsm flags"
dd if=/dev/zero of=$TESTFILE.modify bs=1 count=3 \
- conv=notrunc,fdatasync status=noxfer ||
+ conv=notrunc status=noxfer ||
error "could not modify test file"
$LFS hsm_state $TESTFILE.modify | grep -q " (0x00000003)" ||
error "wrong hsm state: !0x3"